ashley1982 / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Switching between different webvtt subtitle file by setting the track tag does not always work #603

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We are using a custom receiver app with MPL 1.0 and Receiver app 2.0.0
We use HLS for streaming video and use webvtt for subtitles.

We have multiple subtitle files(webvtt) for a given video and the way we allow 
the user to switch between languages is set the src and srcLang attribute of 
the track tag with the url to the corresponding webvtt file.

However,we have found that some webvtt files work great like -
https://www.dramafever.com/st/subtitle/4712_1_en.vtt

But when we switch from one language English to Chinese, by setting the track 
tag, the subtitles don't appear.
Also sometimes chromecast freezes soon after and crashes.
Again when scrubbed to some other timestamp in the video and the subtitles are 
switched the subtitles appear.

<track id="track" kind="subtitles" default="" 
src="https://www.dramafever.com/st/subtitle/SensoryCouple_08_chs_MT.vtt" 
srclang="zh-cn"></track>

Here's the console log with the above exercise -
https://gist.github.com/taher007saeed/42a0691cfec2d6b4516f

Can you let me know the best way to handle this?

Original issue reported on code.google.com by ta...@dramafever.com on 25 Jun 2015 at 5:52

GoogleCodeExporter commented 9 years ago

Original comment by jonathan...@google.com on 26 Jun 2015 at 11:53

GoogleCodeExporter commented 9 years ago
1) Does this issue occur when you switch to another language track besides 
Chinese? 
2) why did you decide to use "zh-cn" for the srclang? What happens when you use 
just "zh"?
3) Does this issue still occur when you have set the Chinese subtitles as the 
default and try to switch to a different language track?
4) Just to clarify, are you saying that when you scrub to some other timestamp 
and try to change from a non-Chinese subtitle track to a Chinese one, it 
successfully displays the Chinese subtitles? Does this still happen after a 
failed attempt at switching to a Chinese track, before attempting to switch, or 
both?

Original comment by jonathan...@google.com on 27 Jun 2015 at 12:34

GoogleCodeExporter commented 9 years ago
1) Does this issue occur when you switch to another language track besides 
Chinese?

Yes

2) why did you decide to use "zh-cn" for the srclang? What happens when you use 
just "zh"?

I will have to try that, but most probably will not fix it.

3) Does this issue still occur when you have set the Chinese subtitles as the 
default and try to switch to a different language track?

Yes

4) Just to clarify, are you saying that when you scrub to some other timestamp 
and try to change from a non-Chinese subtitle track to a Chinese one, it 
successfully displays the Chinese subtitles? Does this still happen after a 
failed attempt at switching to a Chinese track, before attempting to switch, or 
both?

Yes, Switching the language (i.e. setting the src of the track tag) at 
different timestamps works.
This is not specific to Chinese only happens with English as well.

Steps to reproduce -

You can try it out on our iOS app - DramaFever - Dramas & Movies is already on 
the iOS AppStore.

Test credentials - itunestest / t3st3r

Try casting Orange Marmalade Ep 1 from the Featured Screen and try switching 
the language from English to Portuguese. Subtitles for Portuguese do not appear.

Original comment by ta...@dramafever.com on 29 Jun 2015 at 2:54

GoogleCodeExporter commented 9 years ago
Any updates on the above issue.

Original comment by ta...@dramafever.com on 14 Jul 2015 at 4:17