The poster serves as the placeholder image before the video plays, while artwork is the image that displays in the notification via the MediaSession API. This example contains both the poster and artwork attributes. The additional information for the video displays in the notification center of the user's device (along with the play/pause controls). The amp-video component implements the Media Session API, which enables developers to specify more information about the video file. This element includes common attributes extended to AMP components. For more details, see the Video in AMP spec. If the video is visible, the video displays fullscreen after the user rotates their device into landscape mode. This hides the equalizer icon that is displayed noaudioĪnnotates the video as having no audio. The autoplay attribute automatically controls the mute behavior. The muted attribute is deprecated and no longer has any effect. disableremoteplaybackĭetermines whether the media element is allowed to have a remote playback UI such as Chromecast or AirPlay. Required if a track resource is hosted on a different origin than the document. If present, the video will automatically loop back to the start upon reaching the end. If this attribute is present and the video is playing manually, the video will be "minimized" and fixed to a corner or an element when the user scrolls out of the video component's visual area. Same as controlsList attribute of HTML5 video element. If this attribute is present, the browser offers controls to allow the user to control video playback. This attribute is similar to the controls attribute in the HTML5 video. To be played, which are outlined in the Video in AMP spec. There are some conditions that the component needs to meet If this attribute is present, and the browser supports autoplay, the video will be automatically ByĪlternatively, you can present a click-to-play overlay. The image for the frame to be displayed before video playback has started. Open this snippet in playground Attributes src If present, this node and its children form the content that displays if HTML5 video is not supported on the user’s browser. a fallback if the browser doesn’t support HTML5 video: One or zero immediate child nodes can have the fallback attribute.a placeholder for before the video starts.Whenever the video has narration or important audio information, make sure to include subtitles/captions for users who may not be able to hear it or have their sound turned off. If the track is hosted on a different origin than the document, you must add the crossorigin attribute to the tag. track tags to enable subtitles in the video.source tags: Just like in the HTML tag, you can add tag children to specify different source media files to play.The amp-video component accepts up to four unique types of HTML nodes as children: You can control an amp-video component much the same way as a standard HTML5 tag. The amp-video component loads the video resource specified by its src attribute lazily, at a time determined by the runtime. Amp-app-banner amp-video Advanced Video Docking Click-to-play overlay for amp-video Integrating Videos in AMP an Overview Rich Media Notifications Video Carousels with amp-carousel Video rotate to fullscreen with hint UsageĪ replacement for the HTML5 video tag only to be used for direct HTML5 video file embeds.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |