Results 1 to 2 of 2

Thread: JWPlayer file parameter problem

  1. #1

    Default JWPlayer file parameter problem

    Hi,

    I use JWPlayer to play live video from my Wowza server.

    Problem:

    If I use

    file with a value "mystream.stream" the player will fail

    file with a value "full path to live stream" the player will play

    Here example:

    1. Example FAILS
    <div id='mediaplayer'></div>
    
    <script type="text/javascript">
      jwplayer('mediaplayer').setup({
        'id': 'playerID',
        'width': '480',
        'height': '270',
        'provider': 'rtmp',
        'streamer': 'rtmp://my.server.com/application',
        'file': 'myCool.stream',
        'image': 'http://example.com/thumbs/sintel.jpg',
        'modes': [
            {type: 'flash', src: 'player.swf'},
            {
              type: 'html5',
              config: {
               'file': '/videos/sintel.mp4',
               'provider': 'video'
              }
            },
            {
              type: 'download',
              config: {
               'file': '/videos/sintel.mp4',
               'provider': 'video'
              }
            }
        ]
      });
    </script>
    2. Example WORKS
    <div id='mediaplayer'></div>
    
    <script type="text/javascript">
      jwplayer('mediaplayer').setup({
        'id': 'playerID',
        'width': '480',
        'height': '270',
        'provider': 'rtmp',
        'streamer': 'rtmp://my.server.com/application',
        'file': ''rtmp://my.server.com/application/flv:myCool.stream',
        'image': 'http://example.com/thumbs/sintel.jpg',
        'modes': [
            {type: 'flash', src: 'player.swf'},
            {
              type: 'html5',
              config: {
               'file': '/videos/sintel.mp4',
               'provider': 'video'
              }
            },
            {
              type: 'download',
              config: {
               'file': '/videos/sintel.mp4',
               'provider': 'video'
              }
            }
        ]
      });
    </script>
    Thanks,
    Any help appreciated

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    There is just one string for rtmp connection and stream name in JW Player 6. Here is a simple example that includes iOS:

    <html>
    <head>
    <title>JW Player 6</title>
    
    <script type="text/javascript" src="/jwplayer/jwplayer.js" ></script>
    <script>jwplayer.key="[key]"</script>
    </head>
    
    <body>
    
    <div id="player">Loading the player...</div>
    
    <script type="text/javascript">
        jwplayer("player").setup({
       	sources: [{
                file: "rtmp://localhost/vod/mp4:sample.mp4"
            },{
                file: "http://192.168.1.25:1935/vod/sample.mp4/playlist.m3u8"
            }]
        });
    </script>
    </body>
    </html>
    Also take a look at JW Player setup wizard:
    http://www.longtailvideo.com/jw-player/wizard/#rtmp

    Richard

Similar Threads

  1. jwplayer.smil file and Labels
    By James nNewman in forum Live Streaming and Encoders
    Replies: 3
    Last Post: 06-04-2015, 08:05 AM
  2. jwplayer 6 pre-roll video xml file
    By manyblue in forum Media Players and Devices
    Replies: 4
    Last Post: 03-14-2014, 06:43 AM
  3. can not play live stream recorded file in jwplayer
    By malarprathap in forum Video On Demand Streaming Discussion
    Replies: 4
    Last Post: 02-14-2013, 07:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •