Skip to content

Commit

Permalink
Move upgradeBackgroundAudio to layoutCallback (ampproject#20982)
Browse files Browse the repository at this point in the history
  • Loading branch information
newmuis authored and Noran Azmy committed Mar 22, 2019
1 parent 6b6183b commit e0ca338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/amp-story/1.0/amp-story-page.js
Expand Up @@ -237,7 +237,6 @@ export class AmpStoryPage extends AMP.BaseElement {

/** @override */
buildCallback() {
upgradeBackgroundAudio(this.element);
this.delegateVideoAutoplay();
this.markMediaElementsWithPreload_();
this.initializeMediaPool_();
Expand Down Expand Up @@ -364,6 +363,7 @@ export class AmpStoryPage extends AMP.BaseElement {

/** @override */
layoutCallback() {
upgradeBackgroundAudio(this.element);
this.muteAllMedia();

return Promise.all([
Expand Down

0 comments on commit e0ca338

Please sign in to comment.