jhooda / google-cast-sdk

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

Closed captions timing out of sync with video #617

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Setup and play a video via chromecast
we are using DASH streams.

2. set and enable closed captions
done with:
mediaPlayer.enableCaptions(true, 'webvtt', captionsUrl);

What is the expected output? 
Expected output is captions displaying at correct times.

What do you see instead?
We see captions displaying about 8 seconds behind the video content, I have 
verified the webvtt file content is correct.  The captions are displaying at 
the wrong time however.

for example: video time is displayed as 1:40, but captions from 1:30 are 
showing. Have verified by looking in the webvtt file.

What version of the product are you using? On what operating system?
Using the latest custom receiver and video player libraries from the cast 
developer documents.
eg.
//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js
//www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js

Please provide any additional information below.
Maybe worth noting that the mediaElement.currentTime looks correct but if I 
console.log the mediaManager and check inside the #video element, the time 
differs from what the mediaElement is logging by around 8-10 seconds.

Original issue reported on code.google.com by jason.wi...@accedo.tv on 22 Jul 2015 at 6:58

GoogleCodeExporter commented 8 years ago
1) For which senders are you seeing this issue? Are you using a specific sender 
app?
2) Does this happen for all streams/webvtt files or only certain ones?
3) Can you provide some of the streams and webvtt files where you're seeing 
this issue?
4) Was it working correctly at a previous point in time?

Feel free to add any other information you think would be useful.

Original comment by jonathan...@google.com on 22 Jul 2015 at 4:46

GoogleCodeExporter commented 8 years ago
Hi Jonathan,

Thank you for your time, the issue has been resolved locally by changing the 
implementation to use a different method.

eg. we are now using

var trackElement = document.createElement('track');
trackElement.src = captionsUrl;
mediaElement.appendChild(trackElement);

instead of:

mediaPlayer.enableCaptions(true,'webvtt', captionUrl);

Original comment by jason.wi...@accedo.tv on 23 Jul 2015 at 7:08

GoogleCodeExporter commented 8 years ago
Glad to hear you were able to resolve the issue. I'll close the ticket now.

Original comment by jonathan...@google.com on 23 Jul 2015 at 4:31