extensions/amp-story/1.0/amp-story-system-layer.js
/**
   * Reacts to the presence of audio on a page to determine which audio messages
   * to display.
   * @param {boolean} pageHasAudio
   * @private
   */
Reacts to the presence of audio on a page to determine which audio messages
to display.
@param {boolean} pageHasAudio
@private
Reacts to the presence of audio on a page to determine which audio messages to display . @param { boolean } pageHasAudio @private
onPageHasAudioStateUpdate_(pageHasAudio) {
    pageHasAudio =
      pageHasAudio ||
      !!this.storeService_.get(StateProperty.STORY_HAS_BACKGROUND_AUDIO_STATE);
    this.vsync_.mutate(() => {
      pageHasAudio
        ? this.getShadowRoot().setAttribute(
            CURRENT_PAGE_HAS_AUDIO_ATTRIBUTE,
            ''
          )
        : this.getShadowRoot().removeAttribute(
            CURRENT_PAGE_HAS_AUDIO_ATTRIBUTE
          );
    });
  }
onPageHasAudioStateUpdate_ ( pageHasAudio ) { pageHasAudio = pageHasAudio || ! ! this . storeService_ . get ( StateProperty . STORY_HAS_BACKGROUND_AUDIO_STATE ) ; this . vsync_ . mutate ( ( ) => { pageHasAudio ? this . getShadowRoot ( ) . setAttribute ( CURRENT_PAGE_HAS_AUDIO_ATTRIBUTE , '' ) : this . getShadowRoot ( ) . removeAttribute ( CURRENT_PAGE_HAS_AUDIO_ATTRIBUTE ) ; } ) ; }
Reacts to the presence of audio on a page to determine which audio messages
 to display.
Reacts to the presence of audio on a page to determine which audio messages to display .