Viqeo is supported by Google AMProject.org and has own AMP-tag <amp-viqeo-player>
...
Code Block | ||
---|---|---|
| ||
<amp-viqeo-player data-profileid="391" data-videoid="7f2b039d7c073043d927" width="640" height="360" layout="responsive" autoplay> </amp-viqeo-player> |
Where:
data-profileid="391" (original code: data-profile="391")
data-videoid="7f2b039d7c073043d927" (original code: vid=7f2b039d7c073043d927 )
If you add to AMP-page external or recommendations player, there is no vid in code, so instead of using data-videoid="7f2b039d7c073043d927" —
you need to setup parameters this way:
data-videoId='{ “playerId”: 1, “videoSrc”: “video.mp4“, “previewSrc“: “preview.jpg“}'
where:
playerId - is a player id (data-playerId in player code (Settings>Players)
videoSrc - data-videoSrc
previewSrc - data-previewSrc
width = (any width you want, i.e. 640)
height = should be taken from height video aspect ratio (data-aspectRatio)
layout="responsive" (highly recommended to keep it as "responsive")
autoplay — attribute to play videos automatically.
Info | ||
---|---|---|
| ||
We strongly recommend |
to add autoplay. This option forces video to start muted when visible, it's much better for views and engagement. |
Info | ||
---|---|---|
| ||
To make everything work properly add a script to your AMP-page: https://cdn.ampproject.org/v0/amp-viqeo-player-latest.js |
WordPress:
To replace Viqeo standard code by AMP-tag you can use following plugins:
https://wordpress.org/plugins/amp/
https://wordpress.org/plugins/accelerated-mobile-pages/
Info | ||
---|---|---|
| ||
If <amp-viqeo-player> tag is not presented in allowed tags you can add it manually in settings file: amp/includes/sanitizers/class-amp-allowed-tags-generated.php |
Examples:
Lifehacker.ru, autoplayed videos
...