Skip to content

Commit

Permalink
chore: example pages (#575)
Browse files Browse the repository at this point in the history
* chore: example pages

* chore: example pages

* chore: example pages
  • Loading branch information
tsi authored Mar 10, 2024
1 parent 86388f5 commit 26332ba
Show file tree
Hide file tree
Showing 11 changed files with 171 additions and 514 deletions.
136 changes: 0 additions & 136 deletions docs/autoplay-fallback.html

This file was deleted.

118 changes: 0 additions & 118 deletions docs/cloudinary-analytics-multiple-videos.html

This file was deleted.

55 changes: 38 additions & 17 deletions docs/cloudinary-analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@
<script type="text/javascript" src="./scripts.js"></script>
<script type="text/javascript">
window.addEventListener('load', function(){

player = cloudinary.videoPlayer('player', {
cloud_name: 'demo',
cloudinaryAnalytics: true,
const player = cloudinary.videoPlayer('player', {
cloud_name: 'demo',
secure: true,
cloudinaryAnalytics: true
});

var source = { publicId: 'marmots', info: { title: 'marmots', subtitle: 'marmots subtitle', description: 'lorem ipsum marmots' } };
player.source('elephants');

const adpPlayer = cloudinary.videoPlayer('adpPlayer', {
cloud_name: 'demo',
secure: true,
cloudinaryAnalytics: true
});

player.source(source);
adpPlayer.source('https://res.cloudinary.com/demo/video/upload/sp_hd/sea_turtle.mpd');
}, false);
</script>

Expand All @@ -51,13 +57,22 @@ <h3 class="mb-4">Cloudinary analytics</h3>
playsinline
controls
muted
autoplay
class="cld-video-player"
width="500">
</video>
width="500"
></video>

<p class="mt-4">
<a href="https://cloudinary.com/documentation/video_player_events_analytics#tracking_video_player_analytics">Analytics documentation</a>
</p>
<br><br><br>

<video
id="adpPlayer"
playsinline
controls
muted
autoplay
class="cld-video-player"
width="500"
></video>

<h3 class="mt-4">Example Code:</h3>

Expand All @@ -68,24 +83,30 @@ <h3 class="mt-4">Example Code:</h3>
id="player"
controls
muted
autoplay
class="cld-video-player"
width="500"&gt;
&lt;/video&gt;

</code>
<code class="language-javascript">
&lt;!-- Actual code --&gt;
&lt;script type="text/javascript"&gt;

// Initialize player
var player = cloudinary.videoPlayer('player', {
const player = cloudinary.videoPlayer('player', {
cloud_name: 'demo',
cloudinaryAnalytics: true,
secure: true,
cloudinaryAnalytics: true
});

var source = { publicId: 'marmots', info: { title: 'marmots', subtitle: 'marmots subtitle', description: 'lorem ipsum marmots' } };
player.source('elephants');

const adpPlayer = cloudinary.videoPlayer('adpPlayer', {
cloud_name: 'demo',
secure: true,
cloudinaryAnalytics: true
});

player.source(source);
adpPlayer.source('https://res.cloudinary.com/demo/video/upload/sp_hd/sea_turtle.mpd');

&lt;/script&gt;
</code>
Expand Down
Loading

0 comments on commit 26332ba

Please sign in to comment.