As you can see on following capture, the current time is incorrect for live streams. How can I overload or hide it ?
Asked
Active
Viewed 369 times
1
-
Can you share the stream? – Sreenu Yatam Feb 17 '18 at 01:14
-
Sorry I can't and it won't work outside the country. – Hrk Feb 17 '18 at 18:26
2 Answers
1
Please check if currentTime in the receiver (just for live content) is expressed as Unix epoch time. If so you just need to convert it to a valid value. Try this on the receiver:
var now = new Date();
var timenow = new Date(now).getTime() / 1000;
var seektime = timenow - requestData.currentTime();
requestData.currentTime(requestData.duration() - seektime);

Emanuele Tido
- 213
- 1
- 4
0
I've found the following workaround on the receiver side: I send "0" as duration if the value is too high. It's not clean and the counter progress on sender side, but if someone have a better idea why the receiver has incorrect time in Live stream, you're welcome !
playerManager.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS, initTextType);
function initTextType(requestData) {
// update stream current time if LIVE
if (requestData.currentTime > 18000) {
requestData.currentTime = 0;
console.log('~> adjust current time for LIVE streams');
}
}

Hrk
- 2,725
- 5
- 29
- 44