Hi, I am trying to play a DRM protected video, during which I am getting an error from my DRM license server saying that "Request body size did not match Content-Length".
On verification (at the server side), it's noted that the content length set by Roku in the request header is not matching the actual content size. Attaching my code sample here:
sub ShowVideoScreen(rowContent as object)
m.videoPlayer = CreateObject("roSGNode", "Video")
testContent = CreateObject("roSGNode", "ContentNode")
testContent.streamFormat = "dash"
testContent.url = "https://x.y.net/movies/b79baaee22226492e6f986b9d6f42b50/169309/169309_hd.mpd?hdnea=xx&op=xx&user_id=xx&cid=xx&partnerId=xx&provider=xx&cid=xx"
testContent.ShortDescriptionLine1 = "L1 Description"
testContent.Description = "Description"
testContent.StarRating = 80
testContent.Length = 1972
testContent.Title = "Title"
drmParams = {
keySystem: "Widevine"
licenseServerURL: "https://mylicenseserver.com/v1/license?license-token=xx&secret-key-id=xx"
}
httpAgent = CreateObject("roHttpAgent")
httpAgent.AddHeader("x-params", "xxx")
httpAgent.AddHeader("x-user-token", "xxx")
httpAgent.AddHeader("x-user-token-secret-key-id", "u01bf3e1521")
httpAgent.AddHeader("x-session", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.xxx.v-kw1oS2Iidt45TwnRQlxzEsFyrNrtOFs1hDmwJdUP0")
m.videoPlayer.drmHttpAgent = httpAgent
testContent.drmParams = drmParams
m.videoPlayer.content = testContent
ShowScreen(m.videoPlayer)
m.videoPlayer.control = "play"
end sub
The error that I am getting (videoPlayer.licenseStatus):
license status: <Component: roAssociativeArray> =
{
duration: 0
keysystem: "Widevine"
response: "{"requestId":"Self=1-674ed7dc-3de6ce4b668a73e327dbcae7;Root=1-674ed7db-5cabb6203a465f67418a90e8","error":"Something went wrong","message":"Request body size did not match Content-Length"}"
status: 500
}
videoPlayer.errorInfo:
{
category: "drm"
clipid: 1
dbgmsg: "buffer:loop:unset:DRM exception: Http error 500:extra:etype:buffer"
drmerrcode: 0
errcode: 9
ignored: false
source: "buffer:loop:unset"
}
How to debug this further? Is there a way to know how Roku is setting the content length field? How can I resolve this and what steps next?
Any help would be really appreciated. Thanks in advance.