Skip to main content

Casting

Overview

The Google Cast framework enables a viewer to stream video and audio content to a compatible TV or sound system. By enabling the Google Cast framework in your app, a viewer can use a cast button to stream your content to a Chromecast-enabled device on a shared network connection.

Set on Player Configs useChromeCast to false if you don't want to use Chrome Cast.

NOTE

You should call SetupChromeCastSharedInstance() before player setup

Functions

METHODDESCRIPTION
releaseCastPlayer()Used to release cast.
getCastVideosList()Get a list of the videos on queue.
addVideoToQueue(videoModel: VPVideoModel, atPosition: Int)Add a video to the queue in a specific position.
NOTE

If the position is not set, the video will be added autmatically to the last position on queue.

METHODDESCRIPTION
castDirectly(videoModel: VPVideoModel)Cast a video directly without adding it to the queue.
playVideoFromQueue(index: Int)Play a video from a specific video in queue.
queueMoveItem(from: Int, to: Int)Move an item from a position to another in queue.
queueRemoveItem(at: Int)Remove a video from the queue in a specific position.