Media Player player list two methods of making

Source: Internet
Author: User

There are two ways to share the two media player player lists I know: The first is written in JS with the following code://Add URL function addmedia (URL) {//Player.controls.stop ();// Stop player//alert (player.versioninfo); Version information for the player//Gets the current playlist var playlist=player.currentplaylist;//creates a new media for the specified URL. var currmedia = player.newmedia (URL); Add the new media item to the player list Playlist.appenditem (Currmedia); }//Playlist function playlist () {if (player.settings.mediaaccessrights!= "full") {document.getElementById ("Player"). Settings.requestmediaaccessrights ("full"); } var playlist=player.currentplaylist; var currMedia1 = Player.newmedia ("http://127.0.0.1/us. wma"); var currMedia2 = Player.newmedia ("HTTP://127.0.0.1/will have tomorrow. mp3"); Playlist.appenditem (CURRMEDIA1); Playlist.appenditem (CURRMEDIA2); Addmedia ("HTTP://127.0.0.1/will have tomorrow. mp3"); Addmedia ("HTTP://127.0.0.1/will have tomorrow. mp3"); Player.controls.play (); When used, you only need to call the playlist () method. Note here: document.getElementById ("Player"). Settings.requestmediaaccessrights ("full");  to turn on media player Permission to use.

The second is to make a WPL file, and use Media Player to create a list of players that automatically produce files with the suffix WPL.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.