1313
1414namespace CommunityToolkit . Maui . Core . Views ;
1515
16+ [ Obsolete ]
1617public partial class MediaManager : Java . Lang . Object , IPlayer . IListener
1718{
1819 readonly SemaphoreSlim seekToSemaphoreSlim = new ( 1 , 1 ) ;
@@ -25,13 +26,15 @@ public partial class MediaManager : Java.Lang.Object, IPlayer.IListener
2526 /// <summary>
2627 /// The platform native counterpart of <see cref="MediaElement"/>.
2728 /// </summary>
29+ [ Obsolete ]
2830 protected StyledPlayerView ? PlayerView { get ; set ; }
2931
3032 /// <summary>
3133 /// Creates the corresponding platform view of <see cref="MediaElement"/> on Android.
3234 /// </summary>
3335 /// <returns>The platform native counterpart of <see cref="MediaElement"/>.</returns>
3436 /// <exception cref="NullReferenceException">Thrown when <see cref="Android.Content.Context"/> is <see langword="null"/> or when the platform view could not be created.</exception>
37+ [ Obsolete ]
3538 public ( PlatformMediaElement platformView , StyledPlayerView PlayerView ) CreatePlatformView ( )
3639 {
3740 ArgumentNullException . ThrowIfNull ( MauiContext . Context ) ;
@@ -56,6 +59,7 @@ public partial class MediaManager : Java.Lang.Object, IPlayer.IListener
5659 /// This is part of the <see cref="IPlayer.IListener"/> implementation.
5760 /// While this method does not seem to have any references, it's invoked at runtime.
5861 /// </remarks>
62+ [ Obsolete ]
5963 public void OnPlaybackParametersChanged ( PlaybackParameters ? playbackParameters )
6064 {
6165 if ( playbackParameters is null )
@@ -78,6 +82,7 @@ public void OnPlaybackParametersChanged(PlaybackParameters? playbackParameters)
7882 /// This is part of the <see cref="IPlayer.IListener"/> implementation.
7983 /// While this method does not seem to have any references, it's invoked at runtime.
8084 /// </remarks>
85+ [ Obsolete ]
8186 public void OnPlayerStateChanged ( bool playWhenReady , int playbackState )
8287 {
8388 if ( Player is null || MediaElement . Source is null )
@@ -126,6 +131,7 @@ or PlaybackStateCompat.StateSkippingToQueueItem
126131 /// This is part of the <see cref="IPlayer.IListener"/> implementation.
127132 /// While this method does not seem to have any references, it's invoked at runtime.
128133 /// </remarks>
134+ [ Obsolete ]
129135 public void OnPlaybackStateChanged ( int playbackState )
130136 {
131137 if ( MediaElement . Source is null )
@@ -160,6 +166,7 @@ public void OnPlaybackStateChanged(int playbackState)
160166 /// This is part of the <see cref="IPlayer.IListener"/> implementation.
161167 /// While this method does not seem to have any references, it's invoked at runtime.
162168 /// </remarks>
169+ [ Obsolete ]
163170 public void OnPlayerError ( PlaybackException ? error )
164171 {
165172 var errorMessage = string . Empty ;
@@ -251,6 +258,7 @@ protected virtual partial void PlatformPause()
251258 Player . Pause ( ) ;
252259 }
253260
261+ [ Obsolete ]
254262 protected virtual async partial Task PlatformSeek ( TimeSpan position , CancellationToken token )
255263 {
256264 if ( Player is null )
@@ -290,6 +298,7 @@ protected virtual partial void PlatformStop()
290298 MediaElement . Position = TimeSpan . Zero ;
291299 }
292300
301+ [ Obsolete ]
293302 protected virtual partial void PlatformUpdateSource ( )
294303 {
295304 var hasSetSource = false ;
@@ -355,6 +364,7 @@ protected virtual partial void PlatformUpdateSource()
355364 }
356365 }
357366
367+ [ Obsolete ]
358368 protected virtual partial void PlatformUpdateAspect ( )
359369 {
360370 if ( PlayerView is null )
@@ -471,6 +481,7 @@ protected virtual partial void PlatformUpdateShouldMute()
471481 Player . Volume = MediaElement . ShouldMute ? 0 : volumeBeforeMute ;
472482 }
473483
484+ [ Obsolete ]
474485 protected virtual partial void PlatformUpdateShouldLoopPlayback ( )
475486 {
476487 if ( Player is null )
@@ -483,26 +494,49 @@ protected virtual partial void PlatformUpdateShouldLoopPlayback()
483494
484495 #region IPlayer.IListener implementation method stubs
485496
497+ [ Obsolete ]
486498 public void OnAudioAttributesChanged ( AudioAttributes ? audioAttributes ) { }
487499 public void OnAudioSessionIdChanged ( int audioSessionId ) { }
500+
501+ [ Obsolete ]
488502 public void OnAvailableCommandsChanged ( IPlayer . Commands ? availableCommands ) { }
503+
504+ [ Obsolete ]
489505 public void OnCues ( CueGroup ? cueGroup ) { }
506+
507+ [ Obsolete ]
490508 public void OnCues ( List < Cue > cues ) { }
509+
510+ [ Obsolete ]
491511 public void OnDeviceInfoChanged ( Com . Google . Android . Exoplayer2 . DeviceInfo ? deviceInfo ) { }
492512 public void OnDeviceVolumeChanged ( int volume , bool muted ) { }
513+
514+ [ Obsolete ]
493515 public void OnEvents ( IPlayer ? player , IPlayer . Events ? events ) { }
494516 public void OnIsLoadingChanged ( bool isLoading ) { }
495517 public void OnIsPlayingChanged ( bool isPlaying ) { }
496518 public void OnLoadingChanged ( bool isLoading ) { }
497519 public void OnMaxSeekToPreviousPositionChanged ( long maxSeekToPreviousPositionMs ) { }
520+
521+ [ Obsolete ]
498522 public void OnMediaItemTransition ( MediaItem ? mediaItem , int transition ) { }
523+
524+ [ Obsolete ]
499525 public void OnMediaMetadataChanged ( MediaMetadata ? mediaMetadata ) { }
526+
527+ [ Obsolete ]
500528 public void OnMetadata ( Metadata ? metadata ) { }
501529 public void OnPlaybackSuppressionReasonChanged ( int playbackSuppressionReason ) { }
530+
531+ [ Obsolete ]
502532 public void OnPlayerErrorChanged ( PlaybackException ? error ) { }
533+
534+ [ Obsolete ]
503535 public void OnPlaylistMetadataChanged ( MediaMetadata ? mediaMetadata ) { }
504536 public void OnPlayWhenReadyChanged ( bool playWhenReady , int reason ) { }
505537 public void OnPositionDiscontinuity ( int reason ) { }
538+
539+ [ Obsolete ]
506540 public void OnPositionDiscontinuity ( IPlayer . PositionInfo oldPosition , IPlayer . PositionInfo newPosition , int reason ) { }
507541 public void OnRenderedFirstFrame ( ) { }
508542 public void OnRepeatModeChanged ( int repeatMode ) { }
@@ -511,9 +545,17 @@ public void OnSeekForwardIncrementChanged(long seekForwardIncrementMs) { }
511545 public void OnShuffleModeEnabledChanged ( bool shuffleModeEnabled ) { }
512546 public void OnSkipSilenceEnabledChanged ( bool skipSilenceEnabled ) { }
513547 public void OnSurfaceSizeChanged ( int width , int height ) { }
548+
549+ [ Obsolete ]
514550 public void OnTimelineChanged ( Timeline ? timeline , int reason ) { }
551+
552+ [ Obsolete ]
515553 public void OnTracksChanged ( Tracks ? tracks ) { }
554+
555+ [ Obsolete ]
516556 public void OnTrackSelectionParametersChanged ( TrackSelectionParameters ? trackSelectionParameters ) { }
557+
558+ [ Obsolete ]
517559 public void OnVideoSizeChanged ( VideoSize ? videoSize ) { }
518560
519561 #endregion
0 commit comments