Use javascript to pause, jump to position, and adjust volume in netflix's silverlight player

荒凉一梦 提交于 2019-12-10 10:34:45

问题


I am trying to use javascript to pause, jump to position, and adjust volume in netflix's silverlight player.

There is no published API document for it in netflix, but I am guessing there is some silverlight controls buried in the app that are accessible via javascript.


回答1:


Partialy it can be done, but its awkward. The Silverlight plugin can be controlled by key strokes, once it has focus.

You might find elsewhere what are to combinations. Basicly there is space for pause/play, arrows for rewinding and ctrl arrows for some other kind of rewinding.

Could be tricky to know, when Silverlight has focus. Usualy you have to emulate click on it.

I never accomplished volume manipulation. Cheers!




回答2:


You need to locate video element on page. Here is some samples

//start playing
$('video').play();
//stop playing
$('video').stop();

Handle event of play start
$('video').addEventListener('playing',function(){               
                    console.log('video is playing');
                    }
            );


来源:https://stackoverflow.com/questions/9195337/use-javascript-to-pause-jump-to-position-and-adjust-volume-in-netflixs-silver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!