The JW Player 5 Beta is considered to be pre-release software. The documentation below can (and will) change to reflect ongoing development.
JW Player: Media Providers
Media Providers enable the player to consume different media types over various platforms. Setting the provider property (previously called type in version 4) through flashvars or in a playlist instructs the player to use the corresponding Media Provider.
Built-in Media Providers
The player contains the following built-in Media Providers:
- video: progressively downloaded FLV / MP4 video. (Please note, AAC audio requires the video Media Provider).
- http: FLV/MP4 videos played as http pseudo-streaming.
- rtmp: FLV/MP4/MP3 files played from an RTMP server.
- sound: progressively downloaded MP3 files.
- image: GIF/JPG/PNG images.
- youtube: videos from YouTube.
Externally Loaded Media Providers
In addition to the listed Media Providers, additional content types may be loaded into the player by means of external Media Providers. There are two ways external Providers can be loaded; if the provider contains a URL pointing to a .swf file containing a Media Provider, that file is loaded. If the provider contains the name of a LongTail-hosted Provider, that is loaded instead.
Examples
The following examples demonstrate different ways of using Media Providers
Single playlist item
<config> <file>myvideo.flv</file> <provider>video</provider> </config>
Multiple playlist items
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats"> <channel> <title>Example media RSS playlist</title> <item> <title>FLV Video</title> <media:content url="video.flv" /> <jwplayer:provider>video</jwplayer:provider> </item> <item> <title>HTTP Streamed FLV</title> <media:content url="video.flv" /> <jwplayer:provider>http</jwplayer:provider> <jwplayer:streamer>http://myserver.com/stream.php</jwplayer:streamer> </item> </channel> </rss>
Loading an External Media Provider
<config> <file>myvideo</file> <provider>http://www.mysite.com/providers/myprovider.swf</provider> </config>
CDNs
The http and rtmp Providers can be customized with several configuration options to allow them to connect to content delivery networks (CDNs) and RTMP servers. These options can be set using flashvars or an xml configuration file.
HTTP options
- http.startparam
- For BitGravity: starttime
- For EdgeCast: ec_seek
- For FlvSeek: fs
- For Lighttpd: start
Example MRSS playlist:
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats"> <channel> <title>Example media RSS playlist</title> <item> <title>BitGravity Video</title> <media:content url="video.flv" /> <jwplayer:provider>http</jwplayer:provider> <jwplayer:streamer>path_to_bitgravity_streamer</jwplayer:streamer> <jwplayer:http.startparam>starttime</jwplayer:http.startparam> </item> <item> <title>Lighttpd Video</title> <media:content url="video.flv" /> <jwplayer:provider>http</jwplayer:provider> <jwplayer:streamer>http://myserver.com/stream.php</jwplayer:streamer> <jwplayer:http.startparam>start</jwplayer:http.startparam> </item> </channel> </rss>
RTMP options
- rtmp.loadbalance
- For Highwinds: true
- For VDOX: true
Example MRSS playlist:
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats"> <channel> <title>Example media RSS playlist</title> <item> <title>Highwinds Video</title> <media:content url="video.flv" /> <jwplayer:provider>rtmp</jwplayer:provider> <jwplayer:streamer>path_to_highwinds_streamer</jwplayer:streamer> <jwplayer:rtmp.loadbalance>true</jwplayer:rtmp.loadbalance> </item> <item> <title>VDOX Video</title> <media:content url="video.flv" /> <jwplayer:provider>rtmp</jwplayer:provider> <jwplayer:streamer>path_to_vdox_streamer</jwplayer:streamer> <jwplayer:rtmp.loadbalance>true</jwplayer:rtmp.loadbalance> </item> </channel> </rss>
