Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enable equalizer on stories without videos
  • Loading branch information
mszylkowski committed Oct 7, 2021
commit 6598993fd83f6ebf568b57899ade0ef6c0b43401
1 change: 1 addition & 0 deletions extensions/amp-story/1.0/amp-story-system-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {renderAsElement} from './simple-template';
import {setImportantStyles} from '#core/dom/style';
import {toArray} from '#core/types/array';
import {renderEqIcon} from '#service/video/autoplay';
import {installAutoplayStylesForDoc} from '#service/video/install-autoplay-styles';

/** @private @const {string} */
const AD_SHOWING_ATTRIBUTE = 'ad-showing';
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-story/1.0/amp-story.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import './amp-story-user-overridable.css';
@import './amp-story-vertical.css';
@import './pagination-buttons.css';
@import '../../../css/video-autoplay.css';

/** Common */
amp-story, amp-story-page, amp-story-cta-layer {
Expand Down
11 changes: 9 additions & 2 deletions src/service/video-manager-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ class VideoEntry {

this.hasAutoplay = video.element.hasAttribute(VideoAttributes.AUTOPLAY);

if (this.hasAutoplay) {
if (this.hasAutoplay && !this.isManagedByPool_()) {
this.manager_.installAutoplayStyles();
}

Expand Down Expand Up @@ -820,7 +820,7 @@ class VideoEntry {
if (
element.hasAttribute(VideoAttributes.NO_AUDIO) ||
element.signals().get(VideoServiceSignals.USER_INTERACTED) ||
(this.video.isManagedByPool && this.video.isManagedByPool())
this.isManagedByPool_()
) {
return;
}
Expand Down Expand Up @@ -1014,6 +1014,13 @@ class VideoEntry {
};
});
}

/**
* @private
*/
isManagedByPool_() {
return this.video.isManagedByPool && this.video.isManagedByPool();
}
}

/**
Expand Down