Note that there are some explanatory texts on larger screens.

plurals
  1. POTracking bar not working in embedded Windows Media Player
    text
    copied!<p>In my ASP.NET MVC application, I'm embedding Windows Media Player so that my users can listen to specific audio recordings. I'm using the following code:</p> <pre><code>&lt;object width="100%" height="65" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"&gt; &lt;param name="URL" value="/QualityAssurance/PlayRecording/&lt;%: Model.CustomerOrder.Id.ToString() %&gt;/&lt;%: System.IO.Path.GetFileName(Model.RecordingFilename) %&gt;" /&gt; &lt;param name="SendPlayStateChangeEvents" value="true" /&gt; &lt;param name="AutoStart" value="false" /&gt; &lt;param name="uiMode" value="mini" /&gt; &lt;param name="PlayCount" value="1" /&gt; &lt;param name="height" value="65px" /&gt; &lt;param name="width" value="100%" /&gt; &lt;param name="stretchtofit" value="true" /&gt; &lt;param name="showstatusbar" value="true" /&gt; &lt;param name="enablepositioncontrols" value="true" /&gt; &lt;param name="showpositioncontrols" value="true" /&gt; &lt;param name="enabletracker" value="true" /&gt; &lt;param name="showcontrols" value="true" /&gt; &lt;param name="showaudiocontrols" value="true" /&gt; &lt;param name="displaymode" value="true" /&gt; &lt;param name="enablecontextmenu" value="false" /&gt; &lt;param name="loop" value="false" /&gt; &lt;param name="windowslessVideo" value="true" /&gt; &lt;/object&gt; </code></pre> <p>I'm really happy with everything, works perfectly with the exception of one issue: the track bar doesn't work, so I cannot cue to a specific point in the audio. The only way to reach a specific point is to use the FF or FR buttons in WMP. If I click on the trackbar, it momentarily moves the thumbswitch to the desired point, but then just jumps back to the currently-playing position the moment I release the mouse button.</p> <p>I'm sure it's just something simple I'm not doing but it's starting to get frustrating now. Any help/advice would be appreciated.</p> <p>Thanks,</p> <p>Simon.</p> <p><strong>EDIT:</strong></p> <p>I fixed the problem. For your benefit, here is the code:</p> <pre><code>&lt;object id="VIDEO" width="100%" height="65" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"&gt; &lt;param name="URL" value="/QualityAssurance/PlayRecording/&lt;%: Model.CustomerOrder.Id.ToString() %&gt;/&lt;%: System.IO.Path.GetFileName(Model.RecordingFilename) %&gt;"&gt; &lt;param name="SendPlayStateChangeEvents" value="true"&gt; &lt;param name="AutoStart" value="false"&gt; &lt;param name="PlayCount" value="1"&gt; &lt;param name="stretchtofit" value="true"&gt; &lt;param name="showstatusbar" value="true"&gt; &lt;param name="enablepositioncontrols" value="true"&gt; &lt;param name="showpositioncontrols" value="true"&gt; &lt;param name="enabletracker" value="true"&gt; &lt;param name="showcontrols" value="true"&gt; &lt;param name="showaudiocontrols" value="true"&gt; &lt;param name="enablecontextmenu" value="true"&gt; &lt;/object&gt; </code></pre> <p>Don't ask me why, but that combination of params works perfectly. The tracking bar doesn't work for the first few seconds, but after the file has streamed across and been buffered, it works perfectly.</p> <p>Simon.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload