The following describes a simple setup to add playback of clear streams to your application. It assumes integration into an existing project; see the React Native SDK Integration Guide for details. See the readme in the examples.zip archive in your release files to view this feature in a standalone project.
OTVPlayer
To play clear content using OTVPlayer, in your React Native application's component you need to:
-
Import the OTVPlayer class.
-
Specify an appropriate source property for the OTVPlayer Component.
-
Add an OTVPlayer Component to your render tree.
-
Call the OTVPlayer
play()method on an appropriate event (if the autoPlay property is set to false). -
In both cases of autoPlay and explicit
play()method call, if the method fails the onError will be triggered with error code 7026.
Example code
For more information, see the OTVPlayer API documentation.