3

In html5 there is a simple way to loop a video. See here. I want to know if something like this exists for Apple TV's TVJS and TVML.

I can get it to loop in the javascript like this:

if(videoURL && event.type === "select") {
  var player = new Player();
  var playlist = new Playlist();
  var mediaItem = new MediaItem("video", videoURL);

  player.playlist = playlist;
  for (var i = 0; i < 10; i++) {
    player.playlist.push(mediaItem);
  }

  player.present();
}

However, this shows the video progress bar every time a new instance of the video starts, and this is not the functionality that I want. I want to loop continuously until exited.

Thanks in advance for any help here.

Ben Simmons
  • 230
  • 1
  • 13

0 Answers0