Note: this article is about THEOplayer 1.X.

Introduction

THEOplayer 1.X supports playlists by adding a list of media streams in the correct order to the player configuration. An example can be found below. The player will automatic load the next media stream as soon as the last one finishes playing.

When a playlist is configured, the playlist UI will be loaded - showing a list of all the media streams in the playlist. If a user clicks the next media or previous media button, the respective media stream will be loaded from the playlist.

Playlists can be combined with VAST configuration, as shown below, resulting in linear ads being loaded before the media stream starts playing. More advanced VAST configurations can be found on the VAST support page.

Configuration options

For the configuration of playlists in THEOplayer, the following configuration options are available:

Attribute Required Description
sources   An array containing all the media streams in the playlist
src   The media stream belonging to the item in the playlist, this can be both a HLS m3u8 manifest or a mp4 file.
poster   The poster image normally configured on the video tag. The poster of the first media item in the playlist will be displayed before playback starts. The poster will be displayed in the playlist UI.
title (optional) An accompanying title for the item in the playlist. This will be displayed in the playlist UI.
description (optional) An accompanying description for the item in the playlist. This will be displayed in the playlist UI.
ads (optional) Contains the VAST configuration accompanying the item in the playlist. Sub configuration options can be found on the VAST support page.
startTime (optional) The start time of the item's clipping window, in seconds. See the clipping support page for more information.
startFrame (optional) The start frame of the item's clipping window, in number of frames of the item's initial video quality.
endTime (optional) The end frame of the item's clipping window, in seconds.
endFrame (optional) The end frame of the item's clipping window, in number of frames of the item's initial video quality.

Examples

Below you can find a playlist configuration for THEOplayer. The second item contains a VAST configuration playing a pre-roll before playback of the content. The poster of the first item will be displayed on the page before playback starts.

theoplayer = {
    configuration : {
        playlist: {
            sources: [
                {
                    src : 'files/video1.mp4',
                    title: 'Tourism',
                    description: 'Tourism abroad',
                    poster: 'files/poster1.png',
                },
                {
                    src : 'streams/stream1.m3u8',
                    title: 'HTTP Live Streaming Demo Stream',
                    description: 'A video stream delivered over HLS, pre-roll advertisements delivered over VAST.',
                    poster: 'streams/poster1.png',
                    ads: {
                        vast : {
                            url : 'http://cdn.example.com/files/adsnetwork.xml',
                            skip: 3
                        },
                    }
                }
            ]
        }
    }
}

Support Table

This feature is supported on all browsers supported by THEOplayer.

Internet Explorer 10+

Internet Explorer 10+

Firefox

Firefox

Chrome

Chrome

Safari

Safari

Opera

Opera

Edge

Edge

Windows Phone

Windows Phone

Android

Android

iOS

iOS

Vivaldi

Vivaldi