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: 
Kinjal
Channel Surfer

How to handle cast video playback support on roku

I am trying to cast video from app (android and ios) to Roku device. Using External Control Protocol (ECP), able to connect with roku device and cast video on roku device.

Cast video Rest API url: http://192.168.137.123:8060/input/15985?t=v&u=http%3A%2F%2Fd1fb1b55vzzqwl.cloudfront.net%2Fen-us%2Ft...

Play and Pause video url: http://192.168.137.123:8060/keypress/Play

This two features is working fine.

I am not able to find solution for following points:

  1. As per document, their are forward and rewind command is available. I tried following url but It is not working

    http://192.168.137.123:8060/keypress/Fwd

    http://192.168.137.123:8060/keypress/Rev

  2. I want add feature of video seek to particular position and get video current position information. I not able to find details for this. On Youtube and Netflix app can have this features so there will be some way to achieve this feature?

8 REPLIES 8
renojim
Community Streaming Expert

Re: How to handle cast video playback support on roku

They are probably using roInput:

https://developer.roku.com/docs/references/brightscript/components/roinput.md#!

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
Kinjal
Channel Surfer

Re: How to handle cast video playback support on roku

I already go though with link which you had shared. In document, there is not details explanation for creating cUrl for video playback and how to use inputs.

Can you please share any example of cUrl for video seek to particular position and get video current position information?

0 Kudos
renojim
Community Streaming Expert

Re: How to handle cast video playback support on roku

roInput allows you to pass any parameters you like via ECP.  In the example in that link they are passing x, y, my_event, and action.  Those parameters could have been anything.  In your case you could have a parameter called seek and set its value to where you want to seek.  It's up to your channel code to interpret the parameters and act upon them.

As for getting the current position, look at query/media-player:
https://developer.roku.com/docs/developer-program/debugging/external-control-api.md#external-control...

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
Kinjal
Channel Surfer

Re: How to handle cast video playback support on roku

Using query/media-player command, able to get video current position. 

 

I have tried following different cUrl for video seek but no one was worked. 

http://192.168.137.123:8060/input?seek=1775

http://192.168.137.123:8060/input/15985?seek=1775

http://192.168.137.123:8060/input/15985?id=1&type=transport&command=seek&direction=forward&duration=...

http://192.168.137.123:8060/input/15985?command=seek&duration=9775

As you said "In your case you could have a parameter called seek and set its value to where you want to seek.  It's up to your channel code to interpret the parameters and act upon them.". 

I just want to cast video from my android app to ruko default channel. I have no any created channel in roku.

Can you please suggested any way to seek video in roku default channel? 

 

0 Kudos
renojim
Community Streaming Expert

Re: How to handle cast video playback support on roku

Now I see.  I thought you were wanting to handle it in your own channel/app.  I don't know if there's any way to do what you want.  It would be up to the channel/app to handle seek.  Clearly the YouTube channel does, but the one you're using does not.  Unless it's added as a basic ECP command and channels are forced to handle it there's nothing you can do about it.

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
Kinjal
Channel Surfer

Re: How to handle cast video playback support on roku

The seek feature is very important in video casting. Many other app also able to cast video with this feature to Roku. So might there is some way to do this thing. 

Can you please let me there is any one else can help to resolve this issue ?

0 Kudos
renojim
Community Streaming Expert

Re: How to handle cast video playback support on roku

To be honest, you're lucky I responded.  Roku employees rarely respond here and this isn't a developer issue.  The developer forum is for people that develop Roku channels/apps.  You can try in the general forum or you can suggest a feature, but don't hold your breath.

Suggest a Feature | Roku Community | Roku

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
Kinjal
Channel Surfer

Re: How to handle cast video playback support on roku

@renojim Thank you for your support. 

0 Kudos