[RTMP]JWPLAYER: Could not connect to server

jwplayer-could-not-connect-to-server

Days ago, I reinstalled nginx + nginx-rtmp-module on my notebook, and had it tested in my local environment with firefox and VLC player, made sure it worked(You can refer to this post for guide: http://rg4.net/archives/1414.html).

However, when I tried to redo the working on my VPS, only to find that it failed to connected to the stream with JWPlayer.I was once wandering maybe its because of the limitation of my VPS provider for the VPS, but when I searched through the internet, learned that it could be a common issue.

And I found a troubleshooting page on JWPLAYER website(http://www.longtailvideo.com/support/jw-player/28840/troubleshooting-your-setup/), according to its description, this could also be a configuration issue.

Error loading stream:Could not connect to server

jwplayer-could-not-connect-to-server
jwplayer-could-not-connect-to-server

This means that your RTMP server could not be reached. Ensure you inserted the right domain and the right application path. Also ensure port 1935 and/or RTMP traffic is not blocked by your proxy or firewall.

I’ll test it later.

20140426 Update:

Finally got the time to return back this issue, thought it could be nginx.conf relavant, turns out its only because the sample html files filled a fixed host name: localhost.

So all you need to do is modify the html files which was copy from the test folder of nginx-rtmp-module, and change the “localhost” to a proper domain name or host name, or simply replace it with the server IP address.

Here is an example:

filename-index-htmlAnd maybe you need to modify all the test HTML files attached by nginx-rtmp-module which could include:

  • rtmp-publisher/publisher.html
  • rtmp-publisher/player.html
  • www/index.html
  • www/record.html

 

Author: Jacky Wei

I am a programmer, welcome to my blog: http://rg4.net.

Leave a Reply

Your email address will not be published. Required fields are marked *