Skip to content

Commit

Permalink
remove only fix function call
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Aug 30, 2023
1 parent 21762d4 commit d0c38b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/content-steering-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export default class ContentSteeringController extends videojs.EventTarget {
*
* @param {string} pathway the pathway string to add
*/
set availablePathway(pathway) {
addAvailablePathway(pathway) {
this.availablePathways_.add(pathway);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/playlist-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,7 @@ export class PlaylistController extends videojs.EventTarget {
}
this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering);
for (const playlist of main.playlists) {
this.contentSteeringController_.availablePathways.add(this.pathwayAttribute_(playlist));
this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));
}
this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this));
// Do this at startup only, after that the steering requests are managed by the Content Steering class.
Expand Down
12 changes: 6 additions & 6 deletions test/content-steering-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ContentSteeringController from '../src/content-steering-controller';
import { useFakeEnvironment } from './test-helpers';
import xhrFactory from '../src/xhr';

QUnit.module.only('ContentSteering', {
QUnit.module('ContentSteering', {
beforeEach(assert) {
this.env = useFakeEnvironment(assert);
this.requests = this.env.requests;
Expand Down Expand Up @@ -238,8 +238,8 @@ QUnit.test('Can handle HLS content steering manifest with PATHWAY-PRIORITY and t
pathwayId: 'hls2'
};

this.contentSteeringController.availablePathways.add('hls1');
this.contentSteeringController.availablePathways.add('hls2');
this.contentSteeringController.addAvailablePathway('hls1');
this.contentSteeringController.addAvailablePathway('hls2');
this.assignAndRequest(steeringTag);
this.requests[0].respond(200, { 'Content-Type': 'application/json' }, '{ "VERSION": 1, "PATHWAY-PRIORITY": ["hls1", "hls2"] }');
assert.deepEqual(this.contentSteeringController.steeringManifest.priority, ['hls1', 'hls2'], 'priority is expected value');
Expand All @@ -263,9 +263,9 @@ QUnit.test('Can handle DASH content steering manifest with PATHWAY-PRIORITY and
pathwayId: 'dash3'
};

this.contentSteeringController.availablePathways.add('dash1');
this.contentSteeringController.availablePathways.add('dash2');
this.contentSteeringController.availablePathways.add('dash3');
this.contentSteeringController.addAvailablePathway('dash1');
this.contentSteeringController.addAvailablePathway('dash2');
this.contentSteeringController.addAvailablePathway('dash3');
this.assignAndRequest(steeringTag);
this.requests[0].respond(200, { 'Content-Type': 'application/json' }, '{ "VERSION": 1, "SERVICE-LOCATION-PRIORITY": ["dash2", "dash1", "dash3"] }');
assert.deepEqual(this.contentSteeringController.steeringManifest.priority, ['dash2', 'dash1', 'dash3'], 'priority is expected value');
Expand Down

0 comments on commit d0c38b9

Please sign in to comment.