canUserParser static method

bool canUserParser(
  1. RandomAccessFile reader
)

Check if the OGG parser can be use for a specific file

Implementation

static bool canUserParser(RandomAccessFile reader) {
  reader.setPositionSync(0);

  final capturePatternBytes = reader.readSync(4);
  final capturePattern = String.fromCharCodes(capturePatternBytes);

  return capturePattern == "OggS";
}