I won't down-vote this question but I think it's not quite a question about Chinese language. I guess just guess you are slow because the server-end is designed not to respond to the request from overseas rapidly. When someone in China uses proxy to access to overseas sites, he would find he could not access some domestic sites. I'm in China. Yet Youtube is far faster than youku. Just have to make do with it. Youku sucks. I won't down-vote this question but I want to down-vote the up-vote. To the up-voter: this is not a BBS!
The topic seems to be off topic, but I think the answer gets up-voted because it provides a good source of learning Chinese. Add a comment. Active Oldest Votes.
You should also be aware that they are progressively locking down content on these sites from overseas - they don't want people accessing illegal content from abroad - so long term they aren't your best bet for getting learning material Check out sites like CNTV - it seems to load fairly quickly for me at least, and they are actively promoting it to international users as part of the 'soft power' aspect of growing China.
Improve this answer. Ciaocibai Ciaocibai 4, 7 7 gold badges 28 28 silver badges 58 58 bronze badges. I hit this issue this morning and am searching for solutions so found this question.
I found that when accessing the website from my home WIFI, it's deadly slow. So it cannot be the case like what you said. Hopefully, someone with the real knowledge could see this question and answer it within comments. Featured on Meta. Now live: A fully responsive profile. Version labels for answers. Related 4. Since I'm not familiar with other cloud providers for China, let me describe a solution for Alibaba Cloud.
What about using the client's time zone? While not perfect, it would allow you to avoid relying on timeouts or any geoip service requests altogether. If possible, I would avoid an approach that might result in many, repeated calls to the same blocked resource from the same address block e. There are also libraries jsTimezoneDetect and moment-timezone that combine the above along with the getTimezoneOffset function of Date across multiple points in time, to make an educated guess of time zone, which may yield better results with older browsers:.
HLS helps adapting the resolution to the internet speed. If you combine this with the free hls. The bandwidth is specified in bits per second, the quality order does not matter as the mediaplayer chooses which resolution to play.
The underscore is used for readability. Explaination of the comments: -hwaccel dxva2 means that ffmpeg will use hardware acceleration using directx, this is available from windows vista and up. This command for ffmpeg generates 6 quality levels but does not create the master playlist. The master playlist is a playlist with playlist per bandwidth see above , depending on the internet speed the hls player chooses which playlist of video fragments to play.
To make the detection process faster you could first try to extract locale information from the browser package installation language:. Another path that might be combined with the above solution is to grab some string from the user environment or the browsing context window. I believe this will get you a very good approximation without making extra requests.
As an example in my Firefox browser a call too Date. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 3 years, 3 months ago. Active 2 years, 2 months ago. Viewed 2k times. Improve this question. Dan Kohn Dan Kohn By keeping a common code base for all, you can make a separate cartridge for china, and write the youku code for your video in that cartridge, whenever user hits the URL, if the URL contains the id for the Chinese locale, then that code can override the default code.
You should check for it only once and keep the result in a cookie, so a visitor only needs to wait for the first time he visits the site. If this video is not on the front page, by the time he makes it to the conference video, you can have it checked trying to access youtube and set the cookie.
Thanks, but video is only on the front page. Don't you have CDN settings for that? Can you just push the youku-first version of scripts to CDN nodes near China users? Add a comment. Active Oldest Votes. Edit: revised to add a 5 second timeout. Improve this answer. GrantWinney, it looks like an answer until you read the question. GrantWinney the way OP is currently doing it is not an answer, it is part of the question. And I don't think OP was asking how can i select the jQuery element , please don't judge a question just reading the title.
It is the answer we're planning to go with. I remain open to hearing a better one. Munim Munna Munim Munna This is very clever. But, Youku is still almost certainly a better choice for them. In that case use a cache burster url for favicon so that it always gets downloaded eg. Do you know of a site that does? I see two possible options for you: use their CDN Service and create two JS bundles - one for China and second for the rest of the world.
The first one will embed video from Youku and second - from Youtube. This way you can create multiple videos of different quality and distribute them near your users.
JS will embed the video directly from CDN. For one video this might be an overkill.
0コメント