Audio
To create an audio player, use the following code:
<div class="plyr"> <audio controls=""> <source src="images/demo/audio/sample.mp3" type="audio/mp3"> <source src="images/demo/audio/sample.ogg" type="audio/ogg"> </audio> </div>
Video
To create an video player, use the following code:
<div class="plyr"> <video controls="" poster="images/demo/video/poster.jpg"> <source src="images/demo/video/big_buck_bunny.mp4" type="video/mp4"> <source src="images/demo/video/big_buck_bunny.webm" type="video/webm"> </video> </div>
You can also stream youtube or vimeo videos using the player, by using the following code, where the id
is the video id on the respective channel.
Youtube
<!-- youtube --> <div class="plyr"> <div data-video-id="bTqVqk7FSmY" data-type="youtube"></div> </div>
Vimeo
<!-- vimeo --> <div class="plyr"> <div data-video-id="143418951" data-type="vimeo"></div> </div>