...
Code Block |
---|
language | xml |
---|
title | Code implementation example |
---|
|
<script async src="//cdn.viqeo.tv/js/vq_starter.js"></script>
<div
style="width:100%;height:0;position:relative;padding-bottom: 57%;"
class="viqeo-external_player"
data-playerId="01"
data-profile="001"
data-videoSrc="URL of your video"
data-previewSrc="(optional) video preview. URL of preview image or remove this line if you don't have a preview image"
>
<iframe src="//cdn.viqeo.tv/embed/?videoSrc=URL of your video&playerId=89" width="100%" height="100%" style="position:absolute;" frameBorder="0" allowFullScreen></iframe>
</div>
|
Youtube video replacement
Change two times "URL of your video" by URL like https://www.youtube.com/embed/6Y6Oj7Sm4mc and all videos will be changed to Viqeo player when ready. Until that time Youtube will be played by Viqeo-player but as Native Youtube embed.
Adaptive streaming (MBR)
If you have few video streams transcoded as separate mp4-files (or have different video sizes), use JSON array to support adaptive streaming:
Code Block |
---|
|
data-videoSrc='[{"url": "http://stage.api.viqeo.tv/storage/09/2c/9abb51d0cdaeac2ff129aa0b4557473a.mp4"},
{"url": "http://stage.api.viqeo.tv/storage/09/2c/e659e4a100f6b61f20d7fd041e1a1d29.mp4"}, {"url": "http://stage.api.viqeo.tv/storage/09/2c/51a5189b20040aad8fd08913542644f4.mp4"}]' |
Where first file is default — this video is used to create a key-value, but all other files can be added in any sequence.
Info |
---|
|
Also you can play adaptive bitrate videos by replacing file by URL to HLS m3u8-playlist file with various video streams in HLS format |
Info |
---|
|
To add a player to AMP-Pages please use Viqeo AMP-tag. Here is an instruction. |
...