1 parent
deeed05383
commit
e8fd7ee35d
13 files changed
+61
-27
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
@@ -6,6 +7,17 @@ namespace VideoUtils
|
||||
CloseVideo(false)
|
||||
|
||||
container = GetVideoContainer()
|
||||
' There should be no reason for this to be invalid, but there was a crash report
|
||||
' with this being invalid, so we'll abort playing a video and try to restore focus to the top screen
|
||||
if container = invalid
|
||||
LogError("VideoContainer not found! Attempting to restore focus to top screen...")
|
||||
appController = m.top.getScene().findNode("AppController")
|
||||
if appController <> invalid
|
||||
appController@.FocusTopScreen(invalid)
|
||||
end if
|
||||
DialogUtils.ShowDialog(`VideoContainer not found!\nPlease try again. If the problem persist, contact Playlet authors.`, "Error playing video")
|
||||
return
|
||||
end if
|
||||
videoPlayer = container.createChild("videoPlayer")
|
||||
videoPlayer.id = "VideoPlayer"
|
||||
videoPlayer@.BindNode(invalid)
|
||||
|
||||
Reference in new issue
Block a user