使雅虎媒体播放器自动启动jQuery的最佳方法是什么? [英] What is the best way to make the Yahoo media player autostart, jQuery?

查看:88
本文介绍了使雅虎媒体播放器自动启动jQuery的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

雅虎有一个媒体播放器可以在网页上播放媒体:

Yahoo has a mediaplayer to play media on a webpage:


http://mediaplayer.yahoo.com/

但没有使其自动启动的选项。

but there is no option to make it auto start.

通过入侵代码使其自动启动的最佳方法是什么,或者它也可以使用jQuery点击其中一个媒体自动启动它,但是,你怎么知道雅虎代码已经完成初始化?我们可以使用 setTimeout(function(){// click first one},3000),但这似乎太过分了。

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.

推荐答案

有一个选项。

Plz检查此页 http://mediaplayer.yahoo.com/api/#example_usage

如果你设置autoplay:true,第一首歌曲将会启动自动..

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..

这篇关于使雅虎媒体播放器自动启动jQuery的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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