MVC Quicktime/mov doesn't play
I am trying to embed a mov onto a cshtml page, all the resources seem to be referencing properly but the video won't play.
The videos are located in the /Content/Videos directory.
I thought it was a permission issue but I granted everyone permission with no luck.
Could this be an IIS issue? (Checked mime types for mov) or do I have put to do something in the global.asax (routes.IgnoreRoute) for mov files extensions?
Firebug shows when the player is clicked to play the video it does a successful get of the video but I don't think it is supposed to do a get action, I tested the same video from a plain html page opened from the file system, it doesn't invoke a get action when player is clicked.
I also tried to play the movie by typing the whole path in the address bar again no luck it just comes up with a quicktime logo with a question mark inside it.
Script references:
<script src="http://www.apple.com/library/quicktime/scripts/ac_quicktime.js" language="JavaScript"
type="text/javascript"></script>
<script src="http://www.apple.com/library/quicktime/scripts/qtp_library.js" language="JavaScript"
type="text/javascript"></script>
Script to embed the video:
<script type="text/javascript"><!--
QT_WritePoster_XHTML('Click to Play', '../Content/Videos/myMovie.jpg',
'../Content/Videos/myMovie.mov',
'520', '296', '',
'controller', 'true',
'autoplay', 'true',
'bgcolor', 'black',
'scale', 'aspect');
//-->
</script>
<noscript>
<object width="520" height="296" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="../Content/Videos/myMovie.jpg" />
<param name="href" value="../Content/Videos/myMovie.mov" />
<param name="target" value="myself" />
<param name="controller" value="false" />
<param name="autoplay" value="false" />
<param name="scale" value="aspect" />
<embed width="720" height="496" type="video/quickti开发者_如何学JAVAme" pluginspage="http://www.apple.com/quicktime/download/"
src="../Content/Videos/myMovie.jpg" href="../Content/Videos/myMovie.mov" target="myself"
controller="false" autoplay="false" scale="aspect">
</embed>
</object>
</noscript>
After a bit of research it seems that IIS does not allow the streaming of .mov files by default, it managed to get it working by installing the II7 media pack.
http://www.microsoft.com/downloads/en/details.aspx?familyid=93d59f79-9555-473d-a07a-e21020d1fc25&displaylang=en
精彩评论