Skip to content
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

fix: Only add sidxMapping on successful sidx request and parse. #1099

Merged
merged 6 commits into from
Mar 29, 2021

Conversation

brandonocasey
Copy link
Contributor

Description

Requires videojs/mpd-parser#123

Fixes our Angel One - Widevine, fmp4, webm, subs, alternate audio tracks and i'm sure it fixes others.

@@ -112,18 +113,6 @@ export const parseMasterXml = ({ masterXml, srcUrl, clientOffset, sidxMapping })
return master;
};

export const generateSidxKey = (sidxInfo) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function already existed in mpd-parser, now that we export it, use that one.

@@ -358,6 +347,7 @@ export default class DashPlaylistLoader extends EventTarget {

const fin = (err, request) => {
if (this.requestErrored_(err, request, startingState)) {
delete sidxMapping[sidxKey];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix

@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #1099 (85369f0) into main (af5841c) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1099      +/-   ##
==========================================
- Coverage   86.09%   86.06%   -0.03%     
==========================================
  Files          38       38              
  Lines        8905     8923      +18     
  Branches     1996     1998       +2     
==========================================
+ Hits         7667     7680      +13     
- Misses       1238     1243       +5     
Impacted Files Coverage Δ
src/dash-playlist-loader.js 89.36% <100.00%> (+0.25%) ⬆️
src/decrypter-worker.js 86.61% <0.00%> (-1.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af5841c...85369f0. Read the comment docs.

@brandonocasey brandonocasey changed the title fix: clear sidxMapping on sidx error, allow multiple audio/vtt playlists per group fix: Only add sidxMapping on successful sidx request and parse. Mar 29, 2021
gkatsev
gkatsev previously approved these changes Mar 29, 2021
src/dash-playlist-loader.js Outdated Show resolved Hide resolved
Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge it with the 0.03% reduction in coverage.

@gkatsev gkatsev merged commit de0b55b into main Mar 29, 2021
@gkatsev gkatsev deleted the fix/clear-sidx-on-error branch March 29, 2021 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants