Made sure sources get ordered in a predictable way
This commit is contained in:
parent
1182bed672
commit
0b22fab6a2
@ -1305,16 +1305,18 @@ input[type="range"]::-ms-track {
|
||||
this._elapsed.textContent = this.formatTime(0);
|
||||
this._duration.textContent = this.formatTime(
|
||||
presentation.duration);
|
||||
const sourcenames = Object.keys(presentation.sources);
|
||||
const resolutions = Object.keys(
|
||||
presentation.sources[sourcenames[0]].video);
|
||||
const streams = presentation.sources;
|
||||
const sourcenames = Object.keys(streams);
|
||||
// sorting the source names so they get a predictable ordering
|
||||
sourcenames.sort();
|
||||
const resolutions = Object.keys(streams[sourcenames[0]].video);
|
||||
const defaultRes = 0;
|
||||
const token = presentation.token;
|
||||
this.setResolutions(resolutions, defaultRes);
|
||||
|
||||
// create streams
|
||||
const streams = presentation.sources;
|
||||
for(const key in streams) {
|
||||
for(var i = 0; i < sourcenames.length; ++i) {
|
||||
const key = sourcenames[i];
|
||||
const stream = streams[key];
|
||||
// skip setting up the stream if it is explicitly
|
||||
// configured to be hidden.
|
||||
|
Loading…
x
Reference in New Issue
Block a user