diff --git a/src/api/streaming/04-universal-source.md b/src/api/streaming/04-universal-source.md index e5e1e07..2900344 100644 --- a/src/api/streaming/04-universal-source.md +++ b/src/api/streaming/04-universal-source.md @@ -4,7 +4,7 @@ description: 'Encode your streams in a universal format to ensure your media can date: 4th March, 2017 length: '7:43' video-sources: - - src: https://storage.googleapis.com/wdm-assets/media/04/index.mpd + - src: https://storage.googleapis.com/wdm-assets/media/04/manifest.mpd type: application/dash+xml - src: https://storage.googleapis.com/wdm-assets/media/04/master.m3u8 type: application/x-mpegURL diff --git a/src/js/classes/ParserMPD.js b/src/js/classes/ParserMPD.js index 2d36112..dc02c69 100644 --- a/src/js/classes/ParserMPD.js +++ b/src/js/classes/ParserMPD.js @@ -252,7 +252,7 @@ export default class { * * @returns {RepresentationObject[]} Representation objects. */ - queryRepresentations(representationQuery, contentType, lang = '') { + queryRepresentations(representationQuery, contentType, lang = null) { let adaptationSetsQuery = `AdaptationSet[contentType="${contentType}"]`; if (lang) adaptationSetsQuery += `[lang="${lang}"]`; diff --git a/src/js/utils/selectRepresentations.js b/src/js/utils/selectRepresentations.js index ce2176e..5d9a237 100644 --- a/src/js/utils/selectRepresentations.js +++ b/src/js/utils/selectRepresentations.js @@ -45,12 +45,9 @@ export default (parser, opts = {}) => { do { query = priorities[contentType].shift() || ''; - /** - * @todo Support languages other than the hardcoded English. - */ - representations[contentType] = parser.queryRepresentations(query, contentType, 'eng'); + representations[contentType] = parser.queryRepresentations(query, contentType); representations[contentType] = representations[contentType].filter(canPlayFilter); - } while (representations[contentType].length === 0); + } while (representations[contentType].length === 0 && query); }, );