Skip to content

Commit 31de4f6

Browse files
authored
Fix/filtering (Dash-Industry-Forum#4637)
* Fix an issue that causes DRM capabilities being compared to non DRM capabilities * Fix an issue with WebM SegmentBase streams and Annex I handling * Add Shaka teststream to smoke vector list
1 parent dc94fe4 commit 31de4f6

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

src/dash/WebmSegmentBaseLoader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ function WebmSegmentBaseLoader() {
344344
request: request,
345345
url: media,
346346
init: false,
347-
mediaType: mediaType
347+
mediaType: mediaType,
348+
representation
348349
};
349350

350351
request = _getFragmentRequest(info);

src/streaming/controllers/ExtUrlQueryInfoController.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,14 @@ function ExtUrlQueryInfoController() {
154154
function getFinalQueryString(request) {
155155
try {
156156
if (!mpdQueryStringInformation) {
157-
return
157+
return null;
158158
}
159159
if (request.type === HTTPRequest.MEDIA_SEGMENT_TYPE || request.type === HTTPRequest.INIT_SEGMENT_TYPE) {
160160
const representation = request.representation;
161+
162+
if (!representation) {
163+
return null;
164+
}
161165
const adaptation = representation.adaptation;
162166
const period = adaptation.period;
163167
const queryInfo = mpdQueryStringInformation

src/streaming/utils/Capabilities.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,27 @@ function Capabilities() {
344344
}
345345

346346
return testedCodecConfigurations.find((current) => {
347-
const audioEqual = configuration && configuration.audio ? objectUtils.areEqual(configuration.audio, current.audio) : true;
348-
const videoEqual = configuration && configuration.video ? objectUtils.areEqual(configuration.video, current.video) : true;
349-
const keySystemEqual = configuration && configuration.keySystemConfiguration ? objectUtils.areEqual(configuration.keySystemConfiguration, current.keySystemConfiguration) : true;
347+
const audioEqual = _isConfigEqual(configuration, current, Constants.AUDIO);
348+
const videoEqual = _isConfigEqual(configuration, current, Constants.VIDEO);
349+
const keySystemEqual = _isConfigEqual(configuration, current, 'keySystemConfiguration');
350350

351351
return audioEqual && videoEqual && keySystemEqual
352352
})
353+
}
354+
355+
function _isConfigEqual(configuration, current, attribute) {
356+
357+
// Config not present in both of them
358+
if (!configuration[attribute] && !current[attribute]) {
359+
return true
360+
}
361+
362+
// Config present in both we need to compare
363+
if (configuration[attribute] && current[attribute]) {
364+
return objectUtils.areEqual(configuration[attribute], current[attribute])
365+
}
353366

367+
return false
354368
}
355369

356370
function _getGenericMediaCapabilitiesVideoConfig(inputConfig) {

test/functional/config/test-configurations/streams/smoke.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@
5555
}
5656
]
5757
},
58+
{
59+
"name": "Shaka Demo Assets: Angel-One Widevine",
60+
"type": "vod",
61+
"url": "https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd",
62+
"drm": {
63+
"com.widevine.alpha": {
64+
"serverURL": "https://cwip-shaka-proxy.appspot.com/no_auth"
65+
}
66+
},
67+
"excludedPlatforms": [
68+
{
69+
"browser": "safari"
70+
}
71+
]
72+
},
5873
{
5974
"name": "1080p with PlayReady and Widevine DRM, single key",
6075
"type": "vod",

0 commit comments

Comments
 (0)