Hi all.
I've been developing a roku game channel using 2dAPI with roScreen element.
One of the features I'm trying to implement is: showing a 400*600 video within the game (during the game. not full screen).
From what I understand so far:
1. Scene graph components dont work with 2dapi
2. roVideoPlayer is deprecated since 2017
Is there any way to implement this?
roVideoScreen was deprecated. I don't think roVideoPlayer was.
roVideoPlayer is deprecated according to the logs from the device.
When I create the object it sends the log that it's deprecated.
Any other options you can think of?
If you are unable to use roVideoPlayer (it may be deprecated but sometimes exceptions can be made for games) you cannot mix Scenegraph and roScreen components but you can switch between them. If you just need to play a video, spin up a Scenegraph context to play the video and drop back to roScreen on closing scenegraph.
I need to show a video within the game. In the same time.
You've mentioned that sometimes exceptions can be made for games regarding roVideoPlayer.
Can you expand on this? How can I use it anyway within my game?
I do not see rovideoplayer in the list of deprecated
https://developer.roku.com/docs/references/deprecated-apis.md
and does not mention deprecated on the doc page
https://developer.roku.com/docs/references/brightscript/components/rovideoplayer.md
roVideoplayer may have become un-deprecated according to this thread
https://community.roku.com/t5/Roku-Developer-Program/Is-roVideoPlayer-Not-Depreciated/td-p/510580
The warning may be a false flag that was not removed. Contact roku partnersuccess for clarification and have them flag for updating the warning message.
Thanks for the reply.
I did manage to start playing a video with roVideoPlayer but I could only hear the sound.
I've found this blog post from 2012 where the use roImageCanvas - which is deprecated.
Also the sample channels are not available in the links in the blog post.
Can someone share an example of how to work with roVideoPlayer?
Basically what happens is:
1. I get the messages from the port from the player
2. I can hear the video sound
3. when I leave the channel the video itself flashes for a second as if it was rendering behind the splash screen or behind the roscreen if I render an image.
Any thoughts or examples would be great. Thanks again
As I recall, when using roImageCanvas you had to punch a hole in the canvas for the video to appear since the canvas is displayed over the video. I'm pretty sure roScreen acts the same, so try screen.Clear(0) (assuming your roScreen is named "screen") to set the whole screen to transparent.