1

So I have a Roku channel that is completely powered by Vimeo. However, the other day Vimeo changed around some of their links that are included in the API call. Now, all the links have an ampersand in the URL to the videos.

In the past when we had our own CDN I could create scripts and links at will to not include an ampersand. However, I am still using the simple video player example that came with the Roku SDK examples and for some reason video links with ampersands will not play.

Is there something in the Brightscript code that I need to change to play links with ampersands?

How can I change this channel around to work with video URLS that contain ampersands?

4

1 回答 1

2

嗯,我想不出 Roku 不会在 URL 中加载带有 & 的文件的原因。

但我怀疑原因可能在其他地方:您是否有机会将内容(视频列表等)作为 XML 传递给播放器?您应该确保 XML 的文本和属性值中的 & 符号被转义为&- 否则roXmlElement.parse(xmlText) 行为不合理。并且“不合理地”我并不是说它丢失了 & 或显示错误,而是它默默地丢弃了整个元素或子树。

专业提示:如果在 Roku 上解析 XML 并怀疑解析中可能丢失了某些内容,请使用 myXmlElem.genXML()将其转储回控制台。

于 2014-10-31T00:47:19.057 回答