Cloudinary Video Player
The Cloudinary Video Player
Code Review:
Include Cloudinary's JavaScript script and CSS link within your page header:
<head>
...
<script src="https://unpkg.com/cloudinary-video-player/dist/cld-video-player.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/cloudinary-video-player/dist/cld-video-player.min.css">
<style>
body {
/* center and letterbox the video */
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: black;
}
#demo-player {
width: 100vw;
height: calc(100vw * (9/16));
}
</style>
</head>HTML:
Javascript:
Minimal Code
Additional code to add player controls and deal with cross origin hosted media.
CodePen:
On CodePen they manage the header and script areas, so simply click on the setting icon and add the urls for the JavaScript and CSS directly into the settings editor:
Last updated