Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

Latest commit

 

History

History

Player-AutoSwitch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Player-Auto-Switch

At OutChina, we want audience in/out China all be able to watch our content smoothly. But a well-known fact is that Youtube/Vimeo is not accesible in Mainland China.

Therefore, this code snippet use extreme-ip-lookup API to detect the country of the visitor, and then change the embeded iframe player according to the country code. If the vistor is in Mainland China, the embeded player will be Tencent Video instead of Youtube.

It works so smooth that the user won't feel it.