javascript - youtube视频播放完后如何自动退出浏览器

标签 javascript flash firefox youtube bandwidth

视频播放完毕后,是否可以自动退出浏览器(firefox)?通过一些扩展/脚本?

我需要这样做是因为我想自动测量在Firefox中播放youtube视频时使用的带宽。

最佳答案

这是youtube的javascript API:

https://developers.google.com/youtube/js_api_reference

player.getPlayerState():Number
    Returns the state of the player. Possible values are unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).

您可以使用javascript处理它,并在完成后关闭页面。

关于javascript - youtube视频播放完后如何自动退出浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10161159/

相关文章:

javascript - 如何使用 Google Drive 的 api 打开文件?

javascript - jQuery 获取前一个元素未按预期工作

javascript - 在 Cloud Functions for Firebase 中的链式 Promise 之间传递值

FlashLite 2.x/3.0 跨域策略文件

performance - Actionscript 3如何一次移动多个对象而没有延迟

css - 图像在 firefox 中奇怪地拉伸(stretch)

javascript - Chrome 与 Firefox Javascript 行为

javascript - 如何使用 AngularJS 以编程方式创建 URL

actionscript-3 - Away3D Context3D 不可用

javascript - Firefox 3.03 和 contentEditable