Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
TechTalk01
Binge Watcher

Not able to play Widewine DRM Protected Content

 sub init()
    video = m.top.findNode("exampleVideo")
    contentNode = createObject("roSGNode", "contentNode")
    contentNode.title = "Example Video"
    contentNode.ContentType = "movie"
    contentNode.streamFormat = "dash"

    drmParams =  { ' setting up DRM config
        keySystem: "Widevine"
    }
    contentNode.drmParams = drmParams
    ' hvideo = CreateObject("roHttpAgent")
    ' vheaders = {"X-AxDRM-Message":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiYjMzNjRlYjUtNTFmNi00YWUzLThjOTgtMzNjZWQ1ZTMxYzc4IiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIjoiOWViNDA1MGQtZTQ0Yi00ODAyLTkzMmUtMjdkNzUwODNlMjY2IiwiZW5jcnlwdGVkX2tleSI6ImxLM09qSExZVzI0Y3Iya3RSNzRmbnc9PSJ9XX19.4lWwW46k-oWcah8oN18LPj5OLS5ZU-_AQv7fe0JhNjA"}
    ' hvideo.SetHeaders(vheaders)
    ' video.setHttpAgent(hvideo) ' settting headers
    video.AddHeader("X-AxDRM-Message","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiYjMzNjRlYjUtNTFmNi00YWUzLThjOTgtMzNjZWQ1ZTMxYzc4IiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIjoiOWViNDA1MGQtZTQ0Yi00ODAyLTkzMmUtMjdkNzUwODNlMjY2IiwiZW5jcnlwdGVkX2tleSI6ImxLM09qSExZVzI0Y3Iya3RSNzRmbnc9PSJ9XX19.4lWwW46k-oWcah8oN18LPj5OLS5ZU-_AQv7fe0JhNjA")
    ' httpAgent.AddHeader("", "")
    ' video.drmHttpAgent = hvideo
    ' video.SetHeaders(httpAgent)
    video.content = contentNode

    print "playStartInfo" video.playStartInfo
    print "state-- " video.state
    print "errorMsg" video.errorMsg
    print "errorStr"video.errorStr
    print "errorCode"video.errorCode

    video.setFocus(true)
    video.control = "play"

  end sub




This is the code...
In console we are getting this output for print statements


playStartInfoinvalid
state-- none
errorMsg
errorStr
errorCode 0
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.