stream static method

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