Commit a322cd6
committed
docs: fix collision-prone streamSwarmIdBuilder example
The documented example keyed the stream swarm ID on resolution only
(`height ?? 0`). ABR ladders routinely carry several bitrates at the same
resolution, which share a height but have distinct identityHash — so the
second registration hit the collision guard and threw inside the player's
manifest handler, killing P2P for a config copied verbatim from the docs.
Add bitrate to the example and spell out the uniqueness precondition, with
identityHash (reproducible server-side via computeStreamIdentityHash) as the
bulletproof fallback.1 parent 420d798 commit a322cd6
2 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
664 | | - | |
| 664 | + | |
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
669 | 671 | | |
670 | 672 | | |
671 | | - | |
| 673 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
491 | 496 | | |
492 | 497 | | |
493 | 498 | | |
| |||
503 | 508 | | |
504 | 509 | | |
505 | 510 | | |
| 511 | + | |
506 | 512 | | |
507 | | - | |
| 513 | + | |
508 | 514 | | |
509 | 515 | | |
510 | 516 | | |
| |||
0 commit comments