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.