当使用html5到flash播放器后退时,ie8中的自动播放闪光

时间:2013-06-04 10:34:51

标签: jquery html5 flash

我有一个带有闪回后退的html5播放器,如下所示:

<div class="divVideoWrapper">
<div class="divVideo">
<div class="divVideoContainer">
    <div id="videoPlayerChange"  class="video_player">
        <video class="scrPoster" controls="controls" poster="http://static.e-talemedia.net/content/images/testfirstframe.png" >
            <source id="scrVideomp4"  class="scrVideomp4" src="http://static.e-talemedia.net/content/video/bosch/testfeaturevideo.mp4" type="video/mp4" />
            <source id="scrVideowebm" class="scrVideowebm" src="http://static.e-talemedia.net/content/video/bosch/testfeaturevideo.webm" type="video/webm" />
            <source id="scrVideogg" class="scrVideogg" src="http://static.e-talemedia.net/content/video/bosch/testfeaturevideo.ogv" type="video/ogg" />
            <object id="objFlash" width="352" height="198">
                <param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf">
                </param>
                <param name="allowFullScreen" value="true"></param>
                <param name="allowscriptaccess" value="always"></param>
                <embed src="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="330" height="185" flashvars="src=http://static.e-talemedia.net/content/video/bosch/testfeaturevideo.mp4&poster=http://static.e-talemedia.net/content/images/testfirstframe.png"></embed>
            </object>
        </video>
    <div class="custom_controls">
        <div class="divBigButton">
        <a class="playBig" title="playBig"></a>
        </div>
        <a class="play" title="Play"></a><a class="pause" title="Pause"></a>
        <div class="volumeWrapper">
                <div class="volume">
                        <div class="volume_slider">
                        </div>
                <a class="mute" title="Mute"></a><a class="unmute" title="Unmute"></a>
                </div>
        </div>
        <div class="timer">
        00:00</div>
        <div class="time_slider">
        </div>
    </div>
</div>
<script>
    $(function () {
    $('.video_player').myPlayer();
    });
</script>

当用户点击某个功能时,会加载一个新视频,而在HTML5中,它会开始播放,但在闪存中则不会。我已经尝试在嵌入部分中添加swf&amp; autoStart = true“和嵌入部分中的autopart =”是“和autostart =”true“但这些似乎无法正常工作 - 我在ie8中测试它,因为这是浏览器回到闪光灯。

更改视频的Jquery脚本

 <script type="text/javascript">
        //<![CDATA[
        $(document).ready(function () {

            $(document).on("click", ".featureLogoText", function () {


                var media = $(this).attr('media');
                var mediamp4 = media + "mp4";
                var mediawebm = media + "webm";
                var mediaogv = media + "ogv";
                var newPoster = $(this).attr('data-poster');

                var html = ' <param name=\"movie\" value=\"http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf\" type=\"application/x-shockwave-flash\"allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"330\" height=\"185\" autoplay =\"true\" flashvars=\"src=' + mediamp4 + '&poster=' + newPoster + '\"></embed>';

                $("#objFlash").html("");
                $("#objFlash").append(html);



                var displayText = $(this).text();

                $(".divBottomRight .nowPlaying").text("Now Playing: ");
                $(".divBottomRight .nowPlayFeature").text(displayText);

                var number = $(this).attr('data-number');


            });
        });
    //]]>
    </script>

非常感谢任何帮助!

由于

1 个答案:

答案 0 :(得分:0)

找到答案b点击左边的一个链接!

get embeded flash to autoPlay

所以基本上我用&amp; autoPlay = true替换了我的&amp; poster = in flash in flash&...