Speed settings logic improvements

This commit is contained in:
Sam Potts
2020-02-10 18:34:05 +00:00
parent ff8dedd4ec
commit 1619510dcf
6 changed files with 22 additions and 26 deletions
+4 -2
View File
@@ -42,13 +42,16 @@ const html5 = {
.filter(Boolean);
},
extend() {
setup() {
if (!this.isHTML5) {
return;
}
const player = this;
// Set speed options from config
player.options.speed = player.config.speed.options;
// Set aspect ratio if fixed
if (!is.empty(this.config.ratio)) {
setAspectRatio.call(player);
@@ -93,7 +96,6 @@ const html5 = {
if (preload !== 'none' || readyState) {
// Restore time
player.once('loadedmetadata', () => {
player.speed = playbackRate;
player.currentTime = currentTime;