зеркало из https://github.com/GoogleChrome/kino.git
Streaming: Avoid infinite loop when no representation is found.
This commit is contained in:
Родитель
064e5c4140
Коммит
d6b08bab37
|
@ -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
|
||||
|
|
|
@ -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}"]`;
|
||||
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче