file static method

PlayerController file(
  1. String 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 file(String media,
    {int? id, bool? autoPlay = true, bool? once}) {
  return Player.create(
      id: id, media: PlayerMedia.file(media), autoPlay: autoPlay, once: once)
    ..init();
}