Comments (2)
I think it's because we only expect BaseURL elements to be children the MPD element rather than inside a Period.
from mpd-parser.
I got the same issue on this website. My research result is that it's a regex issue here: https://github.com/videojs/mpd-parser/blob/main/src/segment/segmentTemplate.js#L6
const identifierPattern = /\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g;
In this example the regex is
const identifierPattern = /\$([A-z]*)(?:(%0)([0-9]+)([d,x]))?\$/g;
another issue is the number need to be set as hex format in function https://github.com/videojs/mpd-parser/blob/main/src/segment/segmentTemplate.js#L44
here is my solution:
export const identifierReplacement = (values) => (match, identifier, format, width, base) => {
if (match === '$$') {
// escape sequence
return '$';
}
if (typeof values[identifier] === 'undefined') {
return match;
}
let value = '' + values[identifier];
if (identifier === 'RepresentationID') {
// Format tag shall not be present with RepresentationID
return value;
}
if (!format) {
width = 1;
} else {
width = parseInt(width, 10);
}
if(base ==='x') {
value = parseInt(value).toString(16)
}
if (value.length >= width) {
return value;
}
return ${(new Array(width - value.length + 1)).join('0')}${value}
;
};
from mpd-parser.
Related Issues (20)
- Not all audio codecs are being returned in json output HOT 4
- Usage in react-native HOT 4
- Undefined dateTimeObject values for live mpd manifests
- Parser dropping values from AdaptionSet HOT 9
- How to calculate current live segment HOT 4
- xmldom vulnerability HOT 4
- DASH_INVALID_XML error HOT 7
- Security vulnerability in xmldom HOT 4
- Parser failing with blob url
- Generic Identifiers are not Parsed
- Matching upper-case keysystem UUID string in generateKeySystemInformation HOT 1
- Is there any Java/Kotlin implementation of this lib? HOT 1
- Parsing error for representations without segment info
- Update @xmldom/xmldom to fix a security advisory
- manifest endList is true for dynamic MPD instead of false HOT 1
- Security issue HOT 1
- Duplicate Playlist Entries with BaseURL tags at different levels of the Manifest
- Uncaught TypeError: Cannot set properties of undefined (setting 'discontinuity')
- Wrong resolvedUri HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpd-parser.