-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: light esm build * chore: esm tests * chore: e2e & devServer * chore: e2e
- Loading branch information
Showing
13 changed files
with
171 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Cloudinary Video Player</title> | ||
<link | ||
href="https://res.cloudinary.com/cloudinary-marketing/image/upload/f_auto,q_auto/c_scale,w_32,e_hue:290/creative_staging/cloudinary_internal/Website/Brand%20Updates/Favicon/cloudinary_web_favicon_192x192.png" | ||
rel="icon" | ||
type="image/png" | ||
/> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
</head> | ||
<body> | ||
<div class="container p-4 col-12 col-md-9 col-xl-6"> | ||
<nav class="nav mb-2"> | ||
<a href="/index.html"><< Back to examples index</a> | ||
</nav> | ||
<h1>Cloudinary Video Player</h1> | ||
<h3 class="mb-4"><code>/all</code> build</h3> | ||
|
||
<p>Using the <code>/all</code> build, you get a build that already includes all plugins (except the big <code>/dash</code> plugin), saving you the need to import them separately</p> | ||
|
||
<video | ||
id="player" | ||
class="cld-video-player cld-fluid" | ||
crossorigin="anonymous" | ||
controls | ||
muted | ||
playsinline | ||
></video> | ||
|
||
<p class="mt-4"> | ||
<a href="https://cloudinary.com/documentation/cloudinary_video_player#installation" | ||
>Full documentation</a | ||
> | ||
</p> | ||
</div> | ||
|
||
<script type="module"> | ||
import { videoPlayer } from 'cloudinary-video-player/all'; | ||
import 'cloudinary-video-player/cld-video-player.min.css'; | ||
|
||
const player = videoPlayer('player', { | ||
cloudName: 'demo', | ||
publicId: 'dog', | ||
autoplay: true, | ||
chapters: { | ||
0: 'Chapter I', | ||
3: 'Chapter II', | ||
8: 'Chapter III', | ||
} | ||
}); | ||
</script> | ||
|
||
<!-- Bootstrap --> | ||
<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" | ||
/> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Cloudinary Video Player</title> | ||
<link | ||
href="https://res.cloudinary.com/cloudinary-marketing/image/upload/f_auto,q_auto/c_scale,w_32,e_hue:290/creative_staging/cloudinary_internal/Website/Brand%20Updates/Favicon/cloudinary_web_favicon_192x192.png" | ||
rel="icon" | ||
type="image/png" | ||
/> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
</head> | ||
<body> | ||
<div class="container p-4 col-12 col-md-9 col-xl-6"> | ||
<nav class="nav mb-2"> | ||
<a href="/index.html"><< Back to examples index</a> | ||
</nav> | ||
<h1>Cloudinary Video Player</h1> | ||
<h3 class="mb-4"><code>/light</code> build</h3> | ||
|
||
<p>Using the <code>/light</code> build gives you the smallest possible bundle-size</p> | ||
|
||
<video | ||
id="player" | ||
class="cld-video-player cld-fluid" | ||
crossorigin="anonymous" | ||
controls | ||
muted | ||
playsinline | ||
></video> | ||
|
||
<p class="mt-4"> | ||
<a href="https://cloudinary.com/documentation/cloudinary_video_player#installation" | ||
>Full documentation</a | ||
> | ||
</p> | ||
</div> | ||
|
||
<script type="module"> | ||
import { videoPlayer } from 'cloudinary-video-player/light'; | ||
import 'cloudinary-video-player/light/chapters'; | ||
import 'cloudinary-video-player/cld-video-player.min.css'; | ||
|
||
const player = videoPlayer('player', { | ||
cloudName: 'demo', | ||
publicId: 'dog', | ||
autoplay: true, | ||
chapters: { | ||
0: 'Chapter I', | ||
3: 'Chapter II', | ||
8: 'Chapter III', | ||
} | ||
}); | ||
</script> | ||
|
||
<!-- Bootstrap --> | ||
<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" | ||
/> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { merge } = require('webpack-merge'); | ||
const webpackConfig = require('./es6.config'); | ||
const path = require('path'); | ||
|
||
delete webpackConfig.entry; // overwrite | ||
|
||
module.exports = merge(webpackConfig, { | ||
|
||
entry: { | ||
'index': './index.es.js' | ||
}, | ||
|
||
output: { | ||
path: path.resolve(__dirname, '../lib/light'), | ||
} | ||
|
||
}); |