aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/pull_request_template.md10
-rw-r--r--src/js/html5.js10
2 files changed, 12 insertions, 8 deletions
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index c4779d3c..670d8a5b 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,8 +1,8 @@
### Link to related issue (if applicable)
-### Sumary of proposed changes
+### Summary of proposed changes
-### Task list
-
-- [ ] Tested on [supported browsers](https://github.com/sampotts/plyr#browser-support)
-- [ ] Gulp build completed \ No newline at end of file
+### Checklist
+- [ ] Use `develop` as the base branch
+- [ ] Exclude the gulp build from the PR
+- [ ] Test on [supported browsers](https://github.com/sampotts/plyr#browser-support)
diff --git a/src/js/html5.js b/src/js/html5.js
index 3818a441..63596cfc 100644
--- a/src/js/html5.js
+++ b/src/js/html5.js
@@ -99,6 +99,13 @@ const html5 = {
// Set new source
player.media.src = supported[0].getAttribute('src');
+ // Restore time
+ const onLoadedMetaData = () => {
+ player.currentTime = currentTime;
+ player.off('loadedmetadata', onLoadedMetaData);
+ };
+ player.on('loadedmetadata', onLoadedMetaData);
+
// Load new source
player.media.load();
@@ -107,9 +114,6 @@ const html5 = {
player.play();
}
- // Restore time
- player.currentTime = currentTime;
-
// Trigger change event
utils.dispatchEvent.call(player, player.media, 'qualitychange', false, {
quality: input,