Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Prevent autoplay if autoplay is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kos authored and Chris Sinchok committed Oct 31, 2014
1 parent e9ef303 commit f18b93a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion videojs.vast.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@
// load linear ad sources and start playing them
var adSources = player.vast.sources;
player.src(adSources);
player.play();

// only play if autoplay is true
if (player.autoplay()) {
player.play();
}

var clickthrough;
if (player.vastTracker.clickThroughURLTemplate) {
Expand Down

0 comments on commit f18b93a

Please sign in to comment.