I am trying to add a video tag to a Sharepoint 2007 website with no success.
I created a new Content Editor webpart and injected this code:
http://pastebin.ca/2076724
<video id="movie" width="320" height="240" preload controls>
<source src="/videos/test.ogv" type='video/ogg; codecs="theora, vorbis"' />
<object id="MediaPlayer" width="320" height="240" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
standby="Loading Windows Media Pla开发者_如何学Pythonyer components..." type="application/x-oleobject">
<PARAM NAME="FileName" VALUE="http://www.domain.com/videos/test.wmv">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="http://www.domain.com/videos/test.wmv" NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"></EMBED>
</OBJECT>
</video>
The controls are loaded, the video is found when doing Save Video (so no broken link), but the video does not play.
What I did is do Save Page As to my local disk, and tada: It works.
I fiddled with the code several times. I noticed that Sharepoint does alter the code a bit but the same code works when locally so..
I also do not have the HTML5 doctype in my website. (neither locally).
Ideas?
What MIME type is Sharepoint serving the video as? It should be video/ogg
, here's a Technet article on how to configure MIME types in IIS6.
精彩评论