问题
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.
回答1:
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
回答2:
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.
来源:https://stackoverflow.com/questions/37544633/jwplayer-not-playing-rtmp-stream