diff --git a/RELEASENOTES.md b/RELEASENOTES.md index c26ad50998..edebeb422d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -22,6 +22,10 @@ `PlayerView.setDefaultArtwork(Drawable)` instead. * `PlayerView.setShowBuffering(boolean)`. Use `PlayerView.setShowBuffering(int)` instead. + * `SimpleExoPlayer.clearMetadataOutput(MetadataOutput)`. Use + `SimpleExoPlayer.removeMetadataOutput(MetadataOutput)` instead. + * `SimpleExoPlayer.clearTextOutput(TextOutput)`. Use + `SimpleExoPlayer.removeTextOutput(TextOutput)` instead. * `SimpleExoPlayer.clearVideoListener()`. Use `SimpleExoPlayer.removeVideoListener(VideoListener)` instead. * `SimpleExoPlayer.getAudioStreamType()`. Use @@ -31,8 +35,18 @@ instead. * `SimpleExoPlayer.setAudioStreamType(int)`. Use `SimpleExoPlayer.setAudioAttributes(AudioAttributes)` instead. + * `SimpleExoPlayer.setMetadataOutput(MetadataOutput)`. Use + `SimpleExoPlayer.addMetadataOutput(MetadataOutput)` instead. If your + application is calling `SimpleExoPlayer.setMetadataOutput(null)`, + make sure to replace this call with + `SimpleExoPlayer.removeMetadataOutput(MetadataOutput)`. * `SimpleExoPlayer.setPlaybackParams(PlaybackParams)`. Use `SimpleExoPlayer.setPlaybackParameters(PlaybackParameters)` instead. + * `SimpleExoPlayer.setTextOutput(TextOutput)`. Use + `SimpleExoPlayer.addTextOutput(TextOutput)` instead. If your + application is calling `SimpleExoPlayer.setTextOutput(null)`, make + sure to replace this call with + `SimpleExoPlayer.removeTextOutput(TextOutput)`. * `SimpleExoPlayer.setVideoDebugListener(VideoRendererEventListener)`. Use `SimpleExoPlayer.addAnalyticsListener(AnalyticsListener)` instead. diff --git a/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java b/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java index 1971979c52..44c791778e 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java @@ -1201,31 +1201,6 @@ public class SimpleExoPlayer extends BasePlayer return currentCues; } - /** - * Sets an output to receive text events, removing all existing outputs. - * - * @param output The output. - * @deprecated Use {@link #addTextOutput(TextOutput)}. - */ - @Deprecated - public void setTextOutput(TextOutput output) { - textOutputs.clear(); - if (output != null) { - addTextOutput(output); - } - } - - /** - * Equivalent to {@link #removeTextOutput(TextOutput)}. - * - * @param output The output to clear. - * @deprecated Use {@link #removeTextOutput(TextOutput)}. - */ - @Deprecated - public void clearTextOutput(TextOutput output) { - removeTextOutput(output); - } - @Override public void addMetadataOutput(MetadataOutput listener) { // Don't verify application thread. We allow calls to this method from any thread. @@ -1239,31 +1214,6 @@ public class SimpleExoPlayer extends BasePlayer metadataOutputs.remove(listener); } - /** - * Sets an output to receive metadata events, removing all existing outputs. - * - * @param output The output. - * @deprecated Use {@link #addMetadataOutput(MetadataOutput)}. - */ - @Deprecated - public void setMetadataOutput(MetadataOutput output) { - metadataOutputs.retainAll(Collections.singleton(analyticsCollector)); - if (output != null) { - addMetadataOutput(output); - } - } - - /** - * Equivalent to {@link #removeMetadataOutput(MetadataOutput)}. - * - * @param output The output to clear. - * @deprecated Use {@link #removeMetadataOutput(MetadataOutput)}. - */ - @Deprecated - public void clearMetadataOutput(MetadataOutput output) { - removeMetadataOutput(output); - } - /** * @deprecated Use {@link #addAnalyticsListener(AnalyticsListener)} to get more detailed debug * information.