Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Yospace
Level 7

isTimedMetaData() not firing for HLS stream

I did see a couple of older posts about this, but I'm having trouble getting these events to fire from either a roVideoScreen or roVideoPlayer instance.

Pretty simple vanilla setup, but no ID3 metadata is being reported. Any ideas? I've tried adding the setMetaDataForKeys() call in multiple places, and also tried moving the isMetaData higher up the if clause, but no success.

    p = CreateObject("roMessagePort")
    video = CreateObject("roVideoScreen")
    video.SetTimedMetaDataForKeys([])
    video.setMessagePort(p)

    videoclip = CreateObject("roAssociativeArray")
    videoclip.StreamBitrates = [0]
    videoclip.StreamUrls = ["http://some.hls.test.stream.with.id3.tags.com/master.m3u8"]
    videoclip.StreamQualities = ["HD"]
    videoclip.StreamFormat = "hls"

    video.SetContent(videoclip)
    video.SetTimedMetaDataForKeys([])
    video.show()
    video.SetTimedMetaDataForKeys([])

    while true
        msg = wait(0, video.GetMessagePort())
        if type(msg) = "roVideoScreenEvent" then
            if msg.isScreenClosed() then
                print "Closing video screen"
                exit while
           else if msg.isRequestFailed() then
                print "play failed: "; msg.GetMessage()
            else if msg.isTimedMetaData() then
                print "isTimedMetadata"
                stop
            else
                print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
            endif
        else
            print "Unknown message type: " + type(msg)
        end if
    end while
0 Kudos