parse method

Container parse (
  1. String name
)

Parse a container from name.

Implementation

static Container parse(String name) {
  if (name.toLowerCase() == 'mp4') {
    return Container.mp4;
  }
  if (name.toLowerCase() == 'webm') {
    return Container.webM;
  }
  if (name.toLowerCase() == '3gpp') {
    return Container.tgpp;
  }

  throw ArgumentError.value(name, 'name', 'Valid values: mp4, webm, 3gpp');
}