jwplayerjwplayer6jwplayer7

How can I play the multiple videos on complete function in jwplayer?


Play only one video and cannot play the second and third video.

jwplayer().onComplete(function() {
   jwplayer().load([                
   {                                    
     file: "video1.mp4",
     file: "video2.mp4",
     file: "video3.mp4"
  }                 
]);
 jwplayer().play();
});

Solution

  • You can create a playlist to load and play multiple videos in your player: https://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference#playlist.