Skip to content

Commit 5553987

Browse files
committed
Merge pull request Dash-Industry-Forum#60 from senthil-codr/index_bug_fix
Bug fix for incorrect audio/video total index bug.
2 parents 818c739 + 960df1a commit 5553987

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

app/js/dash/DashManifestExtensions.js

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ Dash.dependencies.DashManifestExtensions.prototype = {
5757
}
5858
}
5959

60+
if (result) {
61+
adaptation.type = "audio";
62+
}
6063
return Q.when(result);
6164
},
6265

@@ -99,6 +102,9 @@ Dash.dependencies.DashManifestExtensions.prototype = {
99102
}
100103
}
101104

105+
if (result) {
106+
adaptation.type = "video";
107+
}
102108
return Q.when(result);
103109
},
104110

app/js/dash/DashMetricsExtensions.js

+15-2
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,23 @@ Dash.dependencies.DashMetricsExtensions = function () {
7373
var found = false;
7474

7575
if (bufferType === "video") {
76-
found = this.manifestExt.getIsVideo(adaptation);
76+
if (adaptation.hasOwnProperty("type")) {
77+
if (adaptation.type === "video") {
78+
found = true;
79+
}
80+
} else {
81+
this.manifestExt.getIsVideo(adaptation);
82+
}
7783
}
7884
else if (bufferType === "audio") {
79-
found = this.manifestExt.getIsAudio(adaptation); // TODO : Have to be sure it's the *active* audio track.
85+
// TODO : Have to be sure it's the *active* audio track.
86+
if (adaptation.hasOwnProperty("type")) {
87+
if (adaptation.type === "audio") {
88+
found = true;
89+
}
90+
} else {
91+
this.manifestExt.getIsAudio(adaptation);
92+
}
8093
}
8194
else {
8295
found = false;

0 commit comments

Comments
 (0)