STWMediaPlayer

open class STWMediaPlayer : STWAudioPlayer

Constructors

Link copied to clipboard
open fun STWMediaPlayer(    @NonNull audioUri: Uri,     @Nullable audioSessionCallback: AttachmentAudioSessionHolder.IAudioSessionCallback,     type: Int)

Functions

Link copied to clipboard
open fun checkPlayBackState()
play or pause the audio session and start from last seek time
Link copied to clipboard
open fun configProgress()
prepare callback to progress view
Link copied to clipboard
open fun getMediaPlayer(): MediaPlayer
Link copied to clipboard
open fun initSTWAudioPlayer(needPlay: Boolean)
Link copied to clipboard
open fun notifyOutPutChange()
Link copied to clipboard
open fun pause(needResetAudioMode: Boolean): Boolean
either session is paused or not
Link copied to clipboard
open fun pauseAudio()
to be called when hosting activity is paused
Link copied to clipboard
open fun refreshPlayer(needChangeActivityVolumeControlStream: Boolean)
Link copied to clipboard
open fun resumePausedSession()
resume only session by an external event
Link copied to clipboard
open fun setAudioDuration(audioDuration: Int)
Link copied to clipboard
open fun setAudioPlayerStreamType()
setAudioPlayerStreamType
Link copied to clipboard
open fun stopSTWAudioPlayer(needResetAudioMode: Boolean)
stop current session

Inherited functions

Link copied to clipboard
open fun getAudioPath(): Uri
Link copied to clipboard
open fun getDuration(): Int
Link copied to clipboard
open fun isStopRequested(): Boolean
Link copied to clipboard
open fun setAudioSessionCallback(@Nullable audioSessionCallback: AttachmentAudioSessionHolder.IAudioSessionCallback)
Link copied to clipboard
open fun setDuration(duration: Int)
Link copied to clipboard
open fun setSeekTime(seekTime: Int)