| Description | Displays a Dailymotion video. |
| Availability | Stable |
| Required Script | <script async custom-element="amp-dailymotion" src="https://cdn.ampproject.org/v0/amp-dailymotion-0.1.js"></script> |
| Examples | amp-dailymotion.html dailymotion.amp.html |
With responsive layout, the width and height from the example should yield correct layouts for 16:9 aspect ratio videos.
<amp-dailymotion
data-videoid="x2m8jpp"
layout="responsive"
width="480" height="270"></amp-dailymotion>data-videoid
The Dailymotion video id found in every video page URL.
E.g. in https://www.dailymotion.com/video/x2m8jpp_dailymotion-spirit-movie_creation "x2m8jpp" is the video id.
data-mute
Whether to mute the video or not.
Value: "true" or "false"
Default value: "false"
data-endscreen-enable
Whether to enable the end screen or not.
Value: "true" or "false"
Default value: "true"
data-sharing-enable
Whether to display the sharing button or not.
Value: "true" or "false"
Default value: "true"
data-start
Specifies the time (in seconds) from which the video should start playing.
Value: integer (number of seconds). E.g. data-start=45
Default value: 0
data-ui-highlight
Change the default highlight color used in the controls.
Value: Hexadecimal color value (without the leading #). E.g. data-ui-highlight="e540ff"
data-ui-logo
Whether to display the Dailymotion logo or not.
Value: "true" or "false"
Default value: "true"
data-info
Whether to show video information (title and owner) on the start screen.
Value: "true" or "false"
Default value: "true"
The following lists validation errors specific to the amp-dailymotion tag
(see also amp-dailymotion in the AMP validator specification):
| Validation Error | Description |
|---|---|
| The 'example1' tag is missing or incorrect, but required by 'example2'. | Error thrown when required amp-dailymotion extension .js script tag is missing or incorrect. |
| The mandatory attribute 'example1' is missing in tag 'example2'. | Error thrown when data-videoid attribute missing. |
| The attribute 'example1' in tag 'example2' is set to the invalid value 'example3'. | Error thrown when the data-videoid attribute is invalid. |
| The implied layout 'example1' is not supported by tag 'example2'. | Error thrown when implied layout is set to CONTAINER; this layout type isn't supported. |
| The specified layout 'example1' is not supported by tag 'example2'. | Error thrown when specified layout is set to CONTAINER; this layout type isn't supported. |
| The property 'example1' in attribute 'example2' in tag 'example3' is set to 'example4', which is invalid. | Error thrown when invalid value is given for attributes height or width. For example, height=auto triggers this error for all supported layout types. |