Important: this documentation is not applicable to your currently selected format ads!
Embeds the Google Read Aloud Player.
<script async custom-element="amp-google-read-aloud-player" src="https://cdn.ampproject.org/v0/amp-google-read-aloud-player-0.1.js"></script>
Embeds the Google Read Aloud player. This player reads the content of your page out loud.
|data-api-key (required)||API key identifies the publisher, and must be provided in order to use the player.
Each API Key is correlated to a closed list of domains that represent the publisher domains. Only URLs that belong to one of these domains are able to be played by the web player.
During the piloting phase, the API Key will be provided to the publisher by Google. Other API Keys that were generated using the Google Cloud Console won’t work.
|data-tracking-ids (required)||The list of the
Google Analytics tracking IDs to send the player metrics to (comma separated).
You are required to have a Google Analytics tracking ID in order to use this player during the pilot period. The tracking ID will be provided to you by Google.
If you want to send the player metrics also to your Google Analytics account, add your tracking ID (or IDs) to this list.
|data-voice (required)||The voice to use for generating the Text-to-Speech audio. Publishers should use only a single voice and only from the supported voices list (TBD).|
|data-url||The canonical URL of the web page to read aloud. The URL must be publicly accessible and
free of any PII. The URL must be on a domain that was configured by Google and correlated with the
specific API key.
When the parameter isn’t provided, the player uses the Canonical URL link tag of the current page. This is useful for reading aloud the content of the current page and only a single Read Aloud player is embedded in the page (no infinite scroll).
This value overrides it, and publishers are required to set it only in these cases:
|data-speakable||Controls the contents to read aloud.
When present, uses text only from elements annotated with speakable markup, otherwise, Google analyzes the document automatically to choose the suitable text parts.
|data-call-to-action-label||The call to action label that is shown before the user pressed on play for the first time. Publishers can use it as a teaser to invite users to press the play button. If not present, "Listen to article" (localized) is shown. The string can be in any language.|
|data-intro||The URL of the MP3 audio file which will be played before the player starts reading from the beginning. The intro can be used by publishers to create a unique opening for each playback. The intro is played whenever a listener starts playback from the beginning.|
|data-outro||The URL of the MP3 audio file which will be played after the player ends reading. The outro can be used by publishers to create a unique ending for each playback.|
|data-ad-tag-url||A complete VAST ad tag URL with parameters for playing pre-roll audio ads. When present, audio ads will be played before reading aloud page contents, after the user clicks on the play button for the first time. If not present, only page content will be played. |
The ad tag URL must include the following parameters:
amp-google-read-aloud-player on your AMP document:
<amp-google-read-aloud-player height="65" data-api-key="<YOUR_API_KEY>" data-tracking-ids="<YOUR_TRACKING_IDS>" data-voice="<YOUR_VOICE>" ></amp-google-read-aloud-player>
See amp-google-read-aloud-player rules in the AMP validator specification.
Bu belgeyi defalarca okudunuz ama tüm sorularınıza tatmin edici bir yanıt bulamadınız mı? Belki başka kişiler de bu şekilde hissetmiştir: Stack Overflow'dan onlara ulaşın.Stack Overflow'a git Bir hata veya eksik bir özellik mi buldunuz?
AMP projesi, katılımınızı ve katkılarınızı güçlü bir şekilde teşvik ediyor! Açık kaynak topluluğumuzun devamlı bir katılımcısı olacağınızı umuyoruz ancak özel olarak ilgilendiğiniz konularla ilgili tek seferlik katkıları da memnuniyetle karşılıyoruz.GitHub'a git