Skip to content

The React Native Module of the Flussonic Watcher SDK

The React Native (JS code) methods that are available for you to use are wrapped in the following files:

  • Modules: RNFlussonicWatcherReactSdkModule.java, RNFlussonicThumbnailReactSdkModule.java
  • View managers: RNFlussonicWatcherViewManager.java, RNFlussonicThumbnailViewManager.java.

The annotation @ReactMethod in the module marks methods that should be called from JS code.

In view managers you bind:

  1. Events that are sent from the SDK to JS code
  2. Properties that you can set from JS code (they are annotated with @ReactProp).

FlussonicWatcherView

  • Methods: pause, resume, seek, captureScreenshot, getAvailableTracks, getCurrentTrack.

  • Events: onBufferingStart, onBufferingStop, onDownloadRequest, onUpdateProgress, collapseToolbar, expandToolbar, showToolbar, hideToolbar, playerError.

  • Properties: url, allowDownload, startPosition, toolbarHeight.

FlussonicThumbnailView

  • Events: onStatus, onClick.

  • Properties: url.