media property

String get media

Current media.

Implementation

String get media => _media;
set media (String value)

Set media, can be url, file path, assets://path etc.

Implementation

set media(String value) {
  if (_media != value) {
    if (!_videoSize.isCompleted) {
      _videoSize.complete(null);
    }
    _videoSize = Completer<ui.Size?>();
  }
  _media = value;
  final cs = value.toNativeUtf8();
  _player.ref.setMedia
          .asFunction<void Function(Pointer<mdkPlayer>, Pointer<Char>)>()(
      _player.ref.object, cs.cast());
  malloc.free(cs);
}