|
|
Changing URLs or Text using a Control ItemOccassionally it is necessary to change many parameters in your Roku app at the same time. For example, if you move the files for your app's posters to a different S3 bucket or to a different web server, then every URL in your Roku app will need to be changed. Fortunately there is a very quick and easy way to do this! Before starting, you'll need to determine what the instructions for the Control Item will be. The instructions tell the Control Item what sequence of characters in the URLs to look for, and what to replace them with. The technical term for the instructions is a macro. For example, if your current poster URLs look something like this: http://www.posterhosting.com/mydirectory/poster1.jpg And your new poster URLs need to look like this: http://www.newposters.com/other/directory/poster1.jpg Then the macro would look like this: posterhosting.com/mydirectory:newposters.com/other/directory The macro consists of a sequence of characters to search for, followed by a colon ":", followed by a sequence of replacement characters. When your Roku app is started on a viewer's Roku device, the example macro above will find all instances of "posterhosting.com/mydirectory" and replace them with "newposters.com/other/directory". Here are the steps you would take to add the example macro to a Roku app:
Here are some other important things to know about macros:
Need help with monetizing your Roku app using video advertisements? See Placing Advertisements in your Roku App for all the details! Comments, suggestions, or questions about this Roku developer guide can be sent to . |
|