Skip to content

Commit 7a98a4c

Browse files
authored
Merge branch 'master' into infra/agents.md
2 parents 479deab + 1fcfa6d commit 7a98a4c

10 files changed

Lines changed: 84 additions & 40 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## [3.8.1](https://github.com/cloudinary/cloudinary-video-player/compare/v3.8.0...v3.8.1) (2026-02-22)
2+
3+
4+
### Bug Fixes
5+
6+
* remove dpr from url ([#985](https://github.com/cloudinary/cloudinary-video-player/issues/985)) ([ace2046](https://github.com/cloudinary/cloudinary-video-player/commit/ace2046ad24795d5b7ca39fbb187b8770002f884))
7+
8+
9+
10+
# [3.8.0](https://github.com/cloudinary/cloudinary-video-player/compare/v3.7.2...v3.8.0) (2026-02-22)
11+
12+
13+
### Features
14+
15+
* add responsive breakpoints ([#981](https://github.com/cloudinary/cloudinary-video-player/issues/981)) ([be477e6](https://github.com/cloudinary/cloudinary-video-player/commit/be477e6fe9e9ff76018c6cb07518fab2bd58066c))
16+
17+
18+
119
## [3.7.2](https://github.com/cloudinary/cloudinary-video-player/compare/v3.7.1...v3.7.2) (2026-01-21)
220

321

docs/breakpoints.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
const player = cloudinary.videoPlayer('player-with-breakpoints', {
3333
cloudName: 'demo',
3434
breakpoints: true,
35-
dpr: 2.0
35+
maxDpr: 2.0
3636
});
3737
player.source('sea_turtle');
3838

@@ -89,7 +89,7 @@ <h3>Breakpoints Example (DPR 2.0)</h3>
8989
<pre><code>const player = cloudinary.videoPlayer('player', {
9090
cloudName: 'demo',
9191
breakpoints: true,
92-
dpr: 2.0
92+
maxDpr: 2.0
9393
});
9494

9595
player.source('sea_turtle');</code></pre>

package-lock.json

Lines changed: 35 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudinary-video-player",
3-
"version": "3.7.2",
3+
"version": "3.8.1",
44
"description": "Cloudinary Video Player",
55
"author": "Cloudinary",
66
"license": "MIT",

src/config/configSchema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,12 @@
279279
"default": false,
280280
"description": "Enable responsive video resolution based on player width and device pixel ratio"
281281
},
282-
"dpr": {
282+
"maxDpr": {
283283
"type": "number",
284284
"minimum": 1.0,
285285
"maximum": 2.0,
286286
"default": 2.0,
287-
"description": "Device pixel ratio for responsive video (1.0, 1.5, or 2.0)"
287+
"description": "Maximum device pixel ratio cap for breakpoint rendition selection (1.0, 1.5, or 2.0)"
288288
},
289289
"resourceType": {
290290
"type": "string",

src/plugins/cloudinary/index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ import { DEFAULT_DPR, RENDITIONS } from './models/video-source/video-source.cons
1717

1818
import recommendationsOverlay from 'components/recommendations-overlay';
1919

20-
/**
21-
* Effective DPR for breakpoints: min(user value, device DPR, cap of DEFAULT_DPR).
22-
*/
23-
export const getEffectiveDpr = (userDpr, deviceDpr) =>
24-
Math.min(userDpr ?? DEFAULT_DPR, deviceDpr ?? DEFAULT_DPR, DEFAULT_DPR);
20+
export const getEffectiveDpr = (maxDpr, deviceDpr) =>
21+
Math.min(maxDpr ?? DEFAULT_DPR, deviceDpr ?? DEFAULT_DPR, DEFAULT_DPR);
2522

2623
const DEFAULT_PARAMS = {
2724
transformation: {},
@@ -153,13 +150,13 @@ class CloudinaryContext {
153150
{ hasUserPosterOptions: hasUserPosterOptions || null }
154151
);
155152

156-
// Calculate breakpoint transformation: requiredWidth = playerWidth * dpr, then closest breakpoint as width (no dpr in transformation).
153+
// Calculate breakpoint transformation: requiredWidth = playerWidth * effectiveDpr, then closest breakpoint as width (no dpr in transformation).
157154
if (options.breakpoints) {
158155
const playerEl = this.player.el();
159156
const playerWidth = playerEl?.clientWidth;
160157
const win = playerEl?.ownerDocument?.defaultView;
161158
const deviceDpr = win?.devicePixelRatio ?? DEFAULT_DPR;
162-
const dpr = getEffectiveDpr(options.dpr, deviceDpr);
159+
const dpr = getEffectiveDpr(options.maxDpr, deviceDpr);
163160
const requiredWidth = playerWidth * dpr;
164161
const width = RENDITIONS.find(rendition => rendition >= requiredWidth) || RENDITIONS[RENDITIONS.length - 1];
165162
options.breakpointTransformation = {

src/utils/get-analytics-player-options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const getSourceOptions = (sourceOptions = {}) => ({
4545
interactionAreas: hasConfig(sourceOptions.interactionAreas),
4646
videoSources: hasConfig(sourceOptions.videoSources),
4747
breakpoints: sourceOptions.breakpoints,
48-
dpr: sourceOptions.dpr,
48+
maxDpr: sourceOptions.maxDpr,
4949
});
5050

5151
const getTextTracksOptions = (textTracks = {}) => {

0 commit comments

Comments
 (0)