diff --git a/docs/es-modules/fluid.html b/docs/es-modules/fluid.html index 464d03183..fbc70435d 100644 --- a/docs/es-modules/fluid.html +++ b/docs/es-modules/fluid.html @@ -39,7 +39,7 @@
+ Player profiles provide a mechanism to define and save your video player configuration + to your Cloudinary account and then reference this profile as part of your video player setup. + For details, see the player profiles documentation. +
+ +-- -- - <video - id="player-default-profile" - controls - autoplay - muted - class="cld-video-player" - width="500"> - </video> - --- window.addEventListener('load', async function() { - const playerWithDefaultProfile = await cloudinary.player('player-default-profile', { - cloudName: 'demo', - profile: 'cld-default', - }); - - playerWithDefaultProfile.source('sea_turtle'); - }, false); --
-+- - <video - id="player-custom-profile" - controls - autoplay - muted - class="cld-video-player" - width="500"> - </video> - --- window.addEventListener('load', async function() { - const playerWithCustomProfile = await cloudinary.player('player-custom-profile', { - cloudName: 'prod', - profile: 'myCustomProfile', - }); +-Override player config - profile config overridden by JS player options
+ - playerWithCustomProfile.source('samples/cld-sample-video'); - }, false); -
-
<video
- id="player-custom-profile-overrides"
+ id="player-custom-profile"
controls
autoplay
muted
class="cld-video-player"
width="500">
</video>
+
+
+ // Load profile configuration with source() method
+ const player = await cloudinary.player('player-default-profile', {
+ cloudName: 'demo',
+ profile: 'cld-default',
+ });
+
+ player.source('samples/sea-turtle');
+
+ // Load profile configuration with publicId
+ await cloudinary.player('player-custom-profile', {
+ cloudName: 'prod',
+ profile: 'demo-profile',
+ publicId: 'samples/sea-turtle',
+ });
+
+ // Override player config (colors) - JS options take precedence
+ await cloudinary.player('player-profile-override', {
+ cloudName: 'prod',
+ profile: 'demo-profile',
+ publicId: 'samples/sea-turtle',
+ colors: {
+ base: '#22004D',
+ accent: '#FA65C7',
+ text: '#FF06D2'
+ },
+ });
+
+ // Override source config (transformation) - JS options take precedence
+ await cloudinary.player('player-source-override', {
+ cloudName: 'prod',
+ profile: 'demo-profile',
+ publicId: 'samples/sea-turtle',
+ transformation: {
+ effect: 'blur:500'
+ },
+ });
-
-
- window.addEventListener('load', async function() {
- const playerWithCustomProfileAndOverrides = await cloudinary.player('player-custom-profile-overrides', {
- cloudName: 'prod',
- profile: 'myCustomProfile',
- colors: {
- base: "#1532a8"
- },
- seekThumbnails: false,
- aiHighlightsGraph: true,
- });
-
- playerWithCustomProfileAndOverrides.source('samples/cld-sample-video');
- }, false);
-
-
-
+ // No profile - fetches config from asset
+ await cloudinary.player('player-asset-config', {
+ cloudName: 'prod',
+ publicId: 'samples/sea-turtle',
+ });
+
+
+