Your Digital Media Has Never Looked So Good

 
cpjamloki
Topic Author
Posts: 97
Joined: Mon Jan 19, 2015 7:10 am

User-Agent string

Mon Sep 14, 2015 6:19 am

Hi guys,
Can anybody describe
(1)what is User-Agent string in Roku?
(2)Can i get like : Roku/DVP-5.0 (025.00E08043A)
i mean how can i get output in the complete form like Roku/DVP-5.0 (025.00E08043A).
please give some example also, because i have found some information regarding this here in forum but not understanding completely.

Thanks in advance,
 
cpjamloki
Topic Author
Posts: 97
Joined: Mon Jan 19, 2015 7:10 am

Re: User-Agent string

Mon Sep 14, 2015 10:44 pm

If anybody have any idea please share your views,it will be helpful for forums user also.
 
adamkaz
Posts: 115
Joined: Sun Jan 11, 2009 2:23 pm

Re: User-Agent string

Tue Sep 15, 2015 1:27 pm

Full disclosure, this is reverse engineered from the devices that I have and not necessarily correct.

The user agent string shows that you are accessing content with a roku device and provides the SW build that you are running. For example:
Roku/DVP-5.0 (025.00E08043A)

Means you are running Version 5.0 build 8043. The green characters appear to never change. I'm guessing the 02 might indicate a particular device, but I'm not sure.
 
User avatar
RokuJoel
Posts: 1756
Joined: Mon Nov 14, 2011 5:22 pm

Re: User-Agent string

Thu Sep 17, 2015 11:17 am

This should work:

di=createobject("roDeviceInfo")
version=di.GetVersion()
version_major=mid(version,3,1)
version_minor=mid(version,5,2)
version_build=mid(version,8,5)

if version_minor.toint() < 10 then
    version_minor=mid(version_minor,2)
end if
userAgent="Roku/DVP-"+version_major+"."+version_minor+" ("+version+")"
 
belltown
Posts: 1460
Joined: Thu Dec 09, 2010 1:43 pm
Contact:

Re: User-Agent string

Thu Sep 17, 2015 12:02 pm

You can also set the User-Agent string to anything you want, e.g:

ui = CreateObject ("roVideoScreen")
ui.AddHeader ("User-Agent", "Apple TV - version 42")
https://github.com/belltown/
 
User avatar
RokuJoel
Posts: 1756
Joined: Mon Nov 14, 2011 5:22 pm

Re: User-Agent string

Fri Sep 18, 2015 5:40 pm

Ha!

- Joel
 
pir8radio
Posts: 1
Joined: Sat Oct 01, 2016 2:01 pm

Re: User-Agent string

Sat Oct 01, 2016 2:12 pm

I know this is an old post, but I was looking for this same info, and this is the post that came up in a google search...

I have made some corrections to the original answer as well, I'm sure by now all device values have been discovered, but I will add the ones I know of.

Roku/DVP-5.0 (025.00E08043A)

Means you are running Version 5.0 build 8043. The green characters appear to never change. The 02 indicates the device type.
03 - Roku LT
04 - Roku 3
09 - Roku Stick

Who is online

Users browsing this forum: No registered users and 4 guests