forked from Dash-Industry-Forum/dash.js
-
Notifications
You must be signed in to change notification settings - Fork 0
SGAI: alternative and list mpd #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
cotid-qualabs
wants to merge
314
commits into
development
Choose a base branch
from
sgai/alternative-mpd
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
314 commits
Select commit
Hold shift + click to select a range
90d3c83
Merge pull request #43 from qualabs/alternative/max-duration
sebastianpiq 5c3995c
Merge pull request #46 from qualabs/alternative/return-offset
sebastianpiq a8ffdab
merge alternative-media-presentations
sebastianpiq 5581320
Merge pull request #44 from qualabs/alternative/start-at-playhead
sebastianpiq 74bdd09
Fix clip+startAtPlayhead and maxDurations bugs
sebastianpiq 8ba35db
Fix alternative player don't return
sebastianpiq 3552c63
Fix alternative event earliestResolutionTimeOffset attribute
sebastianpiq 0de5b4d
Merge branch 'alternative/add-logger' into demo-bug-fixes
sebastianpiq b3c4a46
Merge branch 'alternative/update-constants' into demo-bug-fixes
sebastianpiq d244a49
Fix merge logger and constants bugs
sebastianpiq e089428
Remove parse alternative mpd event unnecesary if conditions
sebastianpiq 13970c7
Only Alternative MPD replace events can be used used for dynamic MPD
tatiana-perera da5bfd5
Fix alternative events not triggered without event duration
sebastianpiq 1ca952f
Fix wrong clip and startAtPlayhead return time
sebastianpiq d799b98
Include t anchor with startAtPlayhead
tatiana-perera a238d42
Changed doble quotes to single ones
tatiana-perera 87482a2
Merged demo-bug-fixes into current branch
tatiana-perera e3d03fa
Now, the t anchor is obtained with a regEx
tatiana-perera f7bb729
Merge pull request #48 from qualabs/feature/alternative-startAtPlayHe…
tatiana-perera 5a05014
Now the alternative duration is the minimum of max duration and the a…
tatiana-perera 22d412d
Fix bug multi alternative events
sebastianpiq 3c7c1fe
Merge pull request #47 from qualabs/demo-bug-fixes
tatiana-perera f134052
Fix baseURL issues
sebastianpiq 6b7b8ae
Add default (60 seconds) to the erliestResolutionTimeOffset
sebastianpiq f1fc5d8
Add default value to the earliestResolutionTimeOffset
sebastianpiq f3510ee
add sample page for List MPDs
cotid-qualabs 2129527
Merge pull request #54 from qualabs/mpd-lists/earliestresolutionTimeD…
cotid-qualabs 576993c
Update samples/list-mpds/list-mpds.html
cotid-qualabs 84c7823
Update samples/list-mpds/list-mpds.html
cotid-qualabs eb38a07
wording update on case 8 for list mpds sample
cotid-qualabs 4eb03e2
Merge branch 'mpd-lists/sample-page' of github_qualabs:qualabs/dash.j…
cotid-qualabs bbf8665
Update samples/list-mpds/list-mpds.html
cotid-qualabs ad68721
wording update on case 8 for list mpds sample
cotid-qualabs 0d9fe88
Merge branch 'mpd-lists/sample-page' of github_qualabs:qualabs/dash.j…
cotid-qualabs 5441697
wording update on case 8 for list mpds sample
cotid-qualabs 5c80924
remove href from dropdown links on list mpd sample
cotid-qualabs 3961e64
typo
cotid-qualabs 7b4c0e4
typo
cotid-qualabs 5e37ed7
Fix base uri issues
sebastianpiq 0ad6a77
Fix handling of periods with duration but without start time
sebastianpiq 60928cc
Merge pull request #55 from qualabs/mpd-lists/sample-page
sebastianpiq 30cefbd
Merge pull request #56 from qualabs/mpd-lists/base-uri-fix
sebastianpiq 48d4f1f
Merge branch 'feature/mpd-lists' into mpd-lists/fix-only-duration-per…
sebastianpiq 98c91c9
Remove blank spaces
sebastianpiq 0f5e770
Merge pull request #57 from qualabs/mpd-lists/fix-only-duration-perio…
sebastianpiq 955d8ff
basic test case for debugging
cotid-qualabs 238352d
Add constant for the deafaul earliest resolution time offset
sebastianpiq 779ef4b
Merge pull request #52 from qualabs/alternative/earliestResolutionTim…
sebastianpiq 24ec616
basic test case for debugging
cotid-qualabs d86e3dc
remove unused variables
cotid-qualabs bf5016b
regular periods trigger manifest update event test case WIP
cotid-qualabs 2b8e133
quote fix
cotid-qualabs c6d2480
WIP
cotid-qualabs aa6e60f
WIP
cotid-qualabs aa075b2
WIP
cotid-qualabs fbe8b49
WIP
cotid-qualabs d4792ba
WIP
cotid-qualabs bdee174
remove baseurl parameter from listmpd dummy helper
cotid-qualabs 70f3981
Implement loadLinkedPeriod unit tests
sebastianpiq cfdca5b
list mpd unit test cases
cotid-qualabs 1b35170
Fix bug period duration precedence
sebastianpiq 9afd91d
Now ProgramInformation is no longer override by the imported MPD
tatiana-perera b6abe51
Merge pull request #60 from qualabs/mpd-lists/bug-programinformation-…
cotid-qualabs 118d6df
bug: fix typo on CoreEvents name
cotid-qualabs 3a31f8b
Merge pull request #59 from qualabs/mpd-lists/unit-test
cotid-qualabs 1a304fb
Merge pull request #63 from qualabs/mpd-lists/importedMpdLoaded-typo
cotid-qualabs 4b7fa75
Merge mpd level essentaial and suplemental properties to linked perio…
sebastianpiq 167ce54
Resolve minor code review comments
sebastianpiq 35612d2
Undo manifestLoader as a singleton
sebastianpiq cb29ea9
Merge development into mpd-lists branch
sebastianpiq 91f9c66
Fix sample json
sebastianpiq 26af4a5
[MpdLists] Fix merge imported profiles issue (#66)
sebastianpiq 1c29fec
Merge pull request #67 from qualabs/mpd-lists/review-changes
cotid-qualabs 2321e23
Merge branch 'development' into feature/mpd-lists
sebastianpiq 4880a6b
Fix code formatting
sebastianpiq 437210b
Update dashjs path in to the list mpd demo
sebastianpiq c609b9f
Handle empty manifest profiles to prevent errors during parsing
sebastianpiq 5fa9745
Merge branch 'development' into feature/alternative-media-presentations
emilsas 53661d7
Rename 'startAtPlayhead' to 'startWithOffset' in AlternativeMpd and r…
sebastianpiq d30c20d
Fix typos and rename some methods (#103)
sebastianpiq ea03de7
Merge branch 'development' into feature/mpd-lists
sebastianpiq aadfd4f
Merge branch 'development' into feature/mpd-lists
sebastianpiq bfc2218
Fix: update minEarliestResolutionTimeOffset to 0
sebastianpiq 5eaeece
Merge pull request #102 from qualabs/alternative-mpd/update-startWith…
cotid-qualabs 3894b78
refactor: rename IMPORTED_MPDS_LOADED event to LINKED_PERIOD_FOUND an…
sebastianpiq 4c67920
WIP executeOnce
cotid-qualabs 7366dc8
Fix: reset ListMpdController event listeners during reset
sebastianpiq 08540d7
refactor: encapsulate reset logic in resetInitialSettings and call du…
sebastianpiq a481798
refactor: simplify linked period handling in ManifestUpdater and List…
sebastianpiq e3c4a4e
Fix: validate period ID before seeking to period in StreamController
sebastianpiq 72f789d
refactor: improve linked period identification in StreamController
sebastianpiq 69c856e
refactor: rename linked period event to list MPD found for clarity
sebastianpiq 3b7cd8f
WIP
cotid-qualabs 5d29012
task/cml-segement-template-util (#4711)
littlespex a6668f7
TypeScript fixes for MediaSettings (#4761)
stschr 3015cd7
Fix errors in JSDoc
dsilhavy 360b691
Stschr/20250424 role main (#4760)
stschr b886c86
Fix build error in network sample (#4767)
dsilhavy 5d9298b
Increase version number to 5.1.0
dsilhavy ca5b06e
fix: fix: allow large ints to be passed in as time values for process…
littlespex 1adf9ee
Change next version number to 5.0.3
dsilhavy 1bfcc77
[VTTParser] Support for lineAlign and positionAlign (#4773)
eduter 47efab3
[TextTracks] Improve performance of addCaptions and fix duplicate che…
eduter 2dfa4f3
add check for schemeIdUri in getIsMain() (#4779)
stschr 103b9c6
Upgrade CML version in network interceptor sample
dsilhavy 4906ee5
Fix regression when setting size of VTT cue (#4780)
dsilhavy fb1661a
fix: Handle falsy values in DescriptorType value property (#4784)
stephanterning 6ffda88
Merge branch 'development' into feature/alternative-media-presentations
sebastianpiq 13d17a9
task/cml-segement-template-util (#4711)
littlespex 2b0c0ae
Fix build error in network sample (#4767)
dsilhavy 3254903
Increase version number to 5.1.0
dsilhavy 02370b0
Change next version number to 5.0.3
dsilhavy 00148c9
Upgrade CML version in network interceptor sample
dsilhavy b9aaeda
Increase version number to 5.1.0
dsilhavy 7f1f596
feature: implement no jump alternative event attribute
sebastianpiq c82f1cf
Merge pull request #106 from qualabs/alternative-media-presentation/n…
cotid-qualabs 75271ae
Remove unnecessary code and comments
sebastianpiq bf62c90
Remove unnecesary white space
sebastianpiq ef3f338
refactor: remove unused resetAlt functions from Stream and StreamCont…
sebastianpiq b35d5eb
Merge branch 'feature/alternative-media-presentations' into alternati…
sebastianpiq 7d9cc16
feat: add executeOnce property to AlternativeMpd and update related l…
sebastianpiq 82a582a
refactor: remove executeOnce property from alternativeMpd in DashMani…
sebastianpiq 50a898d
refactor: improve readability by adding comments to skip logic in eve…
sebastianpiq 759a251
Merge pull request #105 from qualabs/alternative-media-presentation/e…
cotid-qualabs a76affe
feature: add no jump attributes and refactor event handling logic
sebastianpiq e801b16
refactor: update no jump attributes and clean up event handling logic
sebastianpiq 94d2412
refactor: update noJump condition to use constant for better readability
sebastianpiq 8346e30
Merge pull request #109 from qualabs/alternative-media-presentations/…
cotid-qualabs 5b2adbd
feature: add STATUS repeat and update
sebastianpiq de365a2
Merge branch 'feature/alternative-media-presentations' into alternati…
sebastianpiq 96b93f7
refactor: simplify condition checks for scheduled events in Alternati…
sebastianpiq 2cde079
Merge pull request #111 from qualabs/alternative-media-presentations/…
cotid-qualabs 72e93be
Move parse event logic from the event recived to the player time updated
sebastianpiq d24d68a
Refactor eventController to handle earliestResolutionTimeOffset and r…
sebastianpiq 0ec11d4
Remove unnecessary console log from _onAlternativeEventTriggered func…
sebastianpiq 7a3a542
refactor: remove prebufferedEvents and streamline prebuffering logic
sebastianpiq 41e4274
fix: ensure video elements are inserted into the DOM only if parentNo…
sebastianpiq 161ea40
fix: include event object in EVENT_READY_TO_RESOLVE trigger and adjus…
sebastianpiq 323b32d
fix: include event object in EVENT_READY_TO_RESOLVE trigger and adjus…
sebastianpiq a5dac1c
feat: implement noJump event handling and refactor event triggering l…
sebastianpiq 08050a4
feat: enhance noJump event handling and refactor related logic
sebastianpiq 051acf9
fix: reorder conditions in _canEventRetrigger to improve clarity and …
sebastianpiq 74be18f
feat: add playback seeking event handling to prevent false event trig…
sebastianpiq 27168b2
feat: implement logic to determine the first event in a sequence for …
sebapique 46aee3a
feat: add executeOnce handling
sebapique f3561f9
refactor: remove unused constants and clean up event handling logic
sebapique d821539
tests
sebapique fc12b2a
refactor: remove unnecessary tests
sebastianpiq e5333fd
refactor: remove unnecessary tests
sebastianpiq 70ca4cd
Implement alternativeMpdController unit tests
sebastianpiq 46eb407
feat: add mock utilities for AlternativeMpdController testing
sebastianpiq e51d9e2
Fix event resolution time offset
sebastianpiq 268add0
refactor: remove debug log for resolution time calculation
sebastianpiq 701fe33
refactor: Implement media manager
sebastianpiq 2902846
Add sample page
sebastianpiq 3743525
Implement alternative preload
sebastianpiq 74f8aac
refactor: Clean up MediaManager prebuffered content handling
sebastianpiq dc3bb19
fix: adapt switch back logic for live to live
sebastianpiq 15f49a0
refactor: Event controller supports alternative events (#126)
sebastianpiq 3adb4e8
add alternative content start and end events
cotid-qualabs c0679f5
add vod to vod insert and replace functional tests
cotid-qualabs 8a32cc4
insert manifest fix
cotid-qualabs ca3338f
Merge branch 'feature/alternative-media-presentations' of github.com:…
cotid-qualabs a33627a
refactor: Rename realMaxDuration to calculatedMaxDuration and encapsu…
sebastianpiq d8f509c
Merge branch 'feature/alternative-media-presentations' into alternati…
sebastianpiq 5a2673f
add live to vod replace functional test
cotid-qualabs 654bc94
add vod to live
cotid-qualabs 45d6047
add vod to live
cotid-qualabs ff5a6b6
add complete alterantive duration verification
cotid-qualabs b8c7c41
add insert vod to live
cotid-qualabs 8cfcf2f
alternative replace vod manifest cleanup
cotid-qualabs feb415d
add complete alterantive duration to live to vod
cotid-qualabs d913269
variable rename
cotid-qualabs 92578b4
file renames
cotid-qualabs 4ffe120
vector name update
cotid-qualabs 6b2d78c
add live to live
cotid-qualabs 060e165
executeOnce functional test case
cotid-qualabs 9a6c2d4
refactor: Move event handling logic in the MediaManager into the Alte…
sebapique c5ebb05
test case rename
cotid-qualabs e2f791d
simplify replace live test case
cotid-qualabs 3852a27
Implemented live content with alternative live content playback (#129)
sebastianpiq 16c0ef7
Merge branch 'feature/alternative-media-presentations' of github.com:…
cotid-qualabs 22d9045
extend tolerance for live content
cotid-qualabs b276809
test: Add unit tests for AlternativeMediaController with MediaManager…
sebapique e7bf699
refactor: Replace console logging with logger in AlternativeMediaCont…
sebapique f5d1de1
test: crete unit test for switchBackToMainContent logic
sebapique 5d4ca6f
refactor: Enhance MediaManagerMock with improved event handling and r…
sebapique 4c7ead2
Merge branch 'feature/alternative-media-presentations' into alternati…
sebapique 8069607
remove unnecssary changes
sebapique 13a2cc9
Merge pull request #130 from qualabs/alternative-media-presentations/…
cotid-qualabs 6b4c916
Merge pull request #128 from qualabs/alternative-media-presentations/…
cotid-qualabs 7d2029b
Fix mediaManager don't set the configs property
sebastianpiq 6211d8d
fix: modify _onAlternativePlaybackTimeUpdated to use a cloned event o…
sebapique 339ce3a
feat: add setAlternativeVideoElement method to manage alternative vid…
sebastianpiq 302d324
feat: add logging for prebuffering start in MediaManager
sebastianpiq 20e3d8a
executeOnce bugfix (#132)
cotid-qualabs 8eb7f7d
refactor: remove redundant config setting for alternative video element
sebastianpiq 17a6e4a
refactor: remove redundant config setting for alternative video element
sebastianpiq 8e27e27
feat: implement alternative video element support and update related …
sebastianpiq 29bddb2
fix: rename test case
cotid-qualabs b1e1deb
replace functional test use getCurrentTime
cotid-qualabs a5ef275
Merge pull request #133 from qualabs/alternative-media-presentations/…
cotid-qualabs be466f2
add init for alternative media method into the functional tests dash …
sebastianpiq 852a74b
Merge pull request #134 from qualabs/alternative-media-presentations/…
cotid-qualabs 991f292
feat: add setAlternativeVideoElement unit test
sebastianpiq 1e0048e
fix debug import in the MediaManager
sebastianpiq 40dd8f9
refactor: streamline MediaManager instance creation in tests
sebastianpiq c270d1c
feat: add context variable to MediaManager constructor
sebastianpiq dd2cf07
fix: ensure MediaManager is initialized in beforeEach
sebastianpiq 1884d4c
test: add getAlternativePlayer test for the MediaManager and fix swit…
sebastianpiq 1fe5d55
fix: update expectation in getAlternativePlayer test to check for und…
sebastianpiq 079e650
test: remove 'only' from getAlternativePlayer tests to ensure all tes…
sebastianpiq ed82fa9
refactor: clean up comments in getAlternativePlayer test for clarity
sebastianpiq da35d11
test: add unit test for switchToAlternativeContent and prebufferAlter…
sebastianpiq 686e271
test: implement switch back to main content unit test
sebastianpiq 8fdbd8d
test: Improve MediaManager unit test and add switchBackToMain contet …
sebastianpiq 3224608
add presentation time validation to replace vod
cotid-qualabs 7bf503c
add presentation time validation to insert vod
cotid-qualabs e8256ce
Merge pull request #136 from qualabs/media-manager-unit-test/set-alte…
cotid-qualabs 90541aa
Merge branch 'alternative-media-presentations/media-manager-unit-test…
sebastianpiq 04f67e0
Revert "Merge branch 'alternative-media-presentations/media-manager-u…
sebastianpiq 9de7d08
Merge pull request #137 from qualabs/media-manager-unit-test/prebuffe…
cotid-qualabs 34ec73d
Merge branch 'alternative-media-presentations/media-manager-unit-test…
sebastianpiq caac29e
Merge pull request #138 from qualabs/media-manager-unit-test/switch-b…
cotid-qualabs d093ed8
Merge branch 'feature/alternative-media-presentations' into alternati…
sebastianpiq 80ff9ee
Fix formatting of alternative video element in index.html
sebastianpiq d6b27f6
Merge pull request #135 from qualabs/alternative-media-presentations/…
cotid-qualabs 456e20c
feat: Implement live to live switch back
sebastianpiq a909d2f
fix: Correct variable name typo in EventController and remove console…
sebastianpiq c871f7f
Merge pull request #139 from qualabs/alternative-media-presentations/…
cotid-qualabs 6594b70
Alternative media presentations/clip functional test (#140)
cotid-qualabs 16416f2
feat: Add EVENT_UPDATED constant and implement event update handling …
sebastianpiq 70e0ebe
Fix max duration calculation on update event
sebastianpiq 57adcc2
Merge pull request #143 from qualabs/alternative-media-presentations/…
cotid-qualabs b68b73f
Alternative MPD live to live sample page (#144)
cotid-qualabs 465f9a2
[Alternative media presentations] Playback ended event (#141)
cotid-qualabs 7095cc9
add returnOffset functional test (#142)
cotid-qualabs 1d8f5fd
Add alternative live to live status update functional test (#145)
cotid-qualabs d758cf3
Add Listen Mode sample and update samples.json with new entry
sebastianpiq f3931c8
Add setAlternativeVideoElement as optional and fix issue restarting t…
sebastianpiq 735ab95
remove unnecessary parameter in addManifestResponseInterceptor
sebastianpiq 36d6359
Merge pull request #147 from qualabs/alternative-media-presentations/…
cotid-qualabs 942efd1
Update alternative media presentations sample and remove obsolete man…
sebastianpiq 8355665
Modify alternative media presentations sample HTML file
sebastianpiq 80f2acb
Update href for Alternative Media Presentations sample to point to th…
sebastianpiq 1ef1b90
Merge branch 'development' into feature/alternative-media-presentations
sebastianpiq ecea7ad
Merge branch 'development' into feature/mpd-lists
sebastianpiq 04d9524
fix: validate availabilityEndTime in manifest merging process
sebastianpiq 7683769
refactor: remove handling of 'No Content' response in manifest loading
sebastianpiq dfc2a40
Merge branch 'feature/mpd-lists' into svgai/alternative-mpd
sebastianpiq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>List MPDs example</title> | ||
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | ||
| <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> | ||
| <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> | ||
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> | ||
| </head> | ||
| <body> | ||
| <div class="container py-4"> | ||
| <header class="pb-3 mb-4 border-bottom"> | ||
| <img class="" | ||
| src="../lib/img/dashjs-logo.png" | ||
| width="200"> | ||
| </header> | ||
| <div class="row"> | ||
| <div class="col-md-12"> | ||
| <div class="h-100 p-5 bg-light border rounded-3"> | ||
| <h3>List MPDs</h3> | ||
| <p>This sample shows the following use cases of the List MPDs implementation in DASH</p> | ||
| <ul> | ||
| <li><p><strong>Case 0: Single Linked Period - </strong> An MPD with a single Period that links to an Imported MPD.</p></li> | ||
| <li><p><strong>Case 1: Multiple Linked Period -</strong> An MPD with multiple linked Periods, each pointing to a different Imported MPD.</p></li> | ||
| <li><p><strong>Case 2: Linked Period + Regular Period -</strong> An MPD with one linked Period followed by a regular Period.</p></li> | ||
| <li><p><strong>Case 3: Regular Period + Linked Period -</strong> An MPD with one regular Period followed by a linked Period.</p></li> | ||
| <li><p><strong>Case 4: EarliestResolutionTime > minBufferTime -</strong> An MPD where the earliestResolutionTime of the linked Period exceeds the min buffer time.</p></li> | ||
| <li><p><strong>Case 5: EarliestResolutionTime < minBufferTime -</strong> An MPD where the earliestResolutionTime of the linked Period is less than the buffer time.</p></li> | ||
| <li><p><strong>Case 6: Different Linked Period and Imported Period durations -</strong> An MPD where a Linked Period references an Imported MPD with a duration that does not match the Linked Period's duration in the main manifest</p></li> | ||
| <li><p><strong>Case 7: First List MPD Period with start time =/ 0 -</strong> The MPD is of type list, and the first Period in the manifest has a start time that is not equal to PT0S (0 seconds).</p></li> | ||
| <li><p><strong>Case 8: Retry -</strong> The MPD is of type list, and the ImportedMPD should not be downloadable</p></li> | ||
| </ul> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="row pt-4"> | ||
| <div class="col"> | ||
| <div class="row justify-content-around"> | ||
| <div class="col-auto"> | ||
| <div class="btn-group mb-2"> | ||
| <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
| Select Case | ||
| </button> | ||
| <div class="dropdown-menu" id="assetDropdown"> | ||
| <a class="dropdown-item" data-id="case0" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list0.mpd">Case 0: Single Linked Period</a> | ||
| <a class="dropdown-item" data-id="case1" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list1.mpd">Case 1: Multiple Linked Period</a> | ||
| <a class="dropdown-item" data-id="case2" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list2.mpd">Case 2: Linked Period + Regular Period</a> | ||
| <a class="dropdown-item" data-id="case3" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list3.mpd">Case 3: Regular Period + Linked Period</a> | ||
| <a class="dropdown-item" data-id="case4" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list4.mpd">Case 4: EarliestResolutionTime > minBufferTime</a> | ||
| <a class="dropdown-item" data-id="case5" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list5.mpd">Case 5: EarliestResolutionTime < minBufferTime</a> | ||
| <a class="dropdown-item" data-id="case6" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list6.mpd">Case 6: Different Linked Period and Imported Period durations</a> | ||
| <a class="dropdown-item" data-id="case7" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list7.mpd">Case 7: First List MPD Period with start time =/ 0</a> | ||
| <a class="dropdown-item" data-id="case8" data-url="https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list8.mpd">Case 8: Retry</a> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="col"> | ||
| <h3 id="casetitle">Case 0: Single Linked Period</h3> | ||
| </div> | ||
| </div> | ||
| <span class="h5">Expected behavior: </span> | ||
| <p id="behavior">The player should download the Imported MPD and reproduce the unique Period.</p> | ||
| <div class="dash-video-player"> | ||
| <div class="videoContainer" id="videoContainer"> | ||
| <video id="main-video" preload="auto" width="100%" controls></video> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="col-6"> | ||
| <pre style="background-color: #dddddd; height: 100%; overflow: auto; padding: 2em"><div id="manifest" class="text-wrap"></div></pre> | ||
| </div> | ||
| </div> | ||
| <div class="row"> | ||
| <div class="col-md-12"> | ||
| <div id="code-output"></div> | ||
| </div> | ||
| </div> | ||
| <footer class="pt-3 mt-4 text-muted border-top"> | ||
| © DASH-IF | ||
| </footer> | ||
|
|
||
| <script src="../../dist/modern/umd/dash.all.debug.js"></script> | ||
| <script> | ||
| async function selectCase(player, currentAsset){ | ||
| let manifest = document.getElementById("manifest"); | ||
| const response = await fetch(currentAsset); | ||
| manifest.innerText = await response.text(); | ||
|
|
||
| const assetDropdown = document.getElementById("assetDropdown"); | ||
| assetDropdown.addEventListener("click", async (event) => { | ||
| const target = event.target; | ||
| if (target.tagName === "A" && target.dataset.url) { | ||
| currentAsset = target.dataset.url; | ||
| player.attachSource(currentAsset); | ||
|
|
||
| const response = await fetch(currentAsset); | ||
| manifest.innerText = await response.text(); | ||
|
|
||
| casetitle.innerText = target.text; | ||
|
|
||
| const caseId = target.dataset.id; | ||
| switch(caseId) { | ||
| case 'case0': | ||
| behavior.innerText = "The player should download the Imported MPD and reproduce the unique Period."; | ||
| break; | ||
| case 'case1': | ||
| behavior.innerText = "The player should download the first Imported MPD, reproduce its first Period, and, upon completion, download the second Imported MPD and reproduce its first Period."; | ||
| break; | ||
| case 'case2': | ||
| behavior.innerText = "The player should download the first Imported MPD, reproduce its first Period, and, upon completion, play the next regular Period."; | ||
| break; | ||
| case 'case3': | ||
| behavior.innerText = "The player should start by playing the first regular Period as usual and, upon completion, download the linked Imported MPD and reproduce its first Period."; | ||
| break; | ||
| case 'case4': | ||
| behavior.innerText = "The player should start by playing the first regular Period as usual and, upon its completion, download the linked Imported MPD at startTime - earliestResolutionTime and reproduce its first Period"; | ||
| break; | ||
| case 'case5': | ||
| behavior.innerText = "The player should start by playing the first regular Period as usual and, upon its completion, download the linked Imported MPD at with earliestResolutionTime = 0 and reproduce its first Period."; | ||
| break; | ||
| case 'case6': | ||
| behavior.innerText = "The player must respect the shortest duration between the Linked Period in the main manifest and the Imported MPD. Playback should seamlessly stop at the shorter duration, ensuring no content extends beyond the specified boundaries."; | ||
| break; | ||
| case 'case7': | ||
| behavior.innerText = "The player should throw an error indicating that the start time of the first period in a list type MPD manifest is invalid."; | ||
| break; | ||
| case 'case8': | ||
| behavior.innerText = "The player should attempt to download the manifest four times before failing."; | ||
| break; | ||
| } | ||
| } | ||
| }); | ||
| } | ||
| </script> | ||
| <script class="code"> | ||
| const video = document.querySelector("video"); | ||
|
|
||
| const player = dashjs.MediaPlayer().create(); | ||
| player.initialize(); | ||
| player.updateSettings({ | ||
| debug: { | ||
| logLevel: dashjs.Debug.LOG_LEVEL_DEBUG, | ||
| }, | ||
| }); | ||
| player.setAutoPlay(false); | ||
| player.attachView(video); | ||
|
|
||
| let currentAsset = "https://comcast-dash-6-assets.s3.us-east-2.amazonaws.com/ListMPDs/bbb/list0.mpd"; | ||
| player.attachSource(currentAsset); | ||
|
|
||
| selectCase(player, currentAsset) // Select Case functionality only | ||
| </script> | ||
| <script src="../highlighter.js"></script> | ||
|
|
||
| </body> | ||
| </html> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
switchstatement can be refactored into a more maintainable data structure, like a map or an object, to associate case IDs with their behavior descriptions. This will make the code cleaner and easier to extend with new cases.const behaviors = { 'case0': "The player should download the Imported MPD and reproduce the unique Period.", 'case1': "The player should download the first Imported MPD, reproduce its first Period, and, upon completion, download the second Imported MPD and reproduce its first Period.", 'case2': "The player should download the first Imported MPD, reproduce its first Period, and, upon completion, play the next regular Period.", 'case3': "The player should start by playing the first regular Period as usual and, upon completion, download the linked Imported MPD and reproduce its first Period.", 'case4': "The player should start by playing the first regular Period as usual and, upon its completion, download the linked Imported MPD at startTime - earliestResolutionTime and reproduce its first Period", 'case5': "The player should start by playing the first regular Period as usual and, upon its completion, download the linked Imported MPD at with earliestResolutionTime = 0 and reproduce its first Period.", 'case6': "The player must respect the shortest duration between the Linked Period in the main manifest and the Imported MPD. Playback should seamlessly stop at the shorter duration, ensuring no content extends beyond the specified boundaries.", 'case7': "The player should throw an error indicating that the start time of the first period in a list type MPD manifest is invalid.", 'case8': "The player should attempt to download the manifest four times before failing." }; if (behaviors[caseId]) { behavior.innerText = behaviors[caseId]; }