StreamContainer.parse constructor

StreamContainer.parse(
  1. String name
)

Parse a container from name.

Implementation

factory StreamContainer.parse(String name) {
  return switch (name.toLowerCase()) {
    'mp4' => StreamContainer.mp4,
    'webm' => StreamContainer.webM,
    '3gpp' => StreamContainer.tgpp,
    'm3u8' => StreamContainer.m3u8,
    _ => throw ArgumentError.value(
        name, 'name', 'Valid values: mp4, webm, 3gpp'),
  };
}