public final class

ImaServerSideAdInsertionMediaSource.Factory

extends java.lang.Object

implements MediaSource.Factory

 java.lang.Object

↳androidx.media3.exoplayer.ima.ImaServerSideAdInsertionMediaSource.Factory

Overview

Factory for creating ImaServerSideAdInsertionMediaSources.

Apps can use the ImaServerSideAdInsertionMediaSource.Factory to customized the DefaultMediaSourceFactory that is used to build a player:

Summary

Constructors
publicFactory(ImaServerSideAdInsertionMediaSource.AdsLoader adsLoader, MediaSource.Factory contentMediaSourceFactory)

Creates a new factory for ImaServerSideAdInsertionMediaSources.

Methods
public MediaSourcecreateMediaSource(MediaItem mediaItem)

public int[]getSupportedTypes()

public MediaSource.FactorysetDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider)

public MediaSource.FactorysetLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Factory(ImaServerSideAdInsertionMediaSource.AdsLoader adsLoader, MediaSource.Factory contentMediaSourceFactory)

Creates a new factory for ImaServerSideAdInsertionMediaSources.

Parameters:

adsLoader: The ImaServerSideAdInsertionMediaSource.AdsLoader.
contentMediaSourceFactory: The content media source factory to create content sources.

Methods

public MediaSource.Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy)

public MediaSource.Factory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider)

public int[] getSupportedTypes()

public MediaSource createMediaSource(MediaItem mediaItem)