Remove "unobserve position" in JFVideo
JFVideo now always observes position. "Next Episode" button is displayed only if content type is "episode"
This commit is contained in:
parent
15a25b14df
commit
3b7f7d7f82
|
@ -68,29 +68,27 @@ sub onContentChange()
|
|||
m.top.observeField("position", "onPositionChanged")
|
||||
|
||||
' If video content type is not episode, remove position observer
|
||||
if m.top.content.contenttype <> 4
|
||||
m.top.unobserveField("position")
|
||||
end if
|
||||
' if m.top.content.contenttype <> 4
|
||||
' m.top.unobserveField("position")
|
||||
' end if
|
||||
end sub
|
||||
|
||||
sub onNextEpisodeDataLoaded()
|
||||
m.checkedForNextEpisode = true
|
||||
|
||||
m.top.observeField("position", "onPositionChanged")
|
||||
|
||||
if m.getNextEpisodeTask.nextEpisodeData.Items.count() <> 2
|
||||
m.top.unobserveField("position")
|
||||
end if
|
||||
end sub
|
||||
|
||||
'
|
||||
' Runs Next Episode button animation and sets focus to button
|
||||
sub showNextEpisodeButton()
|
||||
if m.top.content.contenttype = 4
|
||||
if not m.nextEpisodeButton.visible
|
||||
m.showNextEpisodeButtonAnimation.control = "start"
|
||||
m.nextEpisodeButton.setFocus(true)
|
||||
m.nextEpisodeButton.visible = true
|
||||
end if
|
||||
end if
|
||||
end sub
|
||||
|
||||
'
|
||||
|
@ -109,6 +107,8 @@ end sub
|
|||
|
||||
' Checks if we need to display the Next Episode button
|
||||
sub checkTimeToDisplayNextEpisode()
|
||||
if m.top.content.contenttype = 4
|
||||
|
||||
if int(m.top.position) >= (m.top.runTime - 30)
|
||||
showNextEpisodeButton()
|
||||
updateCount()
|
||||
|
@ -119,6 +119,7 @@ sub checkTimeToDisplayNextEpisode()
|
|||
m.nextEpisodeButton.visible = false
|
||||
m.nextEpisodeButton.setFocus(false)
|
||||
end if
|
||||
end if
|
||||
end sub
|
||||
|
||||
' When Video Player state changes
|
||||
|
|
Loading…
Reference in New Issue
Block a user