network static method

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

create network instance

var player = Player.network("https://example.com/file.mp3");
player.play();

Implementation

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