Search in sources :

Example 26 with UnstableApi

use of androidx.media3.common.util.UnstableApi in project media by androidx.

the class PlaybackParameters method toBundle.

@UnstableApi
@Override
public Bundle toBundle() {
    Bundle bundle = new Bundle();
    bundle.putFloat(keyForField(FIELD_SPEED), speed);
    bundle.putFloat(keyForField(FIELD_PITCH), pitch);
    return bundle;
}
Also used : Bundle(android.os.Bundle) UnstableApi(androidx.media3.common.util.UnstableApi)

Example 27 with UnstableApi

use of androidx.media3.common.util.UnstableApi in project media by androidx.

the class SessionCommand method toBundle.

@UnstableApi
@Override
public Bundle toBundle() {
    Bundle bundle = new Bundle();
    bundle.putInt(keyForField(FIELD_COMMAND_CODE), commandCode);
    bundle.putString(keyForField(FIELD_CUSTOM_ACTION), customAction);
    bundle.putBundle(keyForField(FIELD_CUSTOM_EXTRAS), customExtras);
    return bundle;
}
Also used : Bundle(android.os.Bundle) UnstableApi(androidx.media3.common.util.UnstableApi)

Example 28 with UnstableApi

use of androidx.media3.common.util.UnstableApi in project media by androidx.

the class SessionToken method toBundle.

@UnstableApi
@Override
public Bundle toBundle() {
    Bundle bundle = new Bundle();
    if (impl instanceof SessionTokenImplBase) {
        bundle.putInt(keyForField(FIELD_IMPL_TYPE), IMPL_TYPE_BASE);
    } else {
        bundle.putInt(keyForField(FIELD_IMPL_TYPE), IMPL_TYPE_LEGACY);
    }
    bundle.putBundle(keyForField(FIELD_IMPL), impl.toBundle());
    return bundle;
}
Also used : Bundle(android.os.Bundle) UnstableApi(androidx.media3.common.util.UnstableApi)

Example 29 with UnstableApi

use of androidx.media3.common.util.UnstableApi in project media by androidx.

the class ImaAdsLoader method start.

@UnstableApi
@Override
public void start(AdsMediaSource adsMediaSource, DataSpec adTagDataSpec, Object adsId, AdViewProvider adViewProvider, EventListener eventListener) {
    checkState(wasSetPlayerCalled, "Set player using adsLoader.setPlayer before preparing the player.");
    if (adTagLoaderByAdsMediaSource.isEmpty()) {
        player = nextPlayer;
        @Nullable Player player = this.player;
        if (player == null) {
            return;
        }
        player.addListener(playerListener);
    }
    @Nullable AdTagLoader adTagLoader = adTagLoaderByAdsId.get(adsId);
    if (adTagLoader == null) {
        requestAds(adTagDataSpec, adsId, adViewProvider.getAdViewGroup());
        adTagLoader = adTagLoaderByAdsId.get(adsId);
    }
    adTagLoaderByAdsMediaSource.put(adsMediaSource, checkNotNull(adTagLoader));
    adTagLoader.addListenerWithAdView(eventListener, adViewProvider);
    maybeUpdateCurrentAdTagLoader();
}
Also used : VideoAdPlayer(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer) Player(androidx.media3.common.Player) Nullable(androidx.annotation.Nullable) UnstableApi(androidx.media3.common.util.UnstableApi)

Aggregations

UnstableApi (androidx.media3.common.util.UnstableApi)29 Bundle (android.os.Bundle)26 Nullable (androidx.annotation.Nullable)3 ArrayList (java.util.ArrayList)3 MediaItem (androidx.media3.common.MediaItem)2 BundleableUtil.fromNullableBundle (androidx.media3.common.util.BundleableUtil.fromNullableBundle)2 Handler (android.os.Handler)1 HandlerThread (android.os.HandlerThread)1 ResultReceiver (android.os.ResultReceiver)1 MediaControllerCompat (android.support.v4.media.session.MediaControllerCompat)1 MediaSessionCompat (android.support.v4.media.session.MediaSessionCompat)1 CallSuper (androidx.annotation.CallSuper)1 BundleListRetriever (androidx.media3.common.BundleListRetriever)1 Format (androidx.media3.common.Format)1 Player (androidx.media3.common.Player)1 AdsMediaSource (androidx.media3.exoplayer.source.ads.AdsMediaSource)1 DefaultExtractorsFactory (androidx.media3.extractor.DefaultExtractorsFactory)1 Extractor (androidx.media3.extractor.Extractor)1 ExtractorsFactory (androidx.media3.extractor.ExtractorsFactory)1 SubtitleExtractor (androidx.media3.extractor.text.SubtitleExtractor)1