|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <title>Cloudinary Video Player</title> |
| 6 | + <link href="https://res.cloudinary.com/cloudinary-marketing/image/upload/f_auto,q_auto/c_scale,w_32/v1597183771/creative_staging/cloudinary_internal/Website/Brand%20Updates/Favicon/cloudinary_web_favicon_192x192.png" rel="icon" type="image/png"> |
| 7 | + |
| 8 | + <!-- Bootstrap --> |
| 9 | + <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> |
| 10 | + |
| 11 | + <!-- highlight.js --> |
| 12 | + <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-light.min.css"> |
| 13 | + <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> |
| 14 | + <script>hljs.initHighlightingOnLoad();</script> |
| 15 | + |
| 16 | + <!-- |
| 17 | + We're loading scripts & style dynamically for development/testing. |
| 18 | + Real-world usage would look like this: |
| 19 | +
|
| 20 | + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cloudinary-video-player/dist/cld-video-player.min.css"> |
| 21 | + <script src="https://cdn.jsdelivr.net/npm/cloudinary-video-player/dist/cld-video-player.min.js"></script> |
| 22 | +
|
| 23 | + --> |
| 24 | + |
| 25 | + <script type="text/javascript" src="./scripts.js"></script> |
| 26 | + |
| 27 | + <script type="text/javascript"> |
| 28 | + window.addEventListener('load', function(){ |
| 29 | + |
| 30 | + const player = cloudinary.videoPlayer('player', { |
| 31 | + cloudName: 'demo', |
| 32 | + fluid: 'yes', // Should be a boolean |
| 33 | + debug: true |
| 34 | + }); |
| 35 | + |
| 36 | + player.source({ |
| 37 | + publicId: 'elephants' |
| 38 | + }) |
| 39 | + |
| 40 | + }, false); |
| 41 | + </script> |
| 42 | + |
| 43 | +</head> |
| 44 | +<body> |
| 45 | + <div class="container p-4 col-12 col-md-9 col-xl-6"> |
| 46 | + <nav class="nav mb-2"> |
| 47 | + <a href="./index.html"><< Back to examples index</a> |
| 48 | + </nav> |
| 49 | + <h1>Cloudinary Video Player</h1> |
| 50 | + <h3 class="mb-4">Debug mode</h3> |
| 51 | + |
| 52 | + <p>This mode adds debugging information to the video player. It will validate the configuration passed to the player and warn about any issues.</p> |
| 53 | + |
| 54 | + <video |
| 55 | + id="player" |
| 56 | + playsinline |
| 57 | + controls |
| 58 | + muted |
| 59 | + autoplay |
| 60 | + class="cld-video-player" |
| 61 | + width="500" |
| 62 | + ></video> |
| 63 | + |
| 64 | + <p class="mt-4"> |
| 65 | + <a href="https://cloudinary.com/documentation/cloudinary_video_player">Full documentation</a> |
| 66 | + </p> |
| 67 | + |
| 68 | + <h3 class="mt-4">Example Code:</h3> |
| 69 | + <pre> |
| 70 | + <code class="language-html"> |
| 71 | + <video |
| 72 | + id="player" |
| 73 | + controls |
| 74 | + muted |
| 75 | + autoplay |
| 76 | + class="cld-video-player" |
| 77 | + width="500" |
| 78 | + ></video> |
| 79 | + </code> |
| 80 | + <code class="language-javascript"> |
| 81 | + |
| 82 | + const player = cloudinary.videoPlayer('player', { |
| 83 | + cloudName: 'demo', |
| 84 | + fluid: 'yes', // Should be a boolean |
| 85 | + debug: true |
| 86 | + }); |
| 87 | + |
| 88 | + player.source({ |
| 89 | + publicId: 'elephants' |
| 90 | + }) |
| 91 | + |
| 92 | + </code> |
| 93 | + </pre> |
| 94 | + </div> |
| 95 | + |
| 96 | +</body> |
| 97 | +</html> |
0 commit comments