yahoo-widgets

Processing dynamic MP3 URL

99封情书 提交于 2019-12-08 05:06:36
问题 I am using Yahoo Media Player for playing MP3 songs on my website. I have put some static MP3 links on site. For e.g. <a href='1.mp3'>Song1</a> <a href='2.mp3'>Song2</a> And I have put the YMP JavaScript API code also. Now, I want to load the songs dynamically... For example if user clicks on a button I want to load a complete new play list to the player. //Something like this var clickEventHandler = function(){ YMP.removeAllSongs(); YMP.addSongs(mp3_links); YMP.play(); } 回答1: This may help

Processing dynamic MP3 URL

二次信任 提交于 2019-12-06 15:53:32
I am using Yahoo Media Player for playing MP3 songs on my website. I have put some static MP3 links on site. For e.g. <a href='1.mp3'>Song1</a> <a href='2.mp3'>Song2</a> And I have put the YMP JavaScript API code also. Now, I want to load the songs dynamically... For example if user clicks on a button I want to load a complete new play list to the player. //Something like this var clickEventHandler = function(){ YMP.removeAllSongs(); YMP.addSongs(mp3_links); YMP.play(); } This may help you, use this: <script> /** On Yahoo Media API Ready **/ var yesReady = false; YAHOO.MediaPlayer.onAPIReady