问题标签 [brightscript]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
383 浏览

brightscript - 如何在brightscript中混合网格/屏幕类型?

如何在同一屏幕上使用多种屏幕类型?例如,如何在顶部显示海报屏幕,然后在底部显示网格屏幕

0 投票
1 回答
1456 浏览

string-formatting - URL Encoding a variable for a web service call on Roku

I need to URL encode a variable that is being passed into a web service.

I need to have whatever the value be for "testcategory" to be url encoded to be passed it to this web service call. In this example I would need "Action and Adventure" to be "Action%20and%20Adventure"

Is there a Brightscript function to accomplish this?

Any help would be very appreciated.

Thank you!

0 投票
1 回答
723 浏览

dropbox-api - 如何使用 BrightScript 进行 Dropbox API 调用?

我正在尝试将 Dropbox 集成到我的 Roku 频道中,我在 Dropbox App Console 中创建了一个 Dropbox API 应用程序。我可以使用 curl 发出请求:

使用 Brightscript 我正在使用以下代码,

谁能指出我做错了什么或遗漏了什么?提前致谢

0 投票
1 回答
1192 浏览

roku - 有没有一种程序化的方式来阻止 Roku 进入屏幕保护模式?

我正在开发一个等待一段时间(几个小时)然后播放一些视频然后再次等待然后再次播放视频的应用程序,依此类推。

是播放内容的时间还是等待的时间由提供要播放的内容的 Web 服务决定。万一,Web 服务发送信号表明该等待了,然后我的应用程序每五分钟对服务器执行一次 ping 操作,直到该播放内容了。

问题是在等待和 ping Roku 进入屏幕保护模式时。在屏幕保护程序模式下,当应用程序再次 ping 服务器时,屏幕保护程序会在前几个请求(每个请求 5 分钟后)出现抖动,然后在下一个请求时 Roku 崩溃,我必须重新启动设备。

那么,是否有一种编程方式可以防止 Roku 进入屏幕保护模式?当屏幕保护程序启动时,我也在后台等待它进入 300 秒倒计时。

0 投票
1 回答
106 浏览

debugging - 观察局部变量

我正在使用 sublime 编辑器进行brightscripting,并且想知道是否有任何方法可以添加手表并在调试控制台中输入本地表达式。所以每次,我都不会倾倒我的代码和打印语句。

0 投票
2 回答
149 浏览

roku - 如何检查图像是否加载失败?

我想知道是否有,我们可以知道图像没有加载到屏幕中(roPosterScreen、roSpringBoard 或任何屏幕)。我的意思是,我在任何屏幕上设置了一个图像 url,并且图像从服务器中删除,那么我们可以检查图像是否仍然存在吗?

谢谢

0 投票
1 回答
1063 浏览

live - 直播(某些频道)通过 Roku Box 播放

我试图加入 igmp 直播并在 roku box 中播放。但它没有奏效。是不是我们不能在 Roku 盒子中加入多播流?如果可以通过 HLS 进行操作,那么解决方案是什么?我在 github 的链接中尝试了参考:https ://github.com/thetrime/trimeplay/blob/master/source/trimeplay.brs 请参考我用作参考的另一个代码:

0 投票
1 回答
495 浏览

vimeo - Play Vimeo Link On Roku With Ampersand

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?

0 投票
3 回答
1149 浏览

brightscript - 将 POST 请求的内容下载到文件

我正在开发一个显示 MJPEG 视频的 Roku 应用程序。这有点棘手,因为据我所知,在 Brightscript 中并没有真正的方法来处理 HTTP 上的通用流。我所做的工作是使用 roUrlTransfer.GetToFile 启动下载。然后我可以处理随着 MJPEG 不断下载而创建的 tmp 文件。我必须每隔一段时间清理文件并重新启动传输以避免溢出存储空间,但它运行良好。

我遇到的问题是我需要支持的来源之一需要我发布一些会话信息才能拉下我需要显示的 MJPEG。据我所知, roUrlTransfer 没有提供 POST 字符串并将结果保存为文件的方法。有没有办法做到这一点,我没有看到?

0 投票
2 回答
312 浏览

android - 我们如何在 Eclipse 中安装 Brightscript?

我需要在eclipse中启动brightscript项目的步骤(至少是brightscript中简单新项目的例子)。我不知道如何用eclipse启动它。请帮助我。