Skip to content

Commit

Permalink
Fix/filtering (#4637)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dsilhavy authored Nov 29, 2024
1 parent dc94fe4 commit 31de4f6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/dash/WebmSegmentBaseLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ function WebmSegmentBaseLoader() {
request: request,
url: media,
init: false,
mediaType: mediaType
mediaType: mediaType,
representation
};

request = _getFragmentRequest(info);
Expand Down
6 changes: 5 additions & 1 deletion src/streaming/controllers/ExtUrlQueryInfoController.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,14 @@ function ExtUrlQueryInfoController() {
function getFinalQueryString(request) {
try {
if (!mpdQueryStringInformation) {
return
return null;
}
if (request.type === HTTPRequest.MEDIA_SEGMENT_TYPE || request.type === HTTPRequest.INIT_SEGMENT_TYPE) {
const representation = request.representation;

if (!representation) {
return null;
}
const adaptation = representation.adaptation;
const period = adaptation.period;
const queryInfo = mpdQueryStringInformation
Expand Down
20 changes: 17 additions & 3 deletions src/streaming/utils/Capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,27 @@ function Capabilities() {
}

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

return audioEqual && videoEqual && keySystemEqual
})
}

function _isConfigEqual(configuration, current, attribute) {

// Config not present in both of them
if (!configuration[attribute] && !current[attribute]) {
return true
}

// Config present in both we need to compare
if (configuration[attribute] && current[attribute]) {
return objectUtils.areEqual(configuration[attribute], current[attribute])
}

return false
}

function _getGenericMediaCapabilitiesVideoConfig(inputConfig) {
Expand Down
15 changes: 15 additions & 0 deletions test/functional/config/test-configurations/streams/smoke.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@
}
]
},
{
"name": "Shaka Demo Assets: Angel-One Widevine",
"type": "vod",
"url": "https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd",
"drm": {
"com.widevine.alpha": {
"serverURL": "https://cwip-shaka-proxy.appspot.com/no_auth"
}
},
"excludedPlatforms": [
{
"browser": "safari"
}
]
},
{
"name": "1080p with PlayReady and Widevine DRM, single key",
"type": "vod",
Expand Down

0 comments on commit 31de4f6

Please sign in to comment.