【发布时间】:2018-02-03 22:16:58
【问题描述】:
我正在提交一个 Roku 频道,但由于 Springboard 上没有显示“播放”按钮,它不断被拒绝。
我为基本代码使用了其中一个模板。它使用 LabelList 将“播放”按钮放在屏幕上。它在我测试的设备上运行良好,这是一个 Roku 棒。不过,他们似乎正在 Roku 智能电视上测试这些,并且该设备的某些内容阻止了 LabelList 显示。
以下是将内容添加到 LabelList 的代码。
Sub OnContentChange()
content = m.top.content
m.description.content = content
m.description.Description.width = "770"
m.poster.uri = content.hdBackgroundImageUrl
m.background.uri = content.hdBackgroundImageUrl
' create buttons
m.buttonArray = []
moviePlaysSection = CreateObject("roRegistrySection", "MoviePlays")
if moviePlaysSection.Exists(content.guid)
m.currentPosition = StrToI(moviePlaysSection.Read(content.guid))
end if
if content.url <> ""
m.buttonArray.push({ title : "Play" })
end if
if content.trailerUrl <> invalid
m.buttonArray.push({ title : "Play Trailer" })
end if
m.buttons.content = ContentList2SimpleNode(m.buttonArray)
End Sub
Function ContentList2SimpleNode(contentList as Object, nodeType = "ContentNode" as String) as Object
result = createObject("roSGNode",nodeType)
if result <> invalid
for each itemAA in contentList
item = createObject("roSGNode", nodeType)
item.setFields(itemAA)
result.appendChild(item)
end for
end if
return result
End Function
Roku TV 是否有什么奇怪的地方阻止了 LabelLists 的显示,还是我做错了什么?
【问题讨论】:
-
content.url <> ""是否会在任何时候为假?也许与 QA 期间可用的内容有关?否则我看不出代码有什么问题。
标签: roku brightscript