duannaozhao4626 2013-05-16 08:18
浏览 103

播放10秒后如何内容锁定视频呢?

thanks for your time! how would i go about having my content locker, load and pausing the video after 10 secs

So the user hits play, the video (self hosted) plays and after 10 seconds of playing it pause/stops and loads my content locker

onClick='show_locker();'

onload='show_locker()'

I was guessing i'd have to use html5 video player and JavaScript? i'm not brilliant with JavaScript hence my question?

<video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> Your browser does not support the video tag. </video>

Any help or code would be great!

  • 写回答

1条回答 默认 最新

  • douwen5690 2013-05-16 08:26
    关注

    use settimeout function

    function showlocker(){
    
    /////
    your code
    /////
    
    setTimeout(function(){pauseaudio(),10000)}
    
    }
    
    function pauseaudio(){
    
    song.pause();
    
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?