-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/cmcd settings from mpd and steering report (#4426)
* parsing ClientDataResporting from MDP * add applyCMCDParameters * Using the CMCDParameters configuration under ClientDataReporting in the MDP file * Check if cmcd is enabled by checking mdp and player settings. Using mdp over the player settings but when applyCMCDParameters is false, player settings will be used * apply serviceLocation filter to data reporting * Send cmcd data to content steering server * add adapter set filter * improve apply filters * improve apply filters * delete unnecessary atribute in client data reporting * add client data reporting model * refactor client data reporting model * implemented include in request filter * add none include request case * change segment type into filter * Add test to check if cmcd data from manifest is correct * delete comments * Update tests with latest changes for cmcd reporting data * add test for getQueryParameter * delete comment in streaming.models.CmcdModel.js * add test to get correctly cmcd data from getHeadersParameters() * Adding tests for ClientDataReportingModel * add test to get correctly cmcd data from getHeadersParameters() * add funcionality to service description controller mock * reset serviceDescriptionControllerMock after tests run * More tests added for ClientDataReportingModel * Add tests for applyCMCDParameters setting * Add includeInRequests attribute to player settings * Send latest video cmcd to content steering server * fix edge case * - add logger - add edge cases to defined if cmcd should be enable or not - improve whitelist functions based on new changes * improve edge cases checks * fix a detail * fix parsing * fix parsing keys * improve error messages * add support for audio only files * remove unnecessary spaces * improve lastMediaTypeRequest logic * remove unnecessary spaces * improve _lastMediaTypeRequest behaviour * Fix tests after merging development into feature/cmcd-settings-from-mpd-and-steering-report * Added new test cases for ClientDataReportingModel.js * Fix isIncludedFilters * Check if element parsed for ContentSteering from mpd is an array or an object * Update AUTHORS.md * Update AUTHORS.md * Refactors from PR review: change applyCMCDParameters name to applyParametersFromMpd, fix typos, change variable names and create a vo model for CMCDParameters * Fix import * Move ClientDataReportingModel to controllers folder and change the name to ClientDataReportingController * Update _canBeEnabled function and create a dedicated private function in HTTPLoader for updating url and headers according to CMCD * Update includeInRequest default value to segment and update the tests * Implement schemeIdUri for CMCDParameters using urn:mpeg:dash:cta-5004:2023 scheme * Remove console.log * Add sample page for CMCD triggered via the MPD --------- Co-authored-by: santiagomintegui <[email protected]> Co-authored-by: santi <[email protected]> Co-authored-by: Nicolás Caballero <[email protected]> Co-authored-by: Nicolás Caballero <[email protected]> Co-authored-by: Matias Rodriguez <[email protected]> Co-authored-by: [email protected] <[email protected]>
- Loading branch information
1 parent
0e82824
commit 5117500
Showing
22 changed files
with
2,076 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:mas="urn:marlin:mas:1-0:services:schemas:mpd" xmlns:mspr="urn:microsoft:playready" xmlns:cenc="urn:mpeg:cenc:2013" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT10M34.600S" minBufferTime="PT1.980S"> | ||
<BaseURL serviceLocation="cdn-a">https://cloudfront.content-steering.com/bbb/</BaseURL> | ||
<BaseURL serviceLocation="cdn-b">https://fastly.content-steering.com/bbb/</BaseURL> | ||
<BaseURL serviceLocation="cdn-c">https://akamai.content-steering.com/bbb/</BaseURL> | ||
<ServiceDescription> | ||
<ContentSteering defaultServiceLocation="cdn-a" queryBeforeStart="true">https://cloudfront.content-steering.com/dash.dcsm?steering_params=eyJjZG5PcmRlciI6WyJjZG4tYSIsImNkbi1iIiwiY2RuLWMiXSwibWluQml0cmF0ZSI6OTE0ODc4LCJwYXRod2F5cyI6W3siaWQiOiJjZG4tYSIsInRocm91Z2hwdXQiOjIwMDAwMDAwfSx7ImlkIjoiY2RuLWIiLCJ0aHJvdWdocHV0IjoyMDAwMDAwMH0seyJpZCI6ImNkbi1jIiwidGhyb3VnaHB1dCI6MjAwMDAwMDB9XX0=</ContentSteering> | ||
<ClientDataReporting> | ||
<CMCDParameters version="1" keys="br sid cid" contentID="content-id-1" sessionID="session-id-1" includeInRequests='segment steering' schemeIdUri="urn:mpeg:dash:cta-5004:2023"/> | ||
</ClientDataReporting> | ||
</ServiceDescription> | ||
<Period> | ||
<AdaptationSet mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1" lang="und" group="0"> | ||
<SegmentTemplate duration="1984" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4f" startNumber="1" timescale="1000"/> | ||
<Representation audioSamplingRate="48000" bandwidth="131556" codecs="mp4a.40.2" id="audio_128kbps"> | ||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> | ||
</Representation> | ||
</AdaptationSet> | ||
<AdaptationSet mimeType="video/mp4" scanType="progressive" segmentAlignment="true" startWithSAP="1" group="0"> | ||
<SegmentTemplate duration="2000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4f" startNumber="1" timescale="1000"/> | ||
<Representation bandwidth="4530860" codecs="avc1.640028" frameRate="30" height="1080" id="video_1920x1080_4531kbps" scanType="progressive" width="1920"/> | ||
<Representation bandwidth="2445034" codecs="avc1.4D401F" frameRate="30" height="720" id="video_1280x720_2445kbps" scanType="progressive" width="1280"/> | ||
<Representation bandwidth="1419255" codecs="avc1.4D401F" frameRate="30" height="576" id="video_1024x576_1419kbps" scanType="progressive" width="1024"/> | ||
<Representation bandwidth="783322" codecs="avc1.4D401E" frameRate="30" height="360" id="video_640x360_783kbps" scanType="progressive" width="640"/> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* The copyright in this software is being made available under the BSD License, | ||
* included below. This software may be subject to other third party and contributor | ||
* rights, including patent rights, and no such rights are granted under this license. | ||
* | ||
* Copyright (c) 2024, Dash Industry Forum. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without modification, | ||
* are permitted provided that the following conditions are met: | ||
* * Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation and/or | ||
* other materials provided with the distribution. | ||
* * Neither the name of Dash Industry Forum nor the names of its | ||
* contributors may be used to endorse or promote products derived from this software | ||
* without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY | ||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
import DescriptorType from './DescriptorType.js'; | ||
|
||
/** | ||
* @class | ||
* @ignore | ||
*/ | ||
class CMCDParameters extends DescriptorType { | ||
constructor() { | ||
super(); | ||
this.version = null; | ||
this.sessionID = null; | ||
this.contentID = null; | ||
this.mode = null; | ||
this.keys = null; | ||
this.includeInRequests = null; | ||
} | ||
|
||
init(data) { | ||
super.init(data); | ||
|
||
if (data) { | ||
this.version = data.version; | ||
this.sessionID = data.sessionID; | ||
this.contentID = data.contentID; | ||
this.mode = data.mode ?? 'query'; | ||
this.keys = data.keys ? data.keys.split(' ') : null; | ||
this.includeInRequests = data.includeInRequests ? data.includeInRequests.split(' ') : ['segment']; | ||
this.schemeIdUri = data.schemeIdUri; | ||
} | ||
} | ||
} | ||
|
||
export default CMCDParameters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* The copyright in this software is being made available under the BSD License, | ||
* included below. This software may be subject to other third party and contributor | ||
* rights, including patent rights, and no such rights are granted under this license. | ||
* | ||
* Copyright (c) 2024, Dash Industry Forum. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without modification, | ||
* are permitted provided that the following conditions are met: | ||
* * Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation and/or | ||
* other materials provided with the distribution. | ||
* * Neither the name of Dash Industry Forum nor the names of its | ||
* contributors may be used to endorse or promote products derived from this software | ||
* without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY | ||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
/** | ||
* @class | ||
* @ignore | ||
*/ | ||
class ClientDataReporting { | ||
constructor() { | ||
this.cmcdParameters = null; | ||
this.serviceLocations = null; | ||
this.serviceLocationsArray = []; | ||
this.adaptationSets = null; | ||
this.adaptationSetsArray = []; | ||
} | ||
} | ||
|
||
export default ClientDataReporting; |
Oops, something went wrong.