FVPControllerExtensions extension

Advanced features for VideoPlayerController.

All methods in this extension must be called after initialized, otherwise no effect.

on
  • VideoPlayerController

Methods

fastSeekTo(Duration position) Future<void>
fast seek to a key frame
isLive() bool
Indicates whether current media is a live stream or not
record({String? to, String? format}) → void
Start to record if to is not null. Stop recording if to is null. to can be a local file, or are network stream, for example rtmp. If not stopped by user, recording will be stopped when playback is finished. https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-recordconst-char-url--nullptr-const-char-format--nullptr
setAudioTracks(List<int> value) → void
Set active audio tracks. Other tracks will be disabled. The tracks can be from data source from VideoPlayerController constructor, or an external audio data source via setExternalAudio https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setactivetracksmediatype-type-const-stdsetint-tracks
setBrightness(double value) → void
set brightness. -1 <= value <= 1
setBufferRange({int min = -1, int max = -1, bool drop = false}) → void
Set duration range(milliseconds) of buffered data.
setContrast(double value) → void
set contrast. -1 <= value <= 1
setExternalAudio(String uri) → void
set an external audio data source https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setmediaconst-char-url-mediatype-type
setExternalSubtitle(String uri) → void
set an external subtitle data source https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setmediaconst-char-url-mediatype-type
setExternalVideo(String uri) → void
set an external video data source https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setmediaconst-char-url-mediatype-type
setHue(double value) → void
set hue. -1 <= value <= 1
setProperty(String name, String value) → void
set additional properties https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setpropertyconst-stdstring-key-const-stdstring-value
setRange({required int from, int to = -1}) → void
Set position range in milliseconds. Can be used by A-B loop. https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setrangeint64_t-a-int64_t-b--int64_max
setSaturation(double value) → void
set saturation. -1 <= value <= 1
setSubtitleTracks(List<int> value) → void
Set active subtitle tracks. Other tracks will be disabled. The tracks can be from data source from VideoPlayerController constructor, or an external subtitle data source via setExternalSubtitle https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setactivetracksmediatype-type-const-stdsetint-tracks
setVideoDecoders(List<String> value) → void
Change video decoder list on the fly. NOTE: the default decoder list used by VideoPlayerController constructor MUST set via registerWith. Detail: https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setdecodersmediatype-type-const-stdvectorstdstring-names
setVideoTracks(List<int> value) → void
Set active video tracks. Other tracks will be disabled. The tracks can be from data source from VideoPlayerController constructor, or an external video data source via setExternalVideo https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setactivetracksmediatype-type-const-stdsetint-tracks
snapshot({int? width, int? height}) Future<Uint8List?>
Take a snapshot for current rendered frame.
step({int frames = 1}) Future<void>
Step forward or backward. Step forward if frame > 0, backward otherwise.