Working With Playlists

This page includes the continued description from the Playing video and Playing audio pages. You are requested to go through the mentioned pages first to gain a better understanding of the following explanation.

It is possible to configure the Yendif Player playlist only through the JavaScript method. The following example will help you understand how you can add a playlist in your player:

A basic video playlist

// ensure DOM is ready
$(function () {

  // this will install yendifplayer into an element with id="player"
  $("#player").yendifplayer ({
    videos:[{
        mp4:"http://mydomain.org/video1.mp4",
        poster:"http://mydomain.org/poster1.jpg"
      },{
        mp4:"http://mydomain.org/video2.mp4",
        poster:"http://mydomain.org/poster2.jpg"
      },{
        mp4:"http://mydomain.org/video3.mp4",
        poster:"http://mydomain.org/poster3.jpg"
    }]
  });

});

A basic audio playlist

// ensure DOM is ready
$(function () {
 
  // this will install yendifplayer into an element with id="player"
  $("#player").yendifplayer ({
    audios:[
       {mp3:"http://mydomain.org/audio1.mp3"},
       {mp3:"http://mydomain.org/audio2.mp3"},
       {mp3:"http://mydomain.org/audio3.mp3"}
    ]
  });

});

On comparing playlists with the single media input formats, you will probably observe a minor difference. Literal notation {…} is used to add a single media. However, while creating a playlist, you have to use an array […] to add more than one audio/video objects.


Business Address

PLUGINSWARE INTERACTIVE PVT LTD
Door No 2A, Venkateshwara Nagar,
1st Main Road, Velachery, Chennai,
Tamilnadu, India
Pincode: 600042
© 2013 - 2024 Pluginsware Interactive Private Limited. All Rights Reserved. The Joomla! name and logo is used under a limited license granted in the United States and other countries.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.