diff --git a/components/JFVideo.brs b/components/JFVideo.brs index 1c011ed9..7054bfd6 100644 --- a/components/JFVideo.brs +++ b/components/JFVideo.brs @@ -123,11 +123,10 @@ sub onState(msg) m.top.retryWithTranscoding = true ' If playback was not reported, retry with transcoding else ' If an error was encountered, Display dialog - dialog = createObject("roSGNode", "Dialog") + dialog = createObject("roSGNode", "PlaybackDialog") dialog.title = tr("Error During Playback") dialog.buttons = [tr("OK")] dialog.message = tr("An error was encountered while playing this item.") - dialog.observeField("buttonSelected", "dialogClosed") m.top.getScene().dialog = dialog end if @@ -208,11 +207,10 @@ sub bufferCheck(msg) m.top.callFunc("refresh") else ' If buffering has stopped Display dialog - dialog = createObject("roSGNode", "Dialog") + dialog = createObject("roSGNode", "PlaybackDialog") dialog.title = tr("Error Retrieving Content") dialog.buttons = [tr("OK")] dialog.message = tr("There was an error retrieving the data for this item from the server.") - dialog.observeField("buttonSelected", "dialogClosed") m.top.getScene().dialog = dialog ' Stop playback and exit player @@ -223,14 +221,6 @@ sub bufferCheck(msg) end sub -' -' Clean up on Dialog Closed -sub dialogClosed(msg) - sourceNode = msg.getRoSGNode() - sourceNode.unobserveField("buttonSelected") - sourceNode.close = true -end sub - function onKeyEvent(key as string, press as boolean) as boolean if key = "OK" and m.nextEpisodeButton.hasfocus() and not m.top.trickPlayBar.visible diff --git a/components/PlaybackDialog.brs b/components/PlaybackDialog.brs new file mode 100644 index 00000000..3665c241 --- /dev/null +++ b/components/PlaybackDialog.brs @@ -0,0 +1,9 @@ +function onKeyEvent(key as string, press as boolean) as boolean + + if key = "OK" + m.top.close = true + return true + end if + + return false +end function diff --git a/components/PlaybackDialog.xml b/components/PlaybackDialog.xml new file mode 100644 index 00000000..6966e5d2 --- /dev/null +++ b/components/PlaybackDialog.xml @@ -0,0 +1,6 @@ + + + + +