Add onSegmentPopped, add more tests, improve validation, improve M3U8 grammar

This commit is contained in:
Vanilagy
2026-04-16 14:48:57 +02:00
parent f99adf2208
commit 56b25fbdf8
5 changed files with 102 additions and 2 deletions
+5
View File
@@ -179,11 +179,16 @@ export class OutputTrackGroup {
/**
* Marks this group as being pairable with another group, symmetrically. Output tracks where each track is assigned
* to one half of a group pairing are then considered pairable.
*
* You cannot pair a group with itself.
*/
pairWith(other: OutputTrackGroup) {
if (!(other instanceof OutputTrackGroup)) {
throw new TypeError('other must be an OutputTrackGroup.');
}
if (this === other) {
throw new TypeError('Cannot pair a group with itself.');
}
this._pairedGroups.add(other);
other._pairedGroups.add(this);