使用.seek()方法手动控制Netflix播放器 [英] Controlling the Netflix player manually with .seek() method

查看:131
本文介绍了使用.seek()方法手动控制Netflix播放器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想手动(从控制台)寻找Netflix播放器。
我得到了播放器: netflix.cadmium.objects.videoPlayer(),我知道有一个 .seek()方法,但我不知道如何使用它。

I'm looking to seek the Netflix player manually (from the console). I get the player : netflix.cadmium.objects.videoPlayer(), and I know there is a .seek() method on it but I don't know how to use it.

我尝试了什么

netflix.cadmium.objects.videoPlayer().seek(60)
netflix.cadmium.objects.videoPlayer().seek("60")

&没有任何反应...

& nothing happens...

推荐答案

netflix.cadmium.objects.videoPlayer()。seek() 函数接受以毫秒为单位的时间。假设你的论点是几秒钟,你可以通过调用 .seek(60 * 1000)来解决这个问题,以便在视频中寻找一分钟。

The netflix.cadmium.objects.videoPlayer().seek() function accepts a time in milliseconds. Assuming your argument was in seconds, you can fix this by calling .seek(60 * 1000) to seek one minute into the video.

为了将来参考,JavaScript中大多数与时间相关的函数将以毫秒为单位接受或返回一个数字,例如 setTimeout() Date.getTime()

For future reference, most time-related functions in JavaScript will either accept or return a number in milliseconds such as setTimeout() and Date.getTime().

这篇关于使用.seek()方法手动控制Netflix播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆