diff --git a/components/manager/QueueManager.bs b/components/manager/QueueManager.bs index 8dcc921ba..2cd5d7c40 100644 --- a/components/manager/QueueManager.bs +++ b/components/manager/QueueManager.bs @@ -120,6 +120,8 @@ sub playQueue() nextItemMediaType = getItemType(nextItem) if nextItemMediaType = "" then return + startLoadingSpinner() + if nextItemMediaType = "audio" CreateAudioPlayerView() return @@ -149,6 +151,8 @@ sub playQueue() CreateVideoPlayerView() return end if + + stopLoadingSpinner() end sub ' Remove item at end of play queue diff --git a/components/manager/ViewCreator.bs b/components/manager/ViewCreator.bs index 763834432..215c657fe 100644 --- a/components/manager/ViewCreator.bs +++ b/components/manager/ViewCreator.bs @@ -2,6 +2,7 @@ sub CreateAudioPlayerView() m.view = CreateObject("roSGNode", "AudioPlayerView") m.view.observeField("state", "onStateChange") + stopLoadingSpinner() m.global.sceneManager.callFunc("pushScene", m.view) end sub @@ -25,6 +26,7 @@ sub CreateVideoPlayerView() m.getPlaybackInfoTask.videoID = mediaSourceId m.getPlaybackInfoTask.observeField("data", "onPlaybackInfoLoaded") + stopLoadingSpinner() m.global.sceneManager.callFunc("pushScene", m.view) end sub diff --git a/source/utils/misc.bs b/source/utils/misc.bs index 3cb48ed96..a1319a9b4 100644 --- a/source/utils/misc.bs +++ b/source/utils/misc.bs @@ -452,6 +452,9 @@ function toString(input) as string end function sub startLoadingSpinner() + if not isValid(m.scene) + m.scene = m.top.getScene() + end if m.spinner = createObject("roSGNode", "Spinner") m.spinner.translation = "[900, 450]" m.spinner.visible = true @@ -467,6 +470,9 @@ sub startMediaLoadingSpinner() end sub sub stopLoadingSpinner() + if not isValid(m.scene) + m.scene = m.top.getScene() + end if if isValid(m.spinner) m.spinner.visible = false end if