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 )
@@ -127,6 +132,7 @@ or PlaybackStateCompat.StateSkippingToQueueItem
127132 /// This is part of the <see cref="IPlayer.IListener"/> implementation.
128133 /// While this method does not seem to have any references, it's invoked at runtime.
129134 /// </remarks>
135+ [ Obsolete ]
130136 public void OnPlaybackStateChanged ( int playbackState )
131137 {
132138 if ( MediaElement . Source is null )
@@ -161,6 +167,7 @@ public void OnPlaybackStateChanged(int playbackState)
161167 /// This is part of the <see cref="IPlayer.IListener"/> implementation.
162168 /// While this method does not seem to have any references, it's invoked at runtime.
163169 /// </remarks>
170+ [ Obsolete ]
164171 public void OnPlayerError ( PlaybackException ? error )
165172 {
166173 var errorMessage = string . Empty ;
@@ -252,6 +259,7 @@ protected virtual partial void PlatformPause()
252259 Player . Pause ( ) ;
253260 }
254261
262+ [ Obsolete ]
255263 protected virtual async partial Task PlatformSeek ( TimeSpan position , CancellationToken token )
256264 {
257265 if ( Player is null )
@@ -291,6 +299,7 @@ protected virtual partial void PlatformStop()
291299 MediaElement . Position = TimeSpan . Zero ;
292300 }
293301
302+ [ Obsolete ]
294303 protected virtual partial void PlatformUpdateSource ( )
295304 {
296305 var hasSetSource = false ;
@@ -356,6 +365,7 @@ protected virtual partial void PlatformUpdateSource()
356365 }
357366 }
358367
368+ [ Obsolete ]
359369 protected virtual partial void PlatformUpdateAspect ( )
360370 {
361371 if ( PlayerView is null )
@@ -472,6 +482,7 @@ protected virtual partial void PlatformUpdateShouldMute()
472482 Player . Volume = MediaElement . ShouldMute ? 0 : volumeBeforeMute ;
473483 }
474484
485+ [ Obsolete ]
475486 protected virtual partial void PlatformUpdateShouldLoopPlayback ( )
476487 {
477488 if ( Player is null )
@@ -484,26 +495,49 @@ protected virtual partial void PlatformUpdateShouldLoopPlayback()
484495
485496 #region IPlayer.IListener implementation method stubs
486497
498+ [ Obsolete ]
487499 public void OnAudioAttributesChanged ( AudioAttributes ? audioAttributes ) { }
488500 public void OnAudioSessionIdChanged ( int audioSessionId ) { }
501+
502+ [ Obsolete ]
489503 public void OnAvailableCommandsChanged ( IPlayer . Commands ? availableCommands ) { }
504+
505+ [ Obsolete ]
490506 public void OnCues ( CueGroup ? cueGroup ) { }
507+
508+ [ Obsolete ]
491509 public void OnCues ( List < Cue > cues ) { }
510+
511+ [ Obsolete ]
492512 public void OnDeviceInfoChanged ( Com . Google . Android . Exoplayer2 . DeviceInfo ? deviceInfo ) { }
493513 public void OnDeviceVolumeChanged ( int volume , bool muted ) { }
514+
515+ [ Obsolete ]
494516 public void OnEvents ( IPlayer ? player , IPlayer . Events ? events ) { }
495517 public void OnIsLoadingChanged ( bool isLoading ) { }
496518 public void OnIsPlayingChanged ( bool isPlaying ) { }
497519 public void OnLoadingChanged ( bool isLoading ) { }
498520 public void OnMaxSeekToPreviousPositionChanged ( long maxSeekToPreviousPositionMs ) { }
521+
522+ [ Obsolete ]
499523 public void OnMediaItemTransition ( MediaItem ? mediaItem , int transition ) { }
524+
525+ [ Obsolete ]
500526 public void OnMediaMetadataChanged ( MediaMetadata ? mediaMetadata ) { }
527+
528+ [ Obsolete ]
501529 public void OnMetadata ( Metadata ? metadata ) { }
502530 public void OnPlaybackSuppressionReasonChanged ( int playbackSuppressionReason ) { }
531+
532+ [ Obsolete ]
503533 public void OnPlayerErrorChanged ( PlaybackException ? error ) { }
534+
535+ [ Obsolete ]
504536 public void OnPlaylistMetadataChanged ( MediaMetadata ? mediaMetadata ) { }
505537 public void OnPlayWhenReadyChanged ( bool playWhenReady , int reason ) { }
506538 public void OnPositionDiscontinuity ( int reason ) { }
539+
540+ [ Obsolete ]
507541 public void OnPositionDiscontinuity ( IPlayer . PositionInfo oldPosition , IPlayer . PositionInfo newPosition , int reason ) { }
508542 public void OnRenderedFirstFrame ( ) { }
509543 public void OnRepeatModeChanged ( int repeatMode ) { }
@@ -512,9 +546,17 @@ public void OnSeekForwardIncrementChanged(long seekForwardIncrementMs) { }
512546 public void OnShuffleModeEnabledChanged ( bool shuffleModeEnabled ) { }
513547 public void OnSkipSilenceEnabledChanged ( bool skipSilenceEnabled ) { }
514548 public void OnSurfaceSizeChanged ( int width , int height ) { }
549+
550+ [ Obsolete ]
515551 public void OnTimelineChanged ( Timeline ? timeline , int reason ) { }
552+
553+ [ Obsolete ]
516554 public void OnTracksChanged ( Tracks ? tracks ) { }
555+
556+ [ Obsolete ]
517557 public void OnTrackSelectionParametersChanged ( TrackSelectionParameters ? trackSelectionParameters ) { }
558+
559+ [ Obsolete ]
518560 public void OnVideoSizeChanged ( VideoSize ? videoSize ) { }
519561
520562 #endregion
0 commit comments