Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dash.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,9 @@ declare namespace dashjs {
mode?: 'query' | 'header',
enabledKeys?: Array<string>
},
dvbReporting?: {
reportingUrl?: string | null,
}
cmsd?: {
enabled?: boolean,
abr?: {
Expand Down
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,9 @@ declare namespace dashjs {
mode?: 'query' | 'header',
enabledKeys?: Array<string>
},
dvbReporting?: {
reportingUrl?: string | null,
}
cmsd?: {
enabled?: boolean,
abr?: {
Expand Down
14 changes: 14 additions & 0 deletions src/core/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ import Events from './events/Events';
* mode: Constants.CMCD_MODE_QUERY,
* enabledKeys: ['br', 'd', 'ot', 'tb' , 'bl', 'dl', 'mtp', 'nor', 'nrr', 'su' , 'bs', 'rtp' , 'cid', 'pr', 'sf', 'sid', 'st', 'v']
* },
* dvbReporting: {
* reportingUrl: null,
* },
* cmsd: {
* enabled: false,
* abr: {
Expand Down Expand Up @@ -783,6 +786,12 @@ import Events from './events/Events';
* This value is used to specify the desired CMCD parameters. Parameters not included in this list are not reported.
*/

/**
* @typedef {Object} module:Settings~DvbReportingSettings
* @property {string} [reportingUrl]
* Overide DVB reporting url.
*/

/**
* @typedef {Object} module:Settings~CmsdSettings
* @property {boolean} [enabled=false]
Expand Down Expand Up @@ -914,6 +923,8 @@ import Events from './events/Events';
* Adaptive Bitrate algorithm related settings.
* @property {module:Settings~CmcdSettings} cmcd
* Settings related to Common Media Client Data reporting.
* @property {module:Settings~DvbReportingSettings} dvbReporting
* Settings related to Common Media Client Data reporting.
* @property {module:Settings~CmsdSettings} cmsd
* Settings related to Common Media Server Data parsing.
*/
Expand Down Expand Up @@ -1179,6 +1190,9 @@ function Settings() {
mode: Constants.CMCD_MODE_QUERY,
enabledKeys: ['br', 'd', 'ot', 'tb', 'bl', 'dl', 'mtp', 'nor', 'nrr', 'su', 'bs', 'rtp', 'cid', 'pr', 'sf', 'sid', 'st', 'v']
},
dvbReporting: {
reportingUrl: null,
},
cmsd: {
enabled: false,
abr: {
Expand Down
3 changes: 1 addition & 2 deletions src/streaming/metrics/controllers/MetricsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ function MetricsController(config) {

reportingController = ReportingController(context).create({
debug: config.debug,
metricsConstants: config.metricsConstants,
mediaPlayerModel: config.mediaPlayerModel
metricsConstants: config.metricsConstants
});

reportingController.initialize(metricsEntry.Reporting, rangeController);
Expand Down
9 changes: 5 additions & 4 deletions src/streaming/metrics/reporting/reporters/DVBReporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import MetricSerialiser from '../../utils/MetricSerialiser';
import RNG from '../../utils/RNG';
import CustomParametersModel from '../../../models/CustomParametersModel';

import Settings from '../../../../core/Settings';
function DVBReporting(config) {
config = config || {};
let instance;
Expand All @@ -44,7 +44,8 @@ function DVBReporting(config) {
reportingPlayerStatusDecided,
isReportingPlayer,
reportingUrl,
rangeController;
rangeController,
settings = Settings(context).getInstance();

let USE_DRAFT_DVB_SPEC = true;
let allowPendingRequestsToCompleteOnReset = true;
Expand Down Expand Up @@ -141,13 +142,13 @@ function DVBReporting(config) {

rangeController = rc;

reportingUrl = entry.dvb_reportingUrl;
reportingUrl = settings.get().streaming.dvbReporting.reportingUrl || entry.dvb_reportingUrl;

// If a required attribute is missing, the Reporting descriptor may
// be ignored by the Player
if (!reportingUrl) {
throw new Error(
'required parameter missing (dvb:reportingUrl)'
'MPD parameter missing "dvb:reportingUrl" or URL not given in settings'
);
}

Expand Down