Hi!
I'm trying to activate widevine drm in the player as it says in the documentation (https://developer.roku.com/docs/specs/media/content-protection.md), but it still doesn't work. I have also added the lines to the manifest.
The code:
if streaming.licenseUrl <> invalid drmParams = { licenseServerURL: streaming.licenseUrl.widevine keySystem: "Widevine" } m.child[0].drmParams = drmParams end if if streaming.url <> invalid m.child[0].url = streaming.url node = CreateObject("roSGNode", "ContentNode") node.Update({children: m.child}, true) m.videoPlayer.content = node m.videoPlayer.enableUI = false m.videoPlayer.contentIsPlaylist = true m.videoPlayer.control = "play" m.videoPlayer.ObserveField("state", "OnVideoPlayerStateChange") m.videoPlayer.ObserveField("visible", "OnVideoVisibleChange") else errorPlayContent() end if
I am doing something wrong? Or am I missing something to add?
@Sove Can you add http headers for the same some its no working directly.
https://developer.roku.com/docs/references/brightscript/interfaces/ifhttpagent.md
Including httpAgent it doesn't work...
if streaming.licenseUrl <> invalid drmParams = { licenseServerURL: streaming.licenseUrl.widevine keySystem: "Widevine" } m.child[0].drmParams = drmParams end if if streaming.url <> invalid m.child[0].url = streaming.url device = CreateObject("roDeviceInfo") httpAgent = CreateObject("roHttpAgent") if httpAgent <> invalid then httpAgent.SetCertificatesFile("common:/certs/ca-bundle.crt") httpAgent.InitClientCertificates() httpAgent.EnableCookies() httpAgent.AddHeader("X-Roku-Reserved-Dev-Id", "") m.VideoPlayer.setHttpAgent(httpAgent) else headers = [] headers.push("X-Roku-Reserved-Dev-Id:") m.child[0].HttpHeaders = headers m.child[0].HttpSendClientCertificates = true m.child[0].HttpCertificatesFile = "common:/certs/ca-bundle.crt" m.VideoPlayer.EnableCookies() m.VideoPlayer.SetCertificatesFile("common:/certs/ca-bundle.crt") m.VideoPlayer.InitClientCertificates() end if m.videoPlayer.content = m.child[0] m.videoPlayer.enableUI = false m.videoPlayer.contentIsPlaylist = true m.videoPlayer.control = "play" m.videoPlayer.ObserveField("state", "OnVideoPlayerStateChange") m.videoPlayer.ObserveField("visible", "OnVideoVisibleChange") else errorPlayContent() end if