MediaPlayerController class abstract

Controller for AgoraVideoView, used to render media player video.

Implemented types

Properties

canvas → VideoCanvas
Local video display properties. See VideoCanvas.
no setterinherited
connection → RtcConnection?
Connection information. See RtcConnection.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
rtcEngine → RtcEngine
RtcEngine.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useAndroidSurfaceView → bool
Android SurfaceView is only available on Android platform. Whether to use Android SurfaceView to render video: true : Use Android SurfaceView to render video. false : Do not use Android SurfaceView to render video.
no setterinherited
useFlutterTexture → bool
FlutterTexture is only available on iOS, macOS, and Windows platforms. Whether to use FlutterTexture to render video: true : Use FlutterTexture to render video. false : Do not use FlutterTexture to render video.
no setterinherited

Methods

adjustPlayoutVolume(int volume) → Future<void>
Adjusts the local playback volume.
inherited
adjustPublishSignalVolume(int volume) → Future<void>
Adjusts the volume heard by remote users.
inherited
createTextureRender(int uid, RtcConnection? connection, int videoSourceType, int videoViewSetupMode) → Future<int>
inherited
getDuration() → Future<int>
Gets the total duration of the media file.
inherited
getMediaPlayerId() → int
Gets the player ID.
inherited
getMute() → Future<bool>
Gets whether the currently playing media file is muted.
inherited
getPlayoutVolume() → Future<int>
Gets the current local playback volume.
inherited
getPlayPosition() → Future<int>
Gets the current playback position.
inherited
getPlaySrc() → Future<String>
Gets the path of the media resource being played.
inherited
getPublishSignalVolume() → Future<int>
Gets the volume heard by remote users.
inherited
getState() → Future<MediaPlayerState>
Gets the current state of the player.
inherited
getStreamCount() → Future<int>
Gets the number of media streams in the current media file.
inherited
getStreamInfo(int index) → Future<PlayerStreamInfo>
Gets media stream information by stream index.
inherited
initialize() → Future<void>
Creates a MediaPlayerController.
mute(bool muted) → Future<void>
Sets whether to mute.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open({required String url, required int startPos}) → Future<void>
Opens a media resource.
inherited
openWithMediaSource(MediaSource source) → Future<void>
Opens a media resource and sets playback options.
inherited
pause() → Future<void>
Pauses playback.
inherited
play() → Future<void>
Plays the media file.
inherited
playPreloadedSrc(String src) → Future<void>
Plays a preloaded media resource.
inherited
preloadSrc({required String src, required int startPos}) → Future<void>
Preloads a media resource.
inherited
registerAudioFrameObserver({required AudioPcmFrameSink observer, RawAudioFrameOpModeType mode = RawAudioFrameOpModeType.rawAudioFrameOpModeReadOnly}) → void
Registers an audio frame observer.
inherited
registerPlayerSourceObserver(MediaPlayerSourceObserver observer) → void
Registers a playback observer.
inherited
registerVideoFrameObserver(MediaPlayerVideoFrameObserver observer) → void
Registers a video frame observer.
inherited
resume() → Future<void>
Resumes playback after pausing.
inherited
seek(int newPos) → Future<void>
Seeks to the specified playback position in the media file.
inherited
selectAudioTrack(int index) → Future<void>
Specifies the audio track for the current audio file.
inherited
selectMultiAudioTrack({required int playoutTrackIndex, required int publishTrackIndex}) → Future<void>
Selects the audio tracks for local playback and remote publishing.
inherited
setAudioDualMonoMode(AudioDualMonoMode mode) → Future<void>
Sets the channel mode of the current audio file.
inherited
setAudioPitch(int pitch) → Future<void>
Adjusts the pitch of the currently playing media resource.
inherited
setLoopCount(int loopCount) → Future<void>
Sets loop playback.
inherited
setPlaybackSpeed(int speed) → Future<void>
Sets the playback speed of the current audio file.
inherited
setPlayerOptionInInt({required String key, required int value}) → Future<void>
Sets media player options.
inherited
setPlayerOptionInString({required String key, required String value}) → Future<void>
Sets media player options.
inherited
setRenderMode(RenderModeType renderMode) → Future<void>
Sets the rendering mode of the player view.
inherited
setSpatialAudioParams(SpatialAudioParams params) → Future<void>
Enables or disables spatial audio for the media player.
inherited
setView(int view) → Future<void>
Sets the player rendering view.
inherited
stop() → Future<void>
Stops playback.
inherited
switchSrc({required String src, bool syncPts = true}) → Future<void>
Switches the media resource.
inherited
toString() → String
A string representation of this object.
inherited
unloadSrc(String src) → Future<void>
Releases the preloaded media resource.
inherited
unregisterAudioFrameObserver(AudioPcmFrameSink observer) → void
Unregisters the audio frame observer.
inherited
unregisterPlayerSourceObserver(MediaPlayerSourceObserver observer) → void
Unregisters the playback observer.
inherited
unregisterVideoFrameObserver(MediaPlayerVideoFrameObserver observer) → void
Unregisters the video frame observer.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited