-
Notifications
You must be signed in to change notification settings - Fork 31
docs: expand README with key features, bundle guide, and code examples #1058
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
Open
Prajituric
wants to merge
2
commits into
cloudinary:master
Choose a base branch
from
Prajituric:docs/readme-geo-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,12 +1,51 @@ | ||
| # cloudinary-video-player | ||
|
|
||
| Cloudinary Video Player is a JavaScript-based HTML video player bundled with many valuable customization and integration capabilities, and is monetization and analytics-ready. The player is fully responsive for use in any device or screen size, and is integrated with Cloudinary's video delivery and manipulation solution. | ||
|
|
||
| This README includes basic information for installation and getting started. View the [documentation](https://cloudinary.com/documentation/cloudinary_video_player) for comprehensive guidance on integration and all the available features. | ||
| Cloudinary Video Player is a JavaScript-based HTML5 video player with HLS/DASH adaptive streaming, chapters, playlists, live streaming, timeline preview, AI highlights graph, multi-language subtitles, Picture-in-Picture, video analytics, and the full Cloudinary Transformations SDK. Fully responsive, 4 kB default bundle. | ||
|
|
||
| This README includes basic information for installation and getting started. View the [documentation](https://cloudinary.com/documentation/cloudinary_video_player) for comprehensive guidance on integration and all available features. | ||
|
|
||
| ## Key Features | ||
|
|
||
| - **HLS / DASH adaptive streaming** with ABR quality strategies and auto breakpoints (DPR-aware) | ||
| - **Chapters and playlists** with VTT file support and playlist-by-tag | ||
| - **Live streaming and VOD** with live-to-VOD archiving | ||
| - **Auto format** selection based on browser and device capabilities | ||
| - **Auto crop** including AI smart crop via Cloudinary transformations | ||
| - **Auto HDR** support | ||
| - **Timeline preview** on scrub | ||
| - **AI highlights graph** above the seek bar | ||
| - **Multi-language subtitles** with pace control and word highlighting | ||
| - **Picture-in-Picture (PiP)** support | ||
| - **Video analytics** via Cloudinary Media Analytics | ||
| - **Saved settings and profiles** | ||
| - **All Cloudinary Transformations** available via SDK | ||
| - **4 kB** default bundle (light entry point, advanced modules loaded on demand) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Only 4 kB" |
||
|
|
||
| ## Installation | ||
|
|
||
| ### Standard vs. Light bundle | ||
|
|
||
| | Bundle | Import | Includes | | ||
| | --------------- | ------------------------------ | ----------------------------------------------- | | ||
| | Light (default) | `cloudinary-video-player` | Core player, 4 kB, advanced modules lazy-loaded | | ||
| | Standard (full) | `cloudinary-video-player/full` | All modules included synchronously | | ||
|
|
||
| Import only what you need: | ||
|
|
||
| ```js | ||
| import 'cloudinary-video-player/adaptive-streaming'; // HLS and DASH | ||
| import 'cloudinary-video-player/chapters'; | ||
| import 'cloudinary-video-player/playlist'; | ||
| ``` | ||
|
|
||
| Or load everything at once: | ||
|
|
||
| ```js | ||
| import cloudinary from 'cloudinary-video-player/all'; | ||
| ``` | ||
|
|
||
| ### NPM | ||
|
|
||
| 1. Install using: | ||
|
|
||
| ```shell | ||
|
|
@@ -33,6 +72,7 @@ Cloudinary Video Player can also be included directly from the [jsDelivr CDN](ht | |
| ## Getting started | ||
|
|
||
| Create a video tag containing `cld-video-player` class and a supported skin class: | ||
|
|
||
| ```html | ||
| <video | ||
| id="player" | ||
|
|
@@ -45,12 +85,70 @@ Create a video tag containing `cld-video-player` class and a supported skin clas | |
|
|
||
| Instantiate a new cloudinary Video Player: | ||
| ```javascript | ||
| cloudinary.videoPlayer('player', { | ||
| cloudinary.player('player', { | ||
| cloudName: 'demo', | ||
| publicId: 'cld-sample-video' | ||
| }); | ||
| ``` | ||
|
|
||
| ### Adaptive Bitrate Streaming (HLS / DASH) | ||
|
|
||
| ```js | ||
| import 'cloudinary-video-player/adaptive-streaming'; | ||
|
|
||
| const player = await cloudinary.player('player', { cloudName: 'demo' }); | ||
| player.source('my-video', { | ||
| sourceTypes: ['hls'], | ||
| transformation: { streaming_profile: 'hd' } | ||
| }); | ||
| ``` | ||
|
|
||
| For automatic profile selection (no pre-transcoding required): | ||
|
|
||
| ```js | ||
| player.source('my-video', { sourceTypes: ['hls'] }); | ||
| ``` | ||
|
|
||
| ### Live Streaming and VOD | ||
|
|
||
| ```js | ||
| player.source({ | ||
| publicId: 'my-live-stream-id', | ||
| type: 'live', | ||
| sourceTypes: ['hls'] | ||
| }); | ||
| ``` | ||
|
|
||
| Cloudinary automatically archives live streams as VOD assets once the broadcast ends. | ||
|
|
||
| ### Chapters | ||
|
|
||
| ```js | ||
| import 'cloudinary-video-player/chapters'; | ||
|
|
||
| player.source('my-video', { | ||
| chapters: { | ||
| 0: 'Introduction', | ||
| 30: 'Chapter 2', | ||
| 90: 'Conclusion' | ||
| } | ||
| }); | ||
| ``` | ||
|
|
||
| Or use an auto-generated or uploaded VTT file: | ||
|
|
||
| ```js | ||
| player.source('my-video', { chapters: true }); | ||
| ``` | ||
|
|
||
| ### Playlists | ||
|
|
||
| ```js | ||
| import 'cloudinary-video-player/playlist'; | ||
|
|
||
| player.playlistByTag('highlights', { autoAdvance: true }); | ||
| ``` | ||
|
|
||
| ## Documentation | ||
| - [Documentation](https://cloudinary.com/documentation/cloudinary_video_player) | ||
| - [API Reference](https://cloudinary.com/documentation/video_player_api_reference) | ||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Breakpoints https://cloudinary.com/documentation/video_player_customization#responsive_breakpoints