Cloudinary Video Player
The Cloudinary Video Player
In order to get this video onto a webpage, we could just drop that URL into an HTML5 <video>
element. However, for advanced uses like adaptive streaming, playlists, and you guessed it – immersive 360° video – we’re going to supercharge the native <video>
element with the Cloudinary Video Player.
Here’s a CodePen showing basic Cloudinary Video Player usage. I’ve commented the relevant bits; please fork it, change the account name to your own Cloudinary account name, and work in the forked Pen for the remainder of this workshop.
See the Pen Cloudinary 360 Player by Eric Portis (@eeeps) on CodePen.
Note that this Pen relies on loading the Cloudinary Core JavaScript library, and the Cloudinary Video Player JS + CSS. Check out the exact URLs to include in your own Pens and projects under “Settings”.
As you can see, our immersive 360° video is looking pretty flat, and strange. In order to deliver a truly immersive video experience, we’re going to have to leverage a third party plugin: videojs-panorama.
Code Review:
Include Cloudinary's JavaScript script and CSS link within your page header:
HTML:
Javascript:
Minimal Code
Additional code to add player controls and deal with cross origin hosted media.
That's it. This will create a HTML 5 Video player ready to play the tropical360_qjbr2d video.
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