mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
Remove deprecated ExoPlayerFactory
PiperOrigin-RevId: 369934240
This commit is contained in:
parent
c01d26f86b
commit
11ce80d0fa
@ -75,8 +75,7 @@
|
||||
* Library restructuring:
|
||||
* `DebugTextViewHelper` moved from `ui` package to `util` package.
|
||||
* Remove deprecated symbols:
|
||||
* Remove `ExoPlayerFactory` methods. Use `SimpleExoPlayer.Builder`
|
||||
instead.
|
||||
* Remove `ExoPlayerFactory`. Use `SimpleExoPlayer.Builder` instead.
|
||||
* Remove `Player.DefaultEventListener`. Use `Player.EventListener`
|
||||
instead.
|
||||
* Remove `DownloadNotificationUtil`. Use `DownloadNotificationHelper`
|
||||
@ -86,15 +85,14 @@
|
||||
* Remove `DefaultMediaSourceEventListener`. Use `MediaSourceEventListener`
|
||||
instead.
|
||||
* Remove `ExtractorMediaSource`. Use `ProgressiveMediaSource` instead.
|
||||
* Remove
|
||||
`NotificationUtil.createNotificationChannel(Context, String, int, int)`.
|
||||
Use `createNotificationChannel(Context, String, int, int, int)`
|
||||
* Remove `NotificationUtil.createNotificationChannel(Context, String, int,
|
||||
int)`. Use `createNotificationChannel(Context, String, int, int, int)`
|
||||
instead.
|
||||
* Remove `PlayerNotificationManager.NotificationListener`
|
||||
`onNotificationStarted(int, Notification)` and
|
||||
`onNotificationCancelled(int)`. Use
|
||||
`onNotificationPosted(int, Notification, boolean)` and
|
||||
`onNotificationCancelled(int, boolean)` instead.
|
||||
`onNotificationCancelled(int)`. Use `onNotificationPosted(int,
|
||||
Notification, boolean)` and `onNotificationCancelled(int, boolean)`
|
||||
instead.
|
||||
* Remove `PlayerNotificationManager.setNotificationListener`. Use
|
||||
`PlayerNotificationManager.Builder.setNotificationListener` instead.
|
||||
* Remove `DashManifest` constructor. Use the remaining constructor with
|
||||
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer2;
|
||||
|
||||
import android.content.Context;
|
||||
import com.google.android.exoplayer2.analytics.AnalyticsCollector;
|
||||
import com.google.android.exoplayer2.source.DefaultMediaSourceFactory;
|
||||
import com.google.android.exoplayer2.trackselection.TrackSelector;
|
||||
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter;
|
||||
import com.google.android.exoplayer2.util.Clock;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
|
||||
/** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
|
||||
@Deprecated
|
||||
public final class ExoPlayerFactory {
|
||||
|
||||
private ExoPlayerFactory() {}
|
||||
|
||||
/** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
|
||||
@Deprecated
|
||||
@SuppressWarnings("deprecation")
|
||||
public static SimpleExoPlayer newSimpleInstance(Context context, TrackSelector trackSelector) {
|
||||
return newSimpleInstance(context, new DefaultRenderersFactory(context), trackSelector);
|
||||
}
|
||||
|
||||
/** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
|
||||
@Deprecated
|
||||
@SuppressWarnings("deprecation")
|
||||
public static SimpleExoPlayer newSimpleInstance(
|
||||
Context context, RenderersFactory renderersFactory, TrackSelector trackSelector) {
|
||||
return newSimpleInstance(context, renderersFactory, trackSelector, new DefaultLoadControl());
|
||||
}
|
||||
|
||||
/** @deprecated Use {@link SimpleExoPlayer.Builder} instead. */
|
||||
@Deprecated
|
||||
@SuppressWarnings("deprecation")
|
||||
public static SimpleExoPlayer newSimpleInstance(
|
||||
Context context,
|
||||
RenderersFactory renderersFactory,
|
||||
TrackSelector trackSelector,
|
||||
LoadControl loadControl) {
|
||||
return new SimpleExoPlayer(
|
||||
context,
|
||||
renderersFactory,
|
||||
trackSelector,
|
||||
new DefaultMediaSourceFactory(context),
|
||||
loadControl,
|
||||
DefaultBandwidthMeter.getSingletonInstance(context),
|
||||
new AnalyticsCollector(Clock.DEFAULT),
|
||||
/* useLazyPreparation= */ true,
|
||||
Clock.DEFAULT,
|
||||
Util.getCurrentOrMainLooper());
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user