Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 需要在视频结束时触发事件_Javascript_Video_Triggers - Fatal编程技术网

Javascript 需要在视频结束时触发事件

Javascript 需要在视频结束时触发事件,javascript,video,triggers,Javascript,Video,Triggers,致力于从Flash切换到Flash player/html5视频播放器混合解决方案。使用video.js播放器。我正在寻找隐藏播放器,并显示一个div块与javascript视频完成后。有人知道怎么触发吗?我有一个SWF容器和一个视频容器。有人有什么建议吗 www.friedmanlp.com/home3.php 以下代码: <div class="video-js-box"> <!-- Using the Video for Everybody Emb

致力于从Flash切换到Flash player/html5视频播放器混合解决方案。使用video.js播放器。我正在寻找隐藏播放器,并显示一个div块与javascript视频完成后。有人知道怎么触发吗?我有一个SWF容器和一个视频容器。有人有什么建议吗

www.friedmanlp.com/home3.php

以下代码:

    <div class="video-js-box">
        <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
        <video id="example_video_1" class="video-js" width="545" height="380" controls="controls" preload="auto" poster="http://www.friedmanllp.com/video/video.jpg">
          <source src="http://www.friedmanllp.com/video/intro.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
          <object id="flash_fallback_1" class="vjs-flash-fallback" width="545" height="380" type="application/x-shockwave-flash"
            data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
            <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
            <param name="allowfullscreen" value="true" />
            <param name="flashvars" value='config={"playlist":["http://www.friedmanllp.com/video/video.jpg", {"url": "http://www.friedmanllp.com/video/intro.mp4","autoPlay":true,"autoBuffering":true}]}' />
            <!-- Image Fallback. Typically the same as the poster image. -->
            <img src="http://www.friedmanllp.com/video/video.jpg" width="545" height="380" alt="Poster Image"
              title="No video playback capabilities." />
          </object>
        </video>
        <!-- Download links provided for devices that can't play video in the browser. -->
    </div>

    <div style="display:none; width:545px; height:380px; overflow:hidden;">
        <div class="practices_link" style="float:left; margin-bottom:1px; width:95px; height:17px; cursor:pointer;"><img class="practices_on" style="margin-bottom:1px; width:95px; height:17px;" src="images/alt/practices_on.jpg" /><img class="practices_off" style="display:none; margin-bottom:1px; width:95px; height:17px;" src="images/alt/practices_off.jpg" /></div><div style="float:left; margin-bottom:1px; width:355px; height:17px;"><img src="images/alt/blank_alt.gif" style="width:355px; height:17px;"></div><div class="services_link" style="float:left; margin-bottom:1px; width:95px; height:17px;"><img class="services_off" style="margin-bottom:1px; width:95px; height:17px; cursor:pointer;" src="images/alt/services_off.jpg" /><img class="services_on" style="display:none; margin-bottom:1px; width:95px; height:17px; cursor:pointer;" src="images/alt/services_on.jpg" /></div>
        <div id="slider">
            <div id="practices" style="float:left; top:0; left:0; position:relative;">
                <a href="http://www.friedmanllp.com/articles.php?pcode=1"><img style="margin-bottom:1px;" src="images/alt/1.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=5"><img style="margin-bottom:1px;" src="images/alt/2.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=13"><img style="margin-bottom:1px;" src="images/alt/3.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=2"><img style="margin-bottom:1px;" src="images/alt/4.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=18"><img style="margin-bottom:1px;" src="images/alt/5.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=28"><img style="margin-bottom:1px;" src="images/alt/6.jpg" /></a>
            </div>
            <div id="services" style="float:left; top:-360px; left:545px; position:relative;">
                <a href="http://www.friedmanllp.com/articles.php?pcode=21"><img style="margin-bottom:1px;" src="images/alt/7.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=7"><img style="margin-bottom:1px;" src="images/alt/8.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=29"><img style="margin-bottom:1px;" src="images/alt/9.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=30"><img style="margin-bottom:1px;" src="images/alt/10.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=14"><img style="margin-bottom:1px;" src="images/alt/11.jpg" /></a>
                <a href="http://www.friedmanllp.com/articles.php?pcode=17"><img style="margin-bottom:1px;" src="images/alt/12.jpg" /></a>
            </div>
        </div>
      </div>

我正在寻找隐藏播放器,并显示一个div块与javascript视频完成后

查看视频播放器的文档,看它是否有活动;如果不行,就换球员


.

HTML5视频应该有一个“结束”事件,在视频结束时触发。您考虑过[HTML5][1]吗?[1] :您考虑过[html5][1]吗?[1] :我一直试图将其作为一个答案发布,但它一直以注释的形式发布。我使用以下方法获得它:$(文档).ready(函数(){$('.'示例视频1').bind(“end”,函数(){$('.video js box')).css('display','none');$('slider').css('display','block');});我使用以下命令获得它:$(document).ready(function(){$('#example_video_1').bind(“end”,function(){$('.video js box')).css('display','none');$('#slider').css('display','block');});尽管我不认为这是一个完全跨浏览器的解决方案。IE7和IE8不支持视频标签。我在工程中发现了一个黑客项目,但还不足以使用。而我试图不必重建的flash文件,我很可能必须从头开始。并使用图像幻灯片作为iPad和iPhone的备用方案。