bytes static method

PlayerController bytes(
  1. Uint8List media, {
  2. int? id,
  3. bool? autoPlay = true,
  4. bool? once,
})

create file instance

var player = Player.file("/path/to/file.mp3");
player.play();

Implementation

static PlayerController bytes(Uint8List media,
    {int? id, bool? autoPlay = true, bool? once}) {
  return Player.create(
      id: id, media: PlayerMedia.bytes(media), autoPlay: autoPlay, once: once)
    ..init();
}