roku - 无法使用带 DASH 流 URL 的 Widevine DRM 播放视频
问题描述
我们正在实施一个视频 Roku 频道,在其中,我们希望使用带 DASH 流 URL 的 Widevine DRM 来播放视频。我遵循了 Roku 开发论坛提供的文档,但它不起作用。
我目前的代码是:
videoContent = createObject("roSGNode", "ContentNode")
videoContent.StreamFormat = "dash"
videoContent.Url = 'provided dash streaming url
' for widevide DRM
drmParams = {
keySystem: "Widevine",
licenseServerURL: 'provided our licenseServerURL
}
videoContent.drmParams = drmParams
HttpAgent = CreateObject("roHttpAgent")
HttpAgent.AddHeader("Authorization",AuthorizationTokenString)
m.VideoPlayer.setHttpAgent(HttpAgent)
m.VideoPlayer.content = videoContent
m.VideoPlayer.control = "play"
我参考了以下链接以找出方法。 https://sdkdocs.roku.com/display/sdkdoc/Content+Protection#ContentProtection-Widevine-BETA https://sdkdocs.roku.com/display/sdkdoc/Content+Meta-Data#ContentMeta-Data-ExampleofconfiguringadashstreamwithWidevineDRM
如果我在这里遗漏了什么,请告诉我,并帮助我解决这个问题。
解决方案
您是否已将此添加到您频道的清单中?
requires_widevine_drm=1
requires_widevine_version=1.0
此外,在创建视频节点时,根据https://developer.roku.com/en-gb/docs/references/brightscript/components/rourltransfer.md
为了让您的网络服务器执行上述步骤来验证您的 Roku 流媒体播放器,您的应用程序需要在执行任何 https 请求之前调用以下函数:
在您的代码中,它将是:
HttpAgent.SetCertificatesFile("common:/certs/ca-bundle.crt")
HttpAgent.InitClientCertificates()
HttpAgent.AddHeader("X-Roku-Reserved-Dev-Id", "")
推荐阅读
- dart - 无法使用飞镖:数学随机
- ajax - 使用 Ajax 调用从数据库 laravel 中获取数据
- python - 需要我的 pyqt5 按钮问题的想法
- javascript - FadeIn 后的滚动问题
- node.js - 错误:passport.initialize() 中间件未使用 | 在数据库中创建用户但给出此错误
- java - 引起:java.lang.NullPointerException:尝试使用我的按钮调用虚拟方法
- reactjs - 为 Solidity 项目构建 React 前端
- javascript - 如何从反应组件中检索 JSONP 对象?
- reactjs - 如何将同一个组件渲染 5 次?(克隆组件)
- android - 更改用户设置过滤器时更新浏览器片段