Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there any way/ API to interact with an <object> playing a video?
    primarykey
    data
    text
    <p><strong>See my own answer, got it working!</strong></p> <p>I am using video.js to play videos on a website which will also have to work offline, hence the usage of flash is not possible. Since video.js uses a flash fallback, I wrote my very own.</p> <p>In IE8 for instance and object is created:</p> <pre><code>&lt;OBJECT codeBase="http://www.microsoft.com/Windows/MediaPlayer/" classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width=660 height=418 type=application/x-oleobject&gt; &lt;embed src="Videos/Aktionen_Coffee-Stop/Teaser_Coffee-Stop.wmv" type="application/x-mplayer2" enabled="1" showstatusbar="1" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="true" width="660" height="418" scale="tofit"&gt;&lt;/embed&gt;&lt;/OBJECT&gt; </code></pre> <p>This works perfectly fine and the object renders a video player (windows media player i.e., resp. quicktime in older mac/safari versions).</p> <p>Is there any way in JavaScript to make this video playing to stop, replay, fire an "ended" like event?</p> <p>Edit: <a href="http://msdn.microsoft.com/en-us/library/dd564034%28v=vs.85%29.aspx" rel="nofollow">even when looking at these "docs"</a> - how to freakin create a Player object? How can people create such a doc? Seriously MS...</p> <p><strong>Update</strong></p> <pre><code>var wmp = $('#wmp').get(0); setTimeout(function() { console.log(wmp.Controls.currentPosition()); wmp.Stop(); }, 2000); </code></pre> <p>the <code>wmp.stop()</code> will work, but <code>wmp.Controls</code> or <code>.controls</code> always throws an error. I just want to know when the video has ended.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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