OmniVideoLayout constructor
OmniVideoLayout({})
Implementation
OmniVideoLayout({
required List<double> timestamps,
required List<double> groupStarts,
required this.tokensPerGroup,
this.soundtrackTokens,
}) : timestamps = List.unmodifiable(timestamps),
groupStarts = List.unmodifiable(groupStarts) {
if (timestamps.isEmpty ||
groupStarts.length != timestamps.length ||
tokensPerGroup <= 0 ||
(soundtrackTokens != null && soundtrackTokens! < 0)) {
throw ArgumentError('invalid video layout');
}
}