Media Players
The Widget Framework currently supports three players for audio/video playback: JW Player, Flowplayer and MediaElement.js. The players can be used as follows:
-
JW Player for audio, video and live streams
-
Flowplayer for video only
-
MediaElement.js for audio only
Audio/video playback using any of these players is supported by:
- Media widget
-
Can be used to play audio, video and live streams using the embedded player on content item pages.
- Teaser widget
-
Can be used to play audio, video and live streams in several modes (embedded, pop-up and so on) on both content item pages and section pages.
- Teaser view
-
Can be used to play audio, video and live streams in several modes (embedded, pop-up and so on) on both content item pages and section pages.
Most of the media player configuration parameters are set in a
configuration layer object called FrontEndConfig
.
This is a special configuration layer object that is able to expose its
properties both in publications' application configuration layers and
also in the browser, where they can be accessed using Javascript. For
more information about this, see
Expose Properties to JavaScript.
Not that whichever media player you use, video playback will not work
unless you have added a MediaInfoServlet
servlet
declaration to your publication's web.xml
file. See
Enabling Video Playback for details.
Player selection
You specify the default player(s) you want to use by adding the
following properties to a properties file in the common configuration
layer. Open
configuration-root/com/escenic/framework/frontend/FrontEndConfig.properties
(or create if it does not exist) and add the following properties:
property.videoPlayer=video-player property.audioPlayer=audio-player
where:
- video-player
-
Is set to either
jwplayer
orflowplayer
. The default value isflowplayer
. - audio-player
-
Is set to either
jwplayer
ormediaelement
. The default value ismediaelement
.
Specifying these properties in the common configuration layer sets the default media players for all your publications. If you need to use different media players in different publications, you can achieve this by specifying the properties in your publication configuration layers instead of (or as well as) in the common configuration layer. (See Expose Properties to JavaScript for details of how to create publication configuration layers.)
It is also possible to override these settings by creating custom media player configurations for use on specific pages or with specific widgets. For details, see Custom Media Player Configurations.