Package com.castlabs.sdk.subtitles
Class SubtitlesPlugin
- java.lang.Object
-
- com.castlabs.android.Plugin
-
- com.castlabs.sdk.subtitles.SubtitlesPlugin
-
public class SubtitlesPlugin extends Plugin
This plugin provides support for extended Subtitles within the Castlabs SDK. Before you can use this plugin, you need to register it with thePlayerSDKbefore you initialize the SDK itself. For example:
Since version 4.0.2, this plugin also registers a for aPlayerSDK.register(new SubtitlesPlugin()); PlayerSDK.init(getApplicationContext());SubtitlesViewComponentto allow access to the underlying view that shows the subtitles on screen. If you're not using aPlayerView, you can use theSubtitlesPlugin.SubtitlesPluginComponentto get access to the underlying SubtitlesView. In order to do this, create aSubtitlesVieweither programmatically or by declaring it in a layout file, andPlayerController.setComponentView(int, View)it to the PlayerController passing theSUBTITLES_VIEW_IDas identifier.- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static intSUBTITLES_VIEW_IDView ID for the defaultSubtitlesView
-
Constructor Summary
Constructors Constructor Description SubtitlesPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()booleanisEnabled()voidsetEnabled(boolean enabled)Enabled or disable the plugin-
Methods inherited from class com.castlabs.android.Plugin
init, onRemotePlay
-
-
-
-
Field Detail
-
SUBTITLES_VIEW_ID
@IdRes public static final int SUBTITLES_VIEW_ID
View ID for the defaultSubtitlesView
-
-