Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
matrixebiz
Roku Guru

Re: Change User-Agent of Roku Video Player

I assume by the lack of continued response that this is not possible?
0 Kudos
destruk
Streaming Star

Re: Change User-Agent of Roku Video Player

Google indexed a list of user-agent strings for Apple products here:
http://www.enterpriseios.com/wiki/Compl ... nt_Strings

However, keep in mind bypassing content provider's distribution preferences isn't something Roku actively supports, so you shouldn't think everyone would be doing this or have a whole lot of experience bypassing content restrictions on the Roku platform.  If they only want actual iOS products to be consuming their content you might want to respect that.
0 Kudos
MasterRed
Visitor

Re: Change User-Agent of Roku Video Player

Hi, matrixebiz, I tried with different streaming sources that require user-agent of ipad, Works without problem, Here the code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
 <!-- resultLength indicates the total number of results for this feed -->
 <resultLength>4</resultLength>
 <!-- endIndix  indicates the number of results for this *paged* section of the feed -->
 <endIndex>4</endIndex>
 <item sdImg="https://devtools.web.roku.com/videoplayer/images/JimFallon.jpg" hdImg="https://devtools.web.roku.com/videoplayer/images/JimFallon.jpg">
 <title>test</title>
 <contentId>10001</contentId>
 <contentType>Talk</contentType>
 <contentQuality>SD</contentQuality>
 <streamFormat>m3u8</streamFormat>
 <media>
 <streamQuality>SD</streamQuality>
 <streamBitrate>0</streamBitrate>
 <userAgent>http-user-agent=iPad</userAgent>
 <streamUrl>hxxp://test.com/live/index.m3u8</streamUrl>
 </media>
 <synopsis>test,test, test,test</synopsis>
 <genres>Clip</genres>
 <runtime>1260</runtime>
 </item> 
</feed>
0 Kudos
MasterRed
Visitor

Re: Change User-Agent of Roku Video Player

There also streaming that require not only the user-agent, also the referer from where you took the streaming, In this second example I included the label  And below the complete code with user-agent and referer together between the xml:

<refererUrl>hxxp://live-test.com</refererUrl>




<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>4</resultLength>
<!-- endIndix  indicates the number of results for this *paged* section of the feed -->
<endIndex>4</endIndex>
<item sdImg="https://devtools.web.roku.com/videoplayer/images/JimFallon.jpg" hdImg="https://devtools.web.roku.com/videoplayer/images/JimFallon.jpg">
<title>test</title>
<contentId>10001</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<streamFormat>m3u8</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>0</streamBitrate>
<userAgent>http-user-agent=iPad</userAgent>
 <refererUrl>hxxp://live-test.com</refererUrl>
<streamUrl>hxxp://test.com/live/index.m3u8</streamUrl>
</media>
<synopsis>test,test, test,test</synopsis>
<genres>Clip</genres>
<runtime>1260</runtime>
</item>
</feed>
0 Kudos
MasterRed
Visitor

Re: Change User-Agent of Roku Video Player

And to test first the links with user-agent in VLC:

For test streaming with user-agent of iPad in VLC, save it as m3u (UTF-8),

#EXTM3U
#EXTINF:-1,TEST
#EXTVLCOPT:http-user-agent=iPad
hxxp://live-stream/index.com
0 Kudos
matrixebiz
Roku Guru

Re: Change User-Agent of Roku Video Player

Thank you for the information 🙂

if I wanted to emulate an IPhone I can just put : http-user-agent=iPhone ?

If I wanted to emulate an Android I can put : http-user-agent=Android ?
0 Kudos
MasterRed
Visitor

Re: Change User-Agent of Roku Video Player

Hi, matrixebiz, it worked the user-agent iPad in your sdk Roku?, 

I will do tests with android and other devices.
0 Kudos
matrixebiz
Roku Guru

Re: Change User-Agent of Roku Video Player

"MasterRed" wrote:
Hi, matrixebiz, it worked the user-agent iPad in your sdk Roku?, 

I will do tests with android and other devices.

Unfortunately I can't test the stream I had because it stopped working for other reasons
0 Kudos
matrixebiz
Roku Guru

Re: Change User-Agent of Roku Video Player

"MasterRed" wrote:
Hi, matrixebiz, it worked the user-agent iPad in your sdk Roku?, 

I will do tests with android and other devices.

Hi MasterRed, were you able to test other agents? 
The <userAgent>http-user-agent=iPad</userAgent> didn't seem to work for me. Is there a list of all user agents? What user agent would I use for just emulating VLC? Thank you

Am I able to use the full user agent string like?;
http-user-agent=Mozilla/5.0 (iPad; CPU OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4
0 Kudos
matrixebiz
Roku Guru

Re: Change User-Agent of Roku Video Player

Hello, does anyone know what "<userAgent>http-user-agent= " VLC for windows would use? I have a video stream that plays in Windows VLC but the Roku has issues with it because the stream goes through a re-direct. Thanks
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.