Playback Issues - Audio/Video & Power

Help with audio & video playback issues, TV display type recognition & compatibility, HDCP messages, troubleshooting playback errors, advertisements, and resolving power issues.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

Bug: Cycling Roku video playlist index results in various issues depending on trickplay state

Bug Description:
- During playback of a video playlist, if the video is paused before changing the index of the current playing item and setting control to play (in order to change the current playing video in the playlist), the next video will not respect the first attempt by the user to pause. Pressing the play button in this state results in the player controls appearing on screen and an audible sound can be heard confirming the interaction with the player, but the player doesn't pause. This state remains until the user presses play on their remote, regardless of whether a new video in the playlist has started playing. The FF, RW, left, and right keys all function as expected while in this state.
- If the user is seeking by pressing FF, RW, left, or right keys on their remote when the playlist index change occurs, then the next video will play from the seek position of the previous one, rather than from the beginning. The video will also not be playing when this occurs (if in the player is paused during trickplay) and require the user to press the play button on their remote (a black screen is present when in this state).

Notes:
- It seems as though the Roku player is internally tracking the play/pause state through the remote. This means that if the player state changes from play to pause or vice versa, the remote play pause button will be desynced resulting in the pressing of the play button to not influence the player state. During debugging, fake key presses were experimented with in order to determine a workaround and faking the pressing of the play button if the video was in the paused state before changing the index of the playlist resolved the issue. Changing the control of the video to play before changing the index did not resolve the issue however, suggesting that the play key event is involved with this issue in some way. Fake play key input was not enough to resolve this entirely unfortunately, as the seeking issue described above was still present. In order to resolve this, a brief 300ms delay was added.
- Maintaining the play/pause state when switching between videos in the playlist doesn't seem to be ideal as it results in a black screen being displayed to the user. This is a very confusing experience and it isn't clear to the user that the new video has loaded and is simply paused.

Here is a code snippet to reproduce the issue:
MainScene.brs

sub init()
  m.top.id = "MainScene"

  videocontent = createObject("RoSGNode", "ContentNode")

  childContent = videocontent.createChild("ContentNode")
  childContent.title = "Big Buck Bunny"
  childContent.streamformat = "hls"
  childContent.url = "http://link.theplatform.com/s/BpkrRC/ckSTzzdGO_K3"

  childContent = videocontent.createChild("ContentNode")
  childContent.title = "Elephants Dream"
  childContent.streamformat = "hls"
  childContent.url = "http://link.theplatform.com/s/BpkrRC/5JmvsD7Vhlxt?feed=Reference%20Video%20Player%20dev"

  childContent = videocontent.createChild("ContentNode")
  childContent.title = "Sintel"
  childContent.streamformat = "hls"
  childContent.url = "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8"

  m.video = m.top.findNode("playlistVideo")
  m.video.contentIsPlaylist = true
  m.video.loop = true
  m.video.content = videocontent

  m.video.setFocus(true)
  m.video.control = "play"
end sub

function onKeyEvent(key as String, press as Boolean) as Boolean
  handled = false
  if key = "down" and press = true
    m.video.nextContentIndex = m.video.contentIndex + 1
    m.video.control = "play"

    handled = true
  end if

  return handled
end function

MainScene.xml

<?xml version="1.0" encoding="utf-8" ?> 

<component name="MainScene" extends="Scene" >
  <children >
    <Video id = "playlistVideo"/>
  </children>

  <script type="text/brightscript" uri="pkg:/components/MainScene.brs"/>
</component>

 

0 Kudos