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>
Tags (1)
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>
Tags (1)
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
Tags (1)
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 ?
Tags (1)
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.
Tags (1)
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
Tags (1)
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
Tags (1)
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
Tags (1)
0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!