How to: RTMP + HLS stream playback

649 views
Skip to first unread message

koko...@gmail.com

unread,
Jun 5, 2015, 9:36:59 AM6/5/15
to jpl...@googlegroups.com
Just want to share my experience.
It is possible to play video stream (we use Wowza) on Windows, MacOS, iPad/iPhone. There is only one problem: on iPad autoplay is prohibited. So you need to allow nativeVideoControls for some platforms.

Here my script:

     <script type="text/javascript">
        $(function() { // executed when $(document).ready()
            $("#mediaplayer").jPlayer( {
                solution: "html,flash",
                supplied: "m3u8v,rtmpv",
                swfPath: "jplayer/jquery.jplayer.swf",
                fullWindow: true,
                preload: "auto",
                nativeVideoControls: {
                    apple: /(ipad|iphone|ipod)/
                },
                ready: function () {
                    $(this).jPlayer("setMedia", {
                        rtmpv: "rtmp://[server-ip]:1935/live/[stream-name]",
                        m3u8v: "http://[server-ip]:1935/live/[stream-name]/playlist.m3u8"
                    }).jPlayer("play"); // Attempts to Auto-Play the media                   
                },
               
                consoleAlerts: false,
                errorAlerts: true,
                warningAlerts: false
            });
        });
    </script>


Adrian Nicolaiev

unread,
Jun 5, 2015, 10:25:53 AM6/5/15
to jpl...@googlegroups.com
Thanks for sharing !!

--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jplayer+u...@googlegroups.com.
To post to this group, send email to jpl...@googlegroups.com.
Visit this group at http://groups.google.com/group/jplayer.
For more options, visit https://groups.google.com/d/optout.

Mark

unread,
Jun 7, 2015, 2:59:29 AM6/7/15
to jpl...@googlegroups.com

This is great. Thanks kokorin86!

Adrian Nicolaiev

unread,
Jun 7, 2015, 5:55:21 AM6/7/15
to jpl...@googlegroups.com
This information made me believe that it was worth trying to integrate jPlayer to NSBasic AppStudio.
Now, I can create my own UI (ugly at the moment, but doable), instead of using jPlayer CSS and skins.
With NSBasic, it was easy to make this example:
Source code here:
Better than that, it comes easier to compile iOS and Android (jPlayer) applications, using NSBasic and Phonegap.

HTH,

Adrian Nicolaiev

Michael Guandique

unread,
Nov 22, 2017, 1:09:41 PM11/22/17
to jPlayer: HTML5 Audio & Video for jQuery
Hi, thanks for sharing, but I have a problem,

I use the same code like you, and I changed only the id #mediaplayer for the default #jquery_jplayer_1 and change the parameters to "rtmp://tv.asamblea.gob.sv:80/flv:live/plenaria.flv" is hosted on the ADOBE servers i guess, it runing in with other players but no with jplayer.

¿Cand you help me please?

GerryLon

unread,
Apr 3, 2018, 5:00:16 AM4/3/18
to jPlayer: HTML5 Audio & Video for jQuery
Hello, below is my condition:
For preventing user download mp3 file directly, We converted mp3 to m3u8 with ffmpeg.
Then the question is:
How to play m3u8(converted from a mp3 file)?

many thanks!

在 2015年6月5日星期五 UTC+8下午9:36:59,koko...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages