Skip to content

Commit

Permalink
remove getIsOnDemand function : not used.
Browse files Browse the repository at this point in the history
In my opinion, if a function is only used in test unit file, it has to be deleted.
  • Loading branch information
nicosang committed Jun 9, 2017
1 parent f25a8ef commit 9d3a48c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
5 changes: 0 additions & 5 deletions src/dash/models/DashManifestModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,6 @@ function DashManifestModel() {
return has;
}

function getIsOnDemand(manifest) {
return hasProfile(manifest, 'urn:mpeg:dash:profile:isoff-on-demand:2011');
}

function getIsDVB(manifest) {
return hasProfile(manifest, 'urn:dvb:dash:profile:dvb-dash:2014');
}
Expand Down Expand Up @@ -895,7 +891,6 @@ function DashManifestModel() {
getKID: getKID,
getContentProtectionData: getContentProtectionData,
getIsDynamic: getIsDynamic,
getIsOnDemand: getIsOnDemand,
getIsDVB: getIsDVB,
getDuration: getDuration,
getBandwidth: getBandwidth,
Expand Down
12 changes: 1 addition & 11 deletions test/unit/dash.DashManifestModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,7 @@ describe('DashManifestModel', function () {
const isDVB = dashManifestModel.getIsDVB(manifest);

expect(isDVB).to.be.false; // jshint ignore:line
});

it('should return true when getIsOnDemand is called and manifest contains the on-demand profile', () => {
const manifest = {
profiles: 'urn:dvb:dash:profile:dvb-dash:2014,urn:mpeg:dash:profile:isoff-on-demand:2011'
};

const isOnDemand = dashManifestModel.getIsOnDemand(manifest);

expect(isOnDemand).to.be.true; // jshint ignore:line
});
});

it('should return NaN when minimumUpdatePeriod is not present in manifest', () => {
const manifest = {};
Expand Down

0 comments on commit 9d3a48c

Please sign in to comment.