mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 13:23:51 +02:00
Add onSegmentPopped, add more tests, improve validation, improve M3U8 grammar
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user