Results 1 to 2 of 2

Thread: Modify JWPlayer embed to support Android somehow

  1. #1
    Join Date
    Oct 2011
    Posts
    10

    Default Modify JWPlayer embed to support Android somehow

    OK, so I have read what a nightmare Android is. I'm also not a HTML hacker. But, I have got the following code working to support live streaming to IOS and Flash using JWPlayer 6. What I need now is a way to modify this block so that a stream shows up on Android. I know it won't be adaptive bitrate. But, I understand RTSP is the most likely way to get a stream to Android. So let's say I pick some arbitrary one of the underlying streams to feed to Android. Let's say it's this rtsp stream:

    rtsp://example.com:1935/live/mp4:mystream_360p

    How do I add that into the HTML code below to get it to show up on Android? I don't think this is a JWPlayer question, since they don't support RTSP streams. So, I'm presuming there has to be some way to get Android to show the stream independently of JWPlayer. Can I do this just in the HTML, or do I need some other embeddable player? If so, can you point me in that direction too. If you can suggest a solution, do you also have a sense of which Android OS versions it might work for? I'm really tearing my hair out.

    <!doctype html>
    <head>
    <script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
    </head>
    <body>
    <div id='my-video'></div>
        <script type='text/javascript'>
            jwplayer('my-video').setup({
                playlist: [{
                    sources : [
                    { file: 'http://example.com:1935/live/ngrp:mystream_all/playlist.m3u8' },
                    { file: 'http://example.com:1935/live/ngrp:mystream_all/jwplayer.smil' }
                    ],
                    title: "My Excellent Stream"
                }],
                width: '640',
                height: '360'
            });
        </script>
    </body>
    Last edited by roger_l; 07-31-2013 at 07:19 PM.

  2. #2

    Default

    Hi,

    The following should work.

    <!doctype html>
    <head>
    <script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
    </head>
    <body>
    <div id='my-video'><a href='rtsp://example.com:1935/live/mp4:mystream_360p'>My Excellent Stream</a></div>
        <script type='text/javascript'>
            jwplayer('my-video').setup({
                playlist: [{
                    sources : [
                    { file: 'http://example.com:1935/live/ngrp:mystream_all/playlist.m3u8' },
                    { file: 'http://example.com:1935/live/ngrp:mystream_all/jwplayer.smil' }
                    ],
                    title: "My Excellent Stream"
                }],
                width: '640',
                height: '360',
                fallback: false
            });
        </script>
    </body>
    The fallback: false part tells the javascript not to replace the contents of the div tag if it cannot render a player. This way your link is displayed instead.

    Roger.

Similar Threads

  1. Ondemand streaming on JWPlayer for Android
    By teej2542 in forum General Forum
    Replies: 1
    Last Post: 07-30-2014, 07:20 AM
  2. JWPlayer not loading on Android
    By AzuriteKevin in forum Live Streaming and Encoder Discussion
    Replies: 3
    Last Post: 05-24-2014, 12:05 AM
  3. Replies: 1
    Last Post: 03-09-2014, 11:14 AM
  4. video on demand streaming with jwplayer wowza android issue
    By taymoor in forum Media Players and Devices Discussion
    Replies: 3
    Last Post: 07-17-2013, 07:34 AM
  5. HTML5 Support with JWPLayer
    By arminz in forum General Forum
    Replies: 0
    Last Post: 11-09-2011, 10:28 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
  •