Method | Description | |
---|---|---|
AquireWifiLock ( ) : void |
Lock the wifi so we can still stream under lock screen
|
|
GetUriFromPath ( Android.Content.Context context, string path ) : string | ||
HandleIntent ( Android.Content.Intent intent ) : void | ||
InitializePlayer ( ) : void |
Intializes the player.
|
|
InitializePlayerWithUrl ( string audioUrl ) : void | ||
OnAudioFocusChange ( AudioFocus focusChange ) : void |
For a good user experience we should account for when audio focus has changed. There is only 1 audio output there may be several media services trying to use it so we should act correctly based on this. "duck" to be quiet and when we gain go full. All applications are encouraged to follow this, but are not enforced.
|
|
OnBind ( Android.Content.Intent intent ) : IBinder | ||
OnCreate ( ) : void |
On create simply detect some of our managers
|
|
OnDestroy ( ) : void |
Properly cleanup of your player by releasing resources
|
|
OnUnbind ( Android.Content.Intent intent ) : bool | ||
Pause ( ) : System.Threading.Tasks.Task | ||
Play ( IEnumerable |
||
Play ( IMediaFile mediaFile = null ) : System.Threading.Tasks.Task | ||
ReleaseWifiLock ( ) : void |
This will release the wifi lock if it is no longer needed
|
|
Seek ( System.TimeSpan position ) : System.Threading.Tasks.Task | ||
SetMediaPlayerDataSource ( ) : Task |
||
SetMediaPlayerOptions ( ) : void | ||
SetVolume ( float leftVolume, float rightVolume ) : void | ||
Stop ( ) : System.Threading.Tasks.Task | ||
TogglePlayPause ( bool forceToPlay ) : System.Threading.Tasks.Task |
Method | Description | |
---|---|---|
OnBufferingChanged ( |
||
OnMediaFailed ( MediaFailedEventArgs e ) : void | ||
OnMediaFileChanged ( |
||
OnMediaFileFailed ( |
||
OnMediaFinished ( |
||
OnPlayingChanged ( |
||
OnStatusChanged ( |
Method | Description | |
---|---|---|
CheckIfFileAlreadyIsPlaying ( IMediaFile mediaFile ) : Task |
Checks if player just paused.
|
|
SetMediaSession ( |
||
ValidateMediaFile ( IMediaFile mediaFile ) : bool |
public static GetUriFromPath ( Android.Content.Context context, string path ) : string | ||
context | Android.Content.Context | |
path | string | |
return | string |
public HandleIntent ( Android.Content.Intent intent ) : void | ||
intent | Android.Content.Intent | |
return | void |
public abstract InitializePlayerWithUrl ( string audioUrl ) : void | ||
audioUrl | string | |
return | void |
public OnAudioFocusChange ( AudioFocus focusChange ) : void | ||
focusChange | AudioFocus | |
return | void |
public OnBind ( Android.Content.Intent intent ) : IBinder | ||
intent | Android.Content.Intent | |
return | IBinder |
protected OnBufferingChanged ( |
||
e | ||
return | void |
protected OnMediaFailed ( MediaFailedEventArgs e ) : void | ||
e | MediaFailedEventArgs | |
return | void |
protected OnMediaFileChanged ( |
||
e | ||
return | void |
protected OnMediaFileFailed ( |
||
e | ||
return | void |
protected OnMediaFinished ( |
||
e | ||
return | void |
protected OnPlayingChanged ( |
||
e | ||
return | void |
protected OnStatusChanged ( |
||
e | ||
return | void |
public OnUnbind ( Android.Content.Intent intent ) : bool | ||
intent | Android.Content.Intent | |
return | bool |
public Pause ( ) : System.Threading.Tasks.Task | ||
return | System.Threading.Tasks.Task |
public abstract Play ( IEnumerable |
||
mediaFiles | IEnumerable |
|
return | System.Threading.Tasks.Task |
public Play ( IMediaFile mediaFile = null ) : System.Threading.Tasks.Task | ||
mediaFile | IMediaFile | |
return | System.Threading.Tasks.Task |
public abstract Seek ( System.TimeSpan position ) : System.Threading.Tasks.Task | ||
position | System.TimeSpan | |
return | System.Threading.Tasks.Task |
public abstract SetMediaPlayerDataSource ( ) : Task |
||
return | Task |
public abstract SetMediaPlayerOptions ( ) : void | ||
return | void |
public abstract SetVolume ( float leftVolume, float rightVolume ) : void | ||
leftVolume | float | |
rightVolume | float | |
return | void |
public Stop ( ) : System.Threading.Tasks.Task | ||
return | System.Threading.Tasks.Task |
public abstract TogglePlayPause ( bool forceToPlay ) : System.Threading.Tasks.Task | ||
forceToPlay | bool | |
return | System.Threading.Tasks.Task |