mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Receivers: Start showDuration timer after media load
This commit is contained in:
parent
ec96201b2c
commit
205ec8bf23
1 changed files with 4 additions and 4 deletions
|
@ -78,6 +78,10 @@ function onPlayerLoad(value: PlayMessage) {
|
|||
logger.info('Media playback start:', cachedPlayMediaItem);
|
||||
window.targetAPI.sendEvent(new EventMessage(Date.now(), new MediaItemEvent(EventType.MediaItemStart, cachedPlayMediaItem)));
|
||||
player.play();
|
||||
|
||||
if (isMediaItem && cachedPlayMediaItem.showDuration && cachedPlayMediaItem.showDuration > 0) {
|
||||
showDurationTimeout = window.setTimeout(mediaEndHandler, cachedPlayMediaItem.showDuration * 1000);
|
||||
}
|
||||
}
|
||||
else {
|
||||
setIdleScreenVisible(true, false, value);
|
||||
|
@ -346,10 +350,6 @@ function onPlay(_event, value: PlayMessage) {
|
|||
player.setAutoPlay(true);
|
||||
player.load();
|
||||
}
|
||||
|
||||
if (isMediaItem && cachedPlayMediaItem.showDuration && cachedPlayMediaItem.showDuration > 0) {
|
||||
showDurationTimeout = window.setTimeout(mediaEndHandler, cachedPlayMediaItem.showDuration * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
// Sender generated event handlers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue