Close video on error
This commit is contained in:
1 parent
2f2516eade
commit
92cfaf98a0
1 file changed
+6
-1
@@ -107,7 +107,11 @@ function OnVideoPlayerStateChange() as void
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function CloseVideoPlayer()
|
function CloseVideoPlayer()
|
||||||
m.top.RemoveChild(m.videoPlayer)
|
m.videoPlayer.control = "stop"
|
||||||
|
m.videoPlayer.visible = false
|
||||||
|
m.videoPlayer.getParent().RemoveChild(m.videoPlayer)
|
||||||
|
m.videoPlayer = invalid
|
||||||
|
m.top.focus = true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartVideoDetailsTask(videoId as string)
|
function StartVideoDetailsTask(videoId as string)
|
||||||
@@ -128,6 +132,7 @@ function StartVideoDetailsTask(videoId as string)
|
|||||||
m.videoPlayer.control = "play"
|
m.videoPlayer.control = "play"
|
||||||
else
|
else
|
||||||
print "FAILED TO LOAD VIDEO " + videoId
|
print "FAILED TO LOAD VIDEO " + videoId
|
||||||
|
CloseVideoPlayer()
|
||||||
end if
|
end if
|
||||||
end function)
|
end function)
|
||||||
end function
|
end function
|
||||||
|
|||||||
Reference in new issue
Block a user