MediaPlayerController class abstract

The AgoraVideoView controller used to render the video for the media player.

Implemented types

Properties

canvas VideoCanvas
The local video view and settings. See VideoCanvas.
no setterinherited
connection RtcConnection?
The 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
Whether to use Android SurfaceView to render video: true : Use Android SurfaceView to render video. false : Do not use Android SurfaceView to render video. Android SurfaceView applies to Android platform only.
no setterinherited
useFlutterTexture bool
Whether to use FlutterTexture to render video: true : Use FlutterTexture to render video. false : Do not use FlutterTexture to render video. FlutterTexture applies to iOS, macOS and Windows platforms.
no setterinherited

Methods

adjustPlayoutVolume(int volume) Future<void>
Adjusts the local playback volume.
inherited
adjustPublishSignalVolume(int volume) Future<void>
Adjusts the volume of the media file for publishing.
inherited
createTextureRender(int uid, String channelId, int videoSourceType, int videoViewSetupMode) Future<int>
inherited
getDuration() Future<int>
Gets the duration of the media resource.
inherited
getMediaPlayerId() int
Gets the ID of the media player.
inherited
getMute() Future<bool>
Reports whether the media resource is muted.
inherited
getPlayoutVolume() Future<int>
Gets the local playback volume.
inherited
getPlayPosition() Future<int>
Gets current local playback progress.
inherited
getPlaySrc() Future<String>
Gets the path of the media resource being played.
inherited
getPublishSignalVolume() Future<int>
Gets the volume of the media file for publishing.
inherited
getState() Future<MediaPlayerState>
Gets current playback state.
inherited
getStreamCount() Future<int>
Gets the number of the media streams in the media resource.
inherited
getStreamInfo(int index) Future<PlayerStreamInfo>
Gets the detailed information of the media stream.
inherited
initialize() Future<void>
Creates a MediaPlayerController.
mute(bool muted) Future<void>
Sets whether to mute the media file.
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 the media resource.
inherited
openWithMediaSource(MediaSource source) Future<void>
Opens a media file and configures the playback scenarios.
inherited
pause() Future<void>
Pauses the playback.
inherited
play() Future<void>
Plays the media file.
inherited
playPreloadedSrc(String src) Future<void>
Plays preloaded media resources.
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 object.
inherited
registerPlayerSourceObserver(MediaPlayerSourceObserver observer) → void
Registers a media player observer.
inherited
registerVideoFrameObserver(MediaPlayerVideoFrameObserver observer) → void
Registers a video frame observer object.
inherited
resume() Future<void>
Resumes playing the media file.
inherited
seek(int newPos) Future<void>
Seeks to a new playback position.
inherited
selectAudioTrack(int index) Future<void>
Selects the audio track used during playback.
inherited
selectMultiAudioTrack({required int playoutTrackIndex, required int publishTrackIndex}) Future<void>
Selects the audio tracks that you want to play on your local device and publish to the channel respectively.
inherited
setAudioDualMonoMode(AudioDualMonoMode mode) Future<void>
Sets the channel mode of the current audio file.
inherited
setAudioPitch(int pitch) Future<void>
Sets the pitch of the current media resource.
inherited
setLoopCount(int loopCount) Future<void>
Sets the loop playback.
inherited
setPlaybackSpeed(int speed) Future<void>
Sets the channel mode 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 render mode of the media player.
inherited
setSpatialAudioParams(SpatialAudioParams params) Future<void>
Enables or disables the spatial audio effect for the media player.
inherited
setView(int view) Future<void>
Sets the view.
inherited
stop() Future<void>
Stops playing the media track.
inherited
switchSrc({required String src, bool syncPts = true}) Future<void>
Switches the media resource being played.
inherited
toString() String
A string representation of this object.
inherited
unloadSrc(String src) Future<void>
Unloads media resources that are preloaded.
inherited
unregisterAudioFrameObserver(AudioPcmFrameSink observer) → void
Unregisters an audio frame observer.
inherited
unregisterPlayerSourceObserver(MediaPlayerSourceObserver observer) → void
Releases a media player observer.
inherited
unregisterVideoFrameObserver(MediaPlayerVideoFrameObserver observer) → void
Unregisters the video frame observer.
inherited

Operators

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