Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: light esm build #765

Merged
merged 5 commits into from
Dec 26, 2024
Merged

feat: light esm build #765

merged 5 commits into from
Dec 26, 2024

Conversation

tsi
Copy link
Collaborator

@tsi tsi commented Dec 16, 2024

No description provided.

@tsi tsi self-assigned this Dec 16, 2024
@tsi tsi requested a review from a team as a code owner December 16, 2024 14:07
Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for cld-vp-esm-pages ready!

Name Link
🔨 Latest commit 23db0cd
🔍 Latest deploy log https://app.netlify.com/sites/cld-vp-esm-pages/deploys/676d6ed805b2bd000878aa05
😎 Deploy Preview https://deploy-preview-765--cld-vp-esm-pages.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for cld-video-player ready!

Name Link
🔨 Latest commit 23db0cd
🔍 Latest deploy log https://app.netlify.com/sites/cld-video-player/deploys/676d6ed7720a5700086d4538
😎 Deploy Preview https://deploy-preview-765--cld-video-player.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tsi tsi requested review from jakub-roch and ehab-cl December 17, 2024 16:06
Copy link
Contributor

@ehab-cl ehab-cl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cloudinary Video Player</title>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not critical but the title should match the example name ....same comment for the second example as well.


<script type="module">
import { videoPlayer } from 'cloudinary-video-player/light';
import 'cloudinary-video-player/light/chapters';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this work import 'cloudinary-video-player/chapters'? if so i think its preferable since the current syntax implies that this is a light plugin which is not true in my eyes (The plugin is the same)

Also this way the imports are not consistent with the css import

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, unfortunately it won't work since both /chapters and /light/chapters are importing videojs, but they were compiled using a different videojs core.
I tried multiple things to work around it but unfortunately nothing worked 100% in all of the full/light/esm/cdn variants :(

Comment on lines +23 to +27
const tracksArr = [textTracks.captions, ...(textTracks.subtitles || [])];
return {
textTracks: hasConfig(textTracks),
textTracksLength: tracksArr.length,
textTracksOptions: hasConfig(textTracks.options) || Object.keys(textTracks.options).join(','),
textTracksOptions: hasConfig(textTracks.options) && Object.keys(textTracks.options).join(','),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how these two changes are related to exporting light version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't, just fixed a warning I got while working on this

const webpackConfig = require('./es6.config');
const path = require('path');

delete webpackConfig.entry; // overwrite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be that there is something in webpack-merge api that allows you to overwrite when merging which maybe can be easier to read as it is more explict ? (Just a thought, i did not really go and checked their API)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought delete webpackConfig.entry would be as explicit as it gets, what could be more explicit than that? :)

@tsi tsi merged commit 0049fb9 into edge Dec 26, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants