diff --git a/src/components/NavBar/NavBar.bs b/src/components/NavBar/NavBar.bs index 57cd302c..c0c98792 100644 --- a/src/components/NavBar/NavBar.bs +++ b/src/components/NavBar/NavBar.bs @@ -27,7 +27,7 @@ function onKeyEvent(key as string, press as boolean) as boolean ' Can only escape to home screen, at index 1 allowedEscapes = { "1": true } if allowedEscapes[StrI(m.top.focusIndex).Trim()] = true - m.top.escapeIndex =m.top.focusIndex + m.top.escapeIndex = m.top.focusIndex m.top.focusIndex = -1 return true end if diff --git a/src/components/VideoPlayer/Video.bs b/src/components/VideoPlayer/Video.bs index 7dab8e50..b3d93697 100644 --- a/src/components/VideoPlayer/Video.bs +++ b/src/components/VideoPlayer/Video.bs @@ -107,7 +107,11 @@ function OnVideoPlayerStateChange() as void end function 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 function StartVideoDetailsTask(videoId as string) @@ -128,6 +132,7 @@ function StartVideoDetailsTask(videoId as string) m.videoPlayer.control = "play" else print "FAILED TO LOAD VIDEO " + videoId + CloseVideoPlayer() end if end function) end function