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: 
lmsilva
Visitor

specify user-agent for videoplayer requests

Dear all,

Does anybody know if it is possible to pass my own user-agent for ifVideoPlayer streaming GET requests?
In other words, I suspect the place where I'm getting my ifVideoPlayer.url stream is checking for "valid" user-agents so I want to try and change it...

Thank you,
Luis
0 Kudos
7 REPLIES 7
renojim
Community Streaming Expert

Re: specify user-agent for videoplayer requests

It's in the ifHttpAgent interface:
AddHeader("user-agent","user agent string")

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
lmsilva
Visitor

Re: specify user-agent for videoplayer requests

I did find that but...how can I use it from an roVideoPlayer object?
I understand I could do it if I were creating my own http requests but the roVideoPlayer object manages the http connections by itself, right?
Or is there a way to bind the roVideoPlayer http connection to my own http object?

Thank you!
Luis
0 Kudos
renojim
Community Streaming Expert

Re: specify user-agent for videoplayer requests

The roVideoPlayer object supports the ifHttpAgent interface, so if you have
vp = CreateObject("roVideoPlayer")
then you can do
vp.AddHeader("user-agent","user agent string")

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
lmsilva
Visitor

Re: specify user-agent for videoplayer requests

Wow, that's awesome! Thank you so much!
0 Kudos
lmsilva
Visitor

Re: specify user-agent for videoplayer requests

How can I find out what other interfaces objects have access to??
Is there some place on the documentation where this is explained? I had never seen it?
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: specify user-agent for videoplayer requests

The Component Reference lists supported interfaces for each component. http://sdkdocs.roku.com/display/sdkdoc/roVideoPlayer
0 Kudos
lmsilva
Visitor

Re: specify user-agent for videoplayer requests

Thank you!
0 Kudos