Forum Discussion

perrycbrown's avatar
perrycbrown
Channel Surfer
7 years ago

Question about accessing several videos' info within a Video playlist

After I have created a playlist and assigned it to a Video node, how do I access the info of each video within the playlist, as the playlist moves from video 1, to video 2, to video 3, etc. ?

I'm already watching the Video.contentIndex field :
m.Video.ObserveField("contentIndex", "OnPlaylistIndexChange")


...but when I examine m.Video or m.Video.content within sub OnPlayListIndexChange( ), I'm not seeing anything that looks like a listing of the individual videos within the playlist.

I need to know the individual videos' info so I can log tracking info to Boxcast, where the vids originate, and thus track each video within the playlist separately in Boxcast.

Thanks for any help...

2 Replies

  • Not sure what all info you need but you can use something as simple as..

    sub OnPlaylistIndexChange()
      print m.Video.content
    end sub



    Which will return something similar to this.


      <Component: roSGNode:ContentNode> =
      {
          change: <Component: roAssociativeArray>
          focusable: false
          focusedChild: <Component: roInvalid>
          id: ""
          HDPOSTERURL: "https://archive.org/download/TheBobNewhartShow/TheBobNewhartShow.thumbs%2FThe%20Bob%20Newhart%20Show%20-%20Season%201%2FThe%20Bob%20Newhart%20Show%20s01e01%20-%20Fly%20the%20Unfriendly%20Skies_001463.jpg"
          SHORTDESCRIPTIONLINE1: ""
          STREAMFORMAT: "mp4"
          TITLE: "2 The Bob Newhart Show - Season 1 The Bob Newhart Show s01e01 - Fly the Unfriendly Skies"
          URL: "https://archive.org/download/TheBobNewhartShow/The%20Bob%20Newhart%20Show%20-%20Season%201%2FThe%20Bob%20Newhart%20Show%20s01e01%20-%20Fly%20the%20Unfriendly%20Skies.mp4"
      }
  • You need to access the children of m.video.content. I.e. m.video.content.getChild(m.video.contentIndex)