Prevent playback after duration of video
This commit is contained in:
parent
dcc067f11a
commit
5f0513b12f
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user