Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbryer committed Feb 13, 2018
1 parent 948d0b2 commit 78106f8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/streaming/MediaPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,7 @@ function MediaPlayer() {
if (!mediaPlayerInitialized) {
throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;
}

if (element) {
videoModel.setElement(element);
detectProtection();
Expand Down
2 changes: 1 addition & 1 deletion src/streaming/controllers/BufferController.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ function BufferController(config) {
time: currentTime,
threshold: BUFFER_RANGE_CALCULATION_THRESHOLD
})[0];

// Ensure we keep full range of current fragment
if (currentTimeRequest) {
rangeToKeep.start = Math.min(currentTimeRequest.startTime, rangeToKeep.start);
Expand Down
2 changes: 1 addition & 1 deletion src/streaming/controllers/StreamController.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function StreamController() {
mediaSource.removeEventListener('sourceopen', onMediaSourceOpen);
mediaSource.removeEventListener('webkitsourceopen', onMediaSourceOpen);
setMediaDuration();

if (!oldStream) {
eventBus.trigger(Events.SOURCE_INITIALIZED);
}
Expand Down
6 changes: 2 additions & 4 deletions test/unit/streaming.controllers.BufferControllerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ describe('BufferController', function () {

it('should trigger BUFFER_LEVEL_UPDATED event', function (done) {
const buffer = mediaSourceMock.buffers[0];
buffer.addRange({start: 0, end: 20});
const onBufferLevelUpdated = function (e) {
eventBus.off(Events.BUFFER_LEVEL_UPDATED, onBufferLevelUpdated, this);
expect(e.bufferLevel).to.equal(buffer.buffered.end(0) - buffer.buffered.start(0));
Expand All @@ -413,9 +412,9 @@ describe('BufferController', function () {
eventBus.trigger(Events.PLAYBACK_SEEKING);
});

/*
it('should trigger BUFFER_LEVEL_STATE_CHANGED event', function (done) {
const buffer = mediaSourceMock.buffers[0];
buffer.addRange({start: 0, end: 20});
const onBufferStateChanged = function (e) {
eventBus.off(Events.BUFFER_LEVEL_STATE_CHANGED, onBufferStateChanged, this);
expect(e.state).to.equal('bufferLoaded');
Expand All @@ -430,7 +429,6 @@ describe('BufferController', function () {
it('should trigger BUFFER_LOADED event if enough buffer', function (done) {
const buffer = mediaSourceMock.buffers[0];
buffer.addRange({start: 0, end: 20});
const onBufferLoaded = function () {
eventBus.off(Events.BUFFER_LOADED, onBufferLoaded, this);
Expand All @@ -440,7 +438,7 @@ describe('BufferController', function () {
// send event
eventBus.trigger(Events.PLAYBACK_SEEKING);
});
});*/
});

describe('Method getBufferRange', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/streaming.controllers.SourceBufferSink.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Events from '../../src/core/events/Events';
import EventBus from '../../src/core/EventBus';
import FactoryMaker from '../../src/core/FactoryMaker.js';

//import TextBufferMock from './mocks/TextBufferMock';
import TextBufferMock from './mocks/TextBufferMock';
import TextControllerMock from './mocks/TextControllerMock';
import MediaSourceBufferMock from './mocks/MediaSourceBufferMock';
import MediaSourceMock from './mocks/MediaSourceMock';
Expand Down

0 comments on commit 78106f8

Please sign in to comment.