Control Embedded Grooveshark Widgets using Javascript?

萝らか妹 提交于 2019-12-07 14:24:58

问题


How would I play/pause an embedded Grooveshark widget using Javascript?

Would like to play separate single-song widgets in sequence, ala separate tracks on a soundcloud user's page.

I didn't see anything officially supported, and couldn't find anything via googling.


回答1:


I took a quick glance at the decompiled actionscript and turned up the following ExternalInterface callbacks:

getVersion()
getCurrentSong()
setSongCompleteCallback(string)
setErrorCallback(string)
setStatusCallback(string)
setSongChangeCallback(string)
playSong()
pauseSong()
resumeSong()
stopSong()
replaceSongs(array)

In theory, you should be able to do something like the following:

widget.stopSong();


来源:https://stackoverflow.com/questions/6823523/control-embedded-grooveshark-widgets-using-javascript

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