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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
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).

- 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:

sub init() = "MainScene"

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

  childContent = videocontent.createChild("ContentNode")
  childContent.title = "Big Buck Bunny"
  childContent.streamformat = "hls"
  childContent.url = ""

  childContent = videocontent.createChild("ContentNode")
  childContent.title = "Elephants Dream"
  childContent.streamformat = "hls"
  childContent.url = ""

  childContent = videocontent.createChild("ContentNode")
  childContent.title = "Sintel"
  childContent.streamformat = "hls"
  childContent.url = "" ="playlistVideo") = true = true = videocontent = "play"
end sub

function onKeyEvent(key as String, press as Boolean) as Boolean
  handled = false
  if key = "down" and press = true = + 1 = "play"

    handled = true
  end if

  return handled
end function


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

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

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


0 Kudos