diff --git a/source/Main.brs b/source/Main.brs index f57a3052..7ad21c8e 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -267,6 +267,12 @@ sub Main() wipe_groups() goto app_start end if + else if isNodeEvent(msg, "position") + video = msg.getRoSGNode() + if video.position >= video.duration then + video.control = "stop" + video.state = "finished" + end if else if isNodeEvent(msg, "fire") ReportPlayback(group, "update") else if isNodeEvent(msg, "state") diff --git a/source/ShowScenes.brs b/source/ShowScenes.brs index 1aaf27b3..41ba4ee8 100644 --- a/source/ShowScenes.brs +++ b/source/ShowScenes.brs @@ -348,6 +348,7 @@ function CreateVideoPlayerGroup(video_id) video.observeField("backPressed", m.port) video.observeField("state", m.port) + video.observeField("position", m.port) timer.control = "start" timer.observeField("fire", m.port)