I'm trying to embed Windows Media Video into a webpage using a playlist and having the requirement to access the playstate change events and clips through javascript. Therefore I tried several embed possibilities:
object-Tag:
Seems the preverable method, but this won't scale the windows media player. Means, if I put an object tag as written here and set the size to 320x240 but the WMV has higher dimensions (e.g. 640x480) the windows media player always resizes to the video dimensions. This break the page layout and is therefore unusable. Any suggestions here? I tried like every parameter option available for the player, no effect. Access through javascript works with play.currentMedia aso.
embed-Code
Tried this one:
<embed allowscriptaccess="always" allowScriptAccess="always" showcontrols="1" showstatusbar="0" showdisplay="0" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" id="MediaPlayer1" name="MediaPlayer1" ShowStatusBar="true" EnableContextMenu="false" autostart="false" width="320" height="240" loop="false" src="PLAYLIST" />
This works in FF, IE6 and 8 (and maybe others - these are the browsers that need to display it). The video is shown in the enforced dimension of 320x240 - good. As I need to access the player to check the playstates through javascript and act if the video changes (as the input is a playlist) this won't work here because I can't access the player properties like currentMedia which works in the object Tag method. Is there a way to access the player playlist somehow?
I'm kinda stuck, because no solution complies with the requirements to enforce a video size and to be able to use javascript to access the players internals. Maybe someone knows a good solution, I'm open to suggestions - thank you!