Unable to play video on tvb.com via explicit proxy

book

Article ID: 168342

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

You cannot stream video on tvb.com, mytv.tvb.com, or news.tvb.com. In addition, you might receive one of the following errors:
  • In the browser: Video streaming only accessible within Hong Kong province
  • Unable to connect to server, please try again

Cause

1. Client IP address is not in Hong Kong
If you receive the error Video streaming only accessible within Hong Kong province in the browser and are accessing within Hong Kong province, you may also receive a message Sorry, due to copyright restrictions contract, it is not able to provide service in your area (displayed in Chinese language). 

As stated in the TVB FAQ, http://mytv.tvb.com/faq.html, video streaming is only accessible within Hong Kong province because HTTP X-forwarded-for is enabled. It provides the originating client IP address as the value, so that the upstream or origin content server (OCS) can track this information. In this case, it determined the requestor as not originating from an Hong Kong IP address.

2. Port 1935 restriction
If you receive the error Unable to connect to server, please try again, the media type of the application playing video streams on mytv.tvb.com uses x-shockwave-flash. Refer to http://helpx.adobe.com/adobe-media-server/kb/ports-firewalls-flash-media-server.html, as it's articular how flash player automatically attempts to connect to flash media server over multiple port that depending on the coding specified by the web site coder or administrator or webmaster. On the packet analysis, we notice that  Flash Player attempts to connect directly over tcp port 1935 . If a connection is not made, Flash Player attempts to connect directly using port 80.

3. Direct connection to OCS
For news.tvb.com, the connection tries to go direct to the OCS via HTTP or HTTPS.





 

Resolution

1. Install policy to not send the client IP address to the OCS.

<Proxy>
condition=MyTvTVB action.Tvb_Header(yes)

define condition MyTvTVB
    url.host.substring="mytv.tvb.com"
        url.domain="tvb.com"
end condition MyTvTVB

define action Tvb_Header
    delete(request.header.X-Forwarded-For)
end action Tvb_Header


2. Open port 1935 on the firewall to allow certain IP address(es) to use this port to communicate with mytv.tvb.com.

Note that RTMP traffic behavior cannot be changed at the browser level; it must either follow Proxy settings in the browser or go direct, depending on the coding specified by the web site administrator. You must allow TCP port 1935 for the client to directly access the server. You can also check Flash player port tester at http://helpx.adobe.com/adobe-media-server/kb/ports-firewalls-flash-media-server.html.

3. Force the Flash client to connect via HTTP/S.

Block TCP port 1935 (use RESET instead of DROP) to specific OCS IP address(es)) on the firewall and force the Flash client to try  HTTP or HTTPS to be able to hand off the RTMP proxy.

Please take note the live streaming at http://news.tvb.com/live/inews it's required to access directly RTMP port which is 1935.