- Step 1 - Identify the content which is not supported for casting
- Step 2 - Do not invoke the 'setPlayerAdapter()' for the conetnt which is not supported for casting
Created
February 19, 2024 15:30
-
-
Save vizbee/e1ddbe2e111f067fe607447699e90c08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public fun onVideoLoaded(myMediaItem: MyMediaItem) { | |
//-------- | |
// Handle unsupported content for casting | |
//-------- | |
// As an example, if a trailer is not supported for casting please use the following code block to avoid casting | |
if (myMediaItem.contentType.equals(ContentType.TRAILER)) { | |
return | |
} | |
VizbeeWrapper.getInstance().setPlayerAdapter(myMediaItem); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment