-
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.Renderersthat will be used by the com.google.android.exoplayer2.source.MediaSources tocorrectly play media. static voidregisterMediaSourceBuilder(MediaSourceProvider.SourceTypeBuilder builder)Registers additional com.google.android.exoplayer2.source.MediaSources for the specified fileextensions (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 instanceused 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.Renderersthat will be used by the com.google.android.exoplayer2.source.MediaSources tocorrectly 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 fileextensions (and regexes). com.google.android.exoplayer2.source.MediaSources registered here will takeprecedence 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 willonly be used for builders that haven't customized the buildDataSourceFactory method.
- Parameters:
provider- The provider to use for the com.getstream.sdk.chat.utils.exomedia.core.source.builder.MediaSourceBuilders
-
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 willonly be used for builders that haven't customized the buildDataSourceFactory method.
- Parameters:
provider- The provider to use for the com.getstream.sdk.chat.utils.exomedia.core.source.builder.MediaSourceBuilders
-
setLoadControl
static void setLoadControl(LoadControl loadControl)
Specifies the LoadControl to use when building the com.google.android.exoplayer2.ExoPlayer instanceused in the com.getstream.sdk.chat.utils.exomedia.ui.widget.VideoView and AudioPlayer. This allows thebuffering 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 onlytake effect for any instances created after this was set.- Parameters:
loadControl- The LoadControl to use for any new com.google.android.exoplayer2.ExoPlayer instances
-
-
-
-