The following is a list of limitations and ways to work around them. Note that the Javascript API is documented at http://mediaplayer.yahoo.com/api/
Auto-start:
- The autoplay:true element in the sample code for the API. Dynamic content:
- The player is designed for web pages with static media content. If media links are added dynamically they will not be auto-discovered and added to the global play queue. Similarly, if they are removed dynamically they will not be purged from the global play queue.
- To get dynamically added content represented in the player, you can use this function call, where documentNodeContainingNewlyAddedContent is an element containing all new content:
YAHOO.MediaPlayer.addTracks(documentNodeContainingNewlyAddedContent );
- Keep in mind the "API" may change so this can potentially break in the future. --Paul.irish 15:56, 10 January 2008 (UTC)
- Documentation updated with new API. --Paul.irish 23:14, 1 December 2008 (UTC)
- Keep in mind the "API" may change so this can potentially break in the future. --Paul.irish 15:56, 10 January 2008 (UTC)
- MJJames has written up an article on Using Yahoo! Media Player on a dynamic page
--Lucas gonze 17:33, 29 December 2008 (UTC)
Cross-domain access:
- For the player to access a playlist accessible outside of the same-origin security policy, you have to add "class="playthispage" to the playlist link. Let's say you have a web page at http://foo.com and a playlist at http://bar.com/my.xspf. You would make it work like this:
<a href="http://bar.com/my.xspf" class="playthispage">my playlist is on another site</a>