What is the best way to make the Yahoo media player autostart, jQuery?

心不动则不痛 提交于 2019-12-13 01:00:33

问题


Yahoo has a mediaplayer to play media on a webpage:

http://mediaplayer.yahoo.com/

but there is no option to make it auto start.

What is the best way to make it autostart, by hacking into the code, or it can also be using jQuery to "click" on one of the media to auto start it, although, how do you know the Yahoo code has finish initializing? We can use a setTimeout(function() { // click first one }, 3000) but it seems too much of a hack.


回答1:


There is an option for this.
Plz check at this page http://mediaplayer.yahoo.com/api/#example_usage
If u set autoplay:true, the first song will be started automatically..



来源:https://stackoverflow.com/questions/3130471/what-is-the-best-way-to-make-the-yahoo-media-player-autostart-jquery

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