简体   繁体   中英

JwPlayer not playing rtmp stream?

i have setup Jwplayer like this in my html under the script tag:

<script type="text/javascript">

         jwplayer("container").setup({
            flashplayer: "js/jwplayer.flash.swf",
            file: "rtmp://localhost:1935/121/mystream.stream",
            height: 270,
            width: 506
             });

    </script>

but it is giving me a error like "No playble source found". But if check my live stream on online jw player,its working fine. And if i use a demo url "http://content.bitsontherun.com/videos/lWMJeVvV-364767.mp4" then my player is working fine.I dont know what wrong in this.Please help.

You need to put the player library in the head and the player embed code in the body. You can delete flashplayer: "js/jwplayer.flash.swf", altogether since the JW Player js library will determine whether the .swf file is necessary and include it under the hood.

More info on basic video embeds, including sample code here: https://support.jwplayer.com/customer/portal/articles/1406723

Is your stream at rtmp://localhost:1935/121/mystream.stream accessible from where you are hosting the web page? Based on the domain (localhost:1935) I would not expect this stream to be accessible by anyone on the internet outside of your local network.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM