HTML5 MP4全屏模式和SWF

时间:2018-10-14 03:55:57

标签: html5 flash mp4

我有一个用标准HTML5编写的MP4视频播放器。评级应用程序在Flash中。在常规模式下,它可以正常工作,但是当视频扩展到全屏时,SWF将位于视频上方。有没有一种方法可以控制视频,以便在扩展到全屏时保持在所有视频的顶部?

示例代码:这是一个SharePoint环境,所有在Webpart Content Editor中实现的东西。

Webpart 1:

<script>
 if (!IsInDesignMode()) {
   document.write("<video width='768' height='432' controls='controls' autoplay='autoplay'>");
   document.write("<source src='" + videoURL + "' type='video/mp4'></source>");
   // videoURL is the exactly URL for the video which is based on server location and query string with video path and name.
   }
</script>

Webpart 2:

<script>
    ratingURL = "http://server and path.../Video_Rating_Vote_Comments.html?PageName=" + pgName + "&ModuleID=" + MID + "&PageID=" + PID + "&Dept=" + DeptCode + "&tLocation=" + geicoLocation + "&MediaFileName=" + mediaName
    if (!IsInDesignMode()) {
        document.write("<iframe src=" + "'" + ratingURL + "'" + " width= '300' height= '220' frameborder='0'></iframe>");
    }
</script>

加载SWF的HTML文件:

<body>
    <div id="flashContent">
        <object type="application/x-shockwave-flash" data="Page_Rating_Vote_Comments.swf" width="245" height="215" id="Flash Content" style="float: none; vertical-align:middle">
            <param name="movie" value="Page_Rating_Vote_Comments.swf" />
            <param name="quality" value="high" />
            <param name="bgcolor" value="#ffffff" />
            <param name="play" value="true" />
            <param name="loop" value="true" />
            <param name="wmode" value="window" />
            <param name="scale" value="showall" />
            <param name="menu" value="true" />
            <param name="devicefont" value="false" />
            <param name="salign" value="" />
            <param name="allowScriptAccess" value="always" />
            <a href="http://www.adobe.com/go/getflash">
                <img src="adobe URL.../get_flash_player.gif" alt="Get Adobe Flash player" />
            </a>
        </object>
    </div>
</body>

感谢您的帮助。

0 个答案:

没有答案