brightscript

Read and write from temp file in Roku

半腔热情 提交于 2020-01-14 09:22:06
问题 In Roku, how do I read and write data from a temporary file in the folder tmp: ? I cannot find any documentation relating to this. The data which I am storing is too big to be stored in the registry. 回答1: There is two simple functions do read and write data from tmp:/ folder: ReadAsciiFile(filepath as String) as String text=ReadAsciiFile("tmp:/config.txt") WriteAsciiFile(filepath as String, text as String) as Boolean WriteAsciiFile("tmp:/config.txt", "the text to write") Further documentation

Difference between AsyncGetToString and AsyncPostFromString?

旧巷老猫 提交于 2020-01-04 05:47:28
问题 I create one web API. and I call in bright-script. I refer https://developer.roku.com/en-gb/docs/references/brightscript/interfaces/ifurltransfer.md#head-as-dynamic/ all the method but don't understand anyone knows its real use for AsyncGetToString and AsyncPostFromString method. I use the following code in Roku readInternet = createObject("roUrlTransfer") readInternet.setUrl(url) readInternet.setport(m.port) readInternet.gettostring() timer = createobject("roTimeSpan") timer.Mark()

How do I open another channel from one channel in Roku?

蹲街弑〆低调 提交于 2019-12-29 09:07:16
问题 I am able to use curl to get apps and the apps id from my computer in Roku device. And ultimately, I am able to launch channels using curl from my local computer with e.g. curl -d '' 'http://192.x.x.x:8060/launch/33739' but what I am looking for is doing similar operation where I will have a list of channels and then I should be able to open the channels. In external Control Guide of Roku in http://sdkdocs.roku.com/display/sdkdoc/External+Control+Guide it is said that it can be done, but it

How to make api request to some server in roku

匆匆过客 提交于 2019-12-29 04:28:10
问题 I am very much new in working with roku and roku specific language( BasicScript ). I need to make api calls to some server to get the channels. I am not understanding how to do it in roku. Please suggest. 回答1: here is the direct way to do it without having to rely on the syntax of the code libraries that are included in your SDK: Blocking Method (all program execution stops until the URL is retrieved): url="http://myserver.com/anExampleQuery?getmydata&apikey=AX5GZP5LL45D987D0&format=XML" xfer

How to replace a PanelSet using replaceChild in BrightScript

不羁的心 提交于 2019-12-24 10:56:43
问题 I'm using the PanelSet class to create a settings screen made of two panels: panelA on the left-hand side displays a list of overall settings options panelB is displayed on the right-hand side, includes a list of different options for each item on panelA How can I replace the Panel displayed on the right-hand side, when the user changes the focused item on panelA ? Roku's documentation states that you have to use the method replaceChild , but I can't figure out how that's supposed to work, or

Is there any way to display HTML content with its style in Roku SG?

 ̄綄美尐妖づ 提交于 2019-12-24 09:08:15
问题 I want to display HTML content like web in Roku SG. I saw the solution for this problem, I used this solution that tells remove tags and then display only content but I want to display HTML content with its HTML style. Please suggest a solution. 回答1: No. There is no way to display HTML content using brightscript. 来源: https://stackoverflow.com/questions/45608601/is-there-any-way-to-display-html-content-with-its-style-in-roku-sg

Roku - How to use isHD, FullHD, FrameRate parameters?

≡放荡痞女 提交于 2019-12-24 06:39:12
问题 I am trying to play a 1080p@60fps HEVC stream on a Roku-4 device. I am facing some issues and I have explained it in this question - Roku: Playback is not smooth on Roku-4 device for 1080p@60fps HEVC content I looked at the SDK documentation of Roku and found some parameters. I have some questions. 1) isHD: This is a flag to indicate the content is HD. 2) FullHD: This is a flag to indicate 1080p content. 3) FrameRate: To specify content frame rate if content is 1080p. My questions are, 1)

Redirect to Home page After Clicked Save button using bright script?

橙三吉。 提交于 2019-12-23 07:12:54
问题 I have created Login Screen and setting URL Screen in bright script with the credential username, password in Login screen and setting URL in setting URL Screen with two buttons save and setting. Here simply my Login Screen: Login Screen ''''''''''''''''''''''''''''''''''''''''''''''''''' UserName: TextBox1 Password: TextBox2 Save Setting ''''''''''''''''''''''''''''''''''''''''''''''''''' I Click the Setting Button open setting URL Screen it's here: URL Screen '''''''''''''''''''''''''''''''

How to display HTML page using BrightScript

回眸只為那壹抹淺笑 提交于 2019-12-14 02:38:05
问题 I would like to display a single HTML web page on a Roku channel. I have no need to follow hyperlinks, but the page does have periodic updates. Is it possible to write a BrightScript application that uses Gecko to render the page, or would I have to draw the page myself? I see plenty of information as well as examples in the Roku SDK that describe how to provide user navigation and play video on a Roku box using BrightScript, but I can't find any information about displaying a single HTML

Change default font roFontRegistry in Roku

一世执手 提交于 2019-12-13 06:07:12
问题 I have created a page with roImageCanvas ,and i am trying to change its default font with another one.bellow is my code but this won't work.Please help me to resolve this error.thanks in advance. canvas = CreateObject("roImageCanvas") port = CreateObject("roMessagePort") canvas.SetMessagePort(port) items = [] FontInterface=CreateObject("roFontRegistry") 'create global font access Fontinterface.Register("pkg:/source/Univers.ttf") Font=FontInterface.GetFont("Univers",36,false,false) FontSmall