-
public class ExoMediaA standard entry point for registering additional com.google.android.exoplayer2.Renderers and com.google.android.exoplayer2.source.MediaSources
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumExoMedia.RendererTypepublic interfaceExoMedia.HttpDataSourceFactoryProviderpublic interfaceExoMedia.DataSourceFactoryProviderpublic classExoMedia.Data
-
Method Summary
Modifier and Type Method Description static voidregisterRenderer(ExoMedia.RendererType type, Class<out Renderer> clazz)Registers additional customized com.google.android.exoplayer2.Renderers that will be used by the com.google.android.exoplayer2.source.MediaSources to correctly play media. static voidregisterMediaSourceBuilder(MediaSourceProvider.SourceTypeBuilder builder)Registers additional com.google.android.exoplayer2.source.MediaSources for the specified file extensions (and regexes). static voidsetHttpDataSourceFactoryProvider(ExoMedia.HttpDataSourceFactoryProvider provider)Specifies the provider to use when building com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory instances for use with the com.getstream.sdk.chat.utils.exomedia.core.source.builder.MediaSourceBuilders. static voidsetDataSourceFactoryProvider(ExoMedia.DataSourceFactoryProvider provider)Specifies the provider to use when building com.google.android.exoplayer2.upstream.DataSource.Factory instances for use with the com.getstream.sdk.chat.utils.exomedia.core.source.builder.MediaSourceBuilders. static voidsetLoadControl(LoadControl loadControl)Specifies the LoadControl to use when building the com.google.android.exoplayer2.ExoPlayer instance used in the com.getstream.sdk.chat.utils.exomedia.ui.widget.VideoView and AudioPlayer. -
-
Method Detail
-
registerRenderer
static void registerRenderer(ExoMedia.RendererType type, Class<out Renderer> clazz)
Registers additional customized com.google.android.exoplayer2.Renderers that will be used by the com.google.android.exoplayer2.source.MediaSources to correctly play media.
- Parameters:
type- The type for the rendererclazz- The class of the customized Renderer
-
registerMediaSourceBuilder
static void registerMediaSourceBuilder(MediaSourceProvider.SourceTypeBuilder builder)
Registers additional com.google.android.exoplayer2.source.MediaSources for the specified file extensions (and regexes). com.google.android.exoplayer2.source.MediaSources registered here will take precedence to the pre-configured ones.
- Parameters:
builder- The builder for additional or customized media sources
-
setHttpDataSourceFactoryProvider
@Deprecated() static void setHttpDataSourceFactoryProvider(ExoMedia.HttpDataSourceFactoryProvider provider)
Specifies the provider to use when building com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory instances for use with the com.getstream.sdk.chat.utils.exomedia.core.source.builder.MediaSourceBuilders. This will only be used for builders that haven't customized the buildDataSourceFactory method.
- Parameters:
provider- The provider to use for the s
-
setDataSourceFactoryProvider
static void setDataSourceFactoryProvider(ExoMedia.DataSourceFactoryProvider provider)
Specifies the provider to use when building com.google.android.exoplayer2.upstream.DataSource.Factory instances for use with the com.getstream.sdk.chat.utils.exomedia.core.source.builder.MediaSourceBuilders. This will only be used for builders that haven't customized the buildDataSourceFactory method.
- Parameters:
provider- The provider to use for the s
-
setLoadControl
static void setLoadControl(LoadControl loadControl)
Specifies the LoadControl to use when building the com.google.android.exoplayer2.ExoPlayer instance used in the com.getstream.sdk.chat.utils.exomedia.ui.widget.VideoView and AudioPlayer. This allows the buffering amounts to be modified to better suit your needs which can be easily specified by using an instance of com.google.android.exoplayer2.DefaultLoadControl. When the
loadControlisnullthe default instance of the com.google.android.exoplayer2.DefaultLoadControl will be used. This will only take effect for any instances created after this was set.- Parameters:
loadControl- The to use for any new instances
-
-
-
-