• How to use LongTail JW Player 5 with Wowza Media Server

    Note: This article is for an older Wowza™ media server product or technology that either has been updated or is no longer supported. For the current version of this article, see How to use JW Player with Wowza Streaming Engine.
    This article describes how to use JW Player 5 to stream from the Wowza media server.

    Configuration


    Set up JW Player 5 by using one of the following methods:



    After you have JW Player working following any of the options, you can configure it for streaming by changing the "file" to a video or live stream that you want to display and adding "streamer" and "provider" Flashvars. For example, if you used the Embed Tag method, you would change this:
    <embed
      flashvars="file=/data/bbb.mp4"
      allowfullscreen="true"
      allowscripaccess="always"
      id="player1"
      name="player1"
      src="player.swf"
      width="480"
      height="270"
    />
    To this for a video on demand stream:
    <embed
      flashvars="file=sample.mp4&streamer=rtmp://localhost:1935/vod&provider=rtmp"
      allowfullscreen="true"
      allowscripaccess="always"
      id="player1"
      name="player1"
      src="player.swf"
      width="480"
      height="270"
    />
    And to this for a live stream:
    <embed
      flashvars="file=myStream&streamer=rtmp://localhost:1935/live&provider=rtmp"
      allowfullscreen="true"
      allowscripaccess="always"
      id="player1"
      name="player1"
      src="player.swf"
      width="480"
      height="270"
    />
    The following example shows how to implement the JW Player HTML5 fallback for iOS devices for Apple HTTP Live Streaming (Apple HLS/Cupertino):
    <html>
    <head>
    <title>JW Player Fallback</title>
    </head>
    
    <body>
    <script type='text/javascript' src='jwplayer.js'></script>
    
    <div id='mediaplayer'></div>
    
    <script type="text/javascript">
      jwplayer('mediaplayer').setup({
        'id': 'playerID',
        'width': '480',
        'height': '270',
        'provider': 'rtmp',
        'streamer': 'rtmp://[wowza-address]:1935/vod',
        'file': 'sample.mp4',
        'modes': [
            {type: 'flash', src: 'player.swf'},
    	{type: 'html5', config:
    		{
    		'file': "http://[wowza-address]:1935/vod/mp4:sample.mp4/playlist.m3u8",
    		provider: 'video'
    		}
    	}
        ]
      });
    </script>
    </body>
    </html>

    Originally Published: 10-02-2010.