public static class StraasMediaCore.MediaCoreConfig.Builder extends Object
StraasMediaCore.MediaCoreConfig
.Constructor and Description |
---|
Builder()
Constructor of
StraasMediaCore.MediaCoreConfig.Builder |
Modifier and Type | Method and Description |
---|---|
StraasMediaCore.MediaCoreConfig |
build()
Creates a
StraasMediaCore.MediaCoreConfig with the configuration. |
StraasMediaCore.MediaCoreConfig.Builder |
setConnectionCallback(MediaBrowserCompat.ConnectionCallback connectionCallback)
Sets the callback for connection related events.
|
StraasMediaCore.MediaCoreConfig.Builder |
setIdentity(Identity identity)
Sets the
Identity of the user. |
StraasMediaCore.MediaCoreConfig.Builder |
setRestHost(String host)
Sets the host of the restful API server media-core connects to.
|
StraasMediaCore.MediaCoreConfig.Builder |
setUiContainer(StraasMediaCore.UiContainer uiContainer)
Sets the UI container for the player view.
|
public Builder()
StraasMediaCore.MediaCoreConfig.Builder
public StraasMediaCore.MediaCoreConfig.Builder setRestHost(String host)
public StraasMediaCore.MediaCoreConfig.Builder setIdentity(Identity identity)
Identity
of the user.
This shouldn't be null.identity
- The user who connects to the Straas MediaBrowserServiceCompat
.
If you want to change the identity later, use setIdentity(Identity)
after
MediaBrowserCompat
is connected.public StraasMediaCore.MediaCoreConfig.Builder setConnectionCallback(MediaBrowserCompat.ConnectionCallback connectionCallback)
connectionCallback
- The callback which will tell you whether the MediaBrowserCompat
is connected or not. If you get MediaBrowserCompat.ConnectionCallback.onConnectionFailed()
,
normally causing by getting the CredentialFailException
, checkout logcat first.public StraasMediaCore.MediaCoreConfig.Builder setUiContainer(StraasMediaCore.UiContainer uiContainer)
uiContainer
- The container which renders the video track. Normally just put the StraasPlayerView.
You could reset the container target later using StraasMediaCore.setUiContainer(UiContainer)
.public StraasMediaCore.MediaCoreConfig build() throws IllegalArgumentException
StraasMediaCore.MediaCoreConfig
with the configuration.IllegalArgumentException