Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Commit

Permalink
Keep autoplaying video playing after src change
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jun 8, 2017
1 parent 508ec53 commit 7a67be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function addPlayer(video, hasAudio) {
setTime(video, 0, true);
player.driver.src = video.src;
// Playing videos will only keep playing if no src was present when .play()鈥檈d
if (wasEmpty) {
if (wasEmpty || (!hasAudio && video.autoplay)) {
player.driver.play();
} else {
player.updater.stop();
Expand Down

0 comments on commit 7a67be7

Please sign in to comment.