开发者

Using MediaEnded in Javascript to launch a new Web page

开发者 https://www.devze.com 2023-02-28 07:12 出处:网络
How do I use the MediaEnded event in Javascript to de开发者_开发知识库tect the end of a playing video (QuickTime) and use that event to open a new web page?HTML5 makes this quite simple:

How do I use the MediaEnded event in Javascript to de开发者_开发知识库tect the end of a playing video (QuickTime) and use that event to open a new web page?


HTML5 makes this quite simple:

document.getElementById('your_video').onended = function() {
  newWindow = window.open(url, 'Foo', 'height=250,width = 200');

  if (window.focus) {newWindow.focus()}
}
0

精彩评论

暂无评论...
验证码 换一张
取 消