EDUCATOR-3930 fix video player speed adjustments
This commit is contained in:
@@ -904,9 +904,9 @@ function(VideoPlayer, HLS, _) {
|
||||
|
||||
it('set video speed to the new speed', function() {
|
||||
VideoPlayer.prototype.onSpeedChange.call(state, '0.75', false);
|
||||
expect(state.setSpeed).toHaveBeenCalledWith('0.75');
|
||||
expect(state.setSpeed).toHaveBeenCalledWith(0.75);
|
||||
expect(state.videoPlayer.setPlaybackRate)
|
||||
.toHaveBeenCalledWith('0.75');
|
||||
.toHaveBeenCalledWith(0.75);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -427,7 +427,7 @@ function(HTML5Video, HTML5HLSVideo, Resizer, HLS, _, Time) {
|
||||
);
|
||||
}
|
||||
|
||||
newSpeed = parseFloat(newSpeed).toFixed(2).replace(/\.00$/, '.0');
|
||||
newSpeed = parseFloat(newSpeed);
|
||||
this.setSpeed(newSpeed);
|
||||
this.videoPlayer.setPlaybackRate(newSpeed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user