Fit more error info in the dialog when videos fail
This commit is contained in:
1 parent
e4870a752b
commit
151e108183
6 files changed
+20
-7
No files matched your search
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Slightly more information in the error dialog when videos fail to play
|
||||||
|
|
||||||
## [0.10.3] - 2023-07-24
|
## [0.10.3] - 2023-07-24
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
|
|
||||||
<component name="Dialog" extends="StandardMessageDialog" >
|
|
||||||
</component>
|
|
||||||
@@ -3,13 +3,16 @@ function ShowDialog(message as dynamic, title as string) as object
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function ShowDialogButtons(message as dynamic, title as string, buttons as object) as object
|
function ShowDialogButtons(message as dynamic, title as string, buttons as object) as object
|
||||||
dialog = CreateObject("roSGNode", "Dialog")
|
dialog = CreateObject("roSGNode", "SimpleDialog")
|
||||||
if GetInterface(message, "ifArray") = invalid
|
if GetInterface(message, "ifArray") = invalid
|
||||||
message = message.Tokenize(UnixNL()).ToArray()
|
message = message.Tokenize(UnixNL()).ToArray()
|
||||||
end if
|
end if
|
||||||
dialog.message = message
|
dialog.message = message
|
||||||
dialog.title = title
|
dialog.title = title
|
||||||
dialog.buttons = buttons
|
dialog.buttons = buttons
|
||||||
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
|
displaySize = deviceInfo.GetDisplaySize()
|
||||||
|
dialog.width = displaySize.w - 100
|
||||||
m.top.getScene().dialog = dialog
|
m.top.getScene().dialog = dialog
|
||||||
return dialog
|
return dialog
|
||||||
end function
|
end function
|
||||||
File renamed without changes.
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<component name="SimpleDialog" extends="StandardMessageDialog">
|
||||||
|
</component>
|
||||||
@@ -337,12 +337,16 @@ function OnVideoPlayerStateChange() as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
if state = "error"
|
if state = "error"
|
||||||
|
messageLines = []
|
||||||
|
messageLines.push(`errorMsg: ${m.top.errorMsg}`)
|
||||||
|
messageLines.push(`errorCode: ${m.top.errorCode}`)
|
||||||
|
messageLines.push(`errorStr: ${m.top.errorStr}`)
|
||||||
|
|
||||||
errorInfo = m.top.errorInfo
|
errorInfo = m.top.errorInfo
|
||||||
messageLines = [`VideoId: ${m.top.videoId}`]
|
|
||||||
for each info in errorInfo
|
for each info in errorInfo
|
||||||
messageLines.push(`${info}: ${errorInfo[info]}`)
|
messageLines.push(`${info}: ${errorInfo[info]}`)
|
||||||
end for
|
end for
|
||||||
ShowDialog(messageLines, "Error playing video")
|
ShowDialog(messageLines, `Error playing video ${m.top.videoId}`)
|
||||||
CloseVideo()
|
CloseVideo()
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|||||||
Reference in new issue
Block a user