Skip to content

Commit 563d722

Browse files
authored
Merge branch 'master' into ME-19011-a11y-non-text-contrast
2 parents f8c6994 + 97e36f5 commit 563d722

File tree

10 files changed

+28
-23
lines changed

10 files changed

+28
-23
lines changed

docs/colors.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ <h3 class="text-primary">Player 1</h3>
5858
data-cld-source='{ "publicId": "dog", "info": { "title": "Sea turtle", "subtitle": "Short movie about a sea turtle" } }'
5959
data-cld-colors='{ "base": "#0b602b", "accent": "#cddc39", "text": "#fff" }'
6060
class="cld-video-player cld-fluid"
61+
id="player-1"
6162
></video>
6263
</div>
6364
<h3 class="text-primary">Player 2</h3>
@@ -68,6 +69,7 @@ <h3 class="text-primary">Player 2</h3>
6869
data-cld-source='{ "publicId": "sea_turtle", "info": { "title": "Sea turtle", "subtitle": "Short movie about a sea turtle" } }'
6970
data-cld-colors='{ "base": "#111", "accent": "#03a9f4", "text": "#ffeb3b" }'
7071
class="cld-video-player cld-fluid cld-video-player-skin-dark"
72+
id="player-2"
7173
></video>
7274
</div>
7375

@@ -78,6 +80,7 @@ <h3 class="text-primary">Player 3</h3>
7880
playsinline
7981
data-cld-source='{ "publicId": "elephants", "info": { "title": "Elephants", "subtitle": "Short movie about elephants" } }'
8082
data-cld-colors='{ "base": "#ffffff", "accent": "#676a46", "text": "#007d29" }' class="cld-video-player cld-fluid cld-video-player-skin-light"
83+
id="player-3"
8184
></video>
8285
</div>
8386

docs/multiple-players.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ <h3 class="text-primary">Player 1</h3>
5555
playsinline
5656
data-cld-public-id="elephants"
5757
class="cld-video-player cld-video-player-skin-dark"
58+
id="player-1"
5859
></video>
5960
</div>
6061

@@ -64,8 +65,9 @@ <h3 class="text-primary">Player 2</h3>
6465
muted
6566
playsinline
6667
data-cld-public-id="marmots"
67-
class="cld-video-player cld-video-player-skin-light">
68-
</video>
68+
class="cld-video-player cld-video-player-skin-light"
69+
id="player-2"
70+
></video>
6971
</div>
7072

7173
<h3 class="text-primary">Player 3</h3>
@@ -74,8 +76,9 @@ <h3 class="text-primary">Player 3</h3>
7476
muted
7577
playsinline
7678
data-cld-public-id="snow_deer_short"
77-
class="cld-video-player">
78-
</video>
79+
class="cld-video-player"
80+
id="player-3"
81+
></video>
7982
</div>
8083

8184
<p class="mt-4">

src/assets/styles/components/title-bar.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
padding: clamp(1.3em, 4cqw, 2em);
1717
pointer-events: none;
1818
container-type: inline-size;
19+
text-shadow: 0 0 0.5em var(--color-base);
20+
color: var(--color-text);
21+
background-image: linear-gradient(color-mix(in srgb, var(--color-base) 70%, transparent), transparent 100%);
1922

2023
.vjs-title-bar-title {
2124
width: 100%;

src/plugins/chapters/chapters.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
transform: translateX(-50%);
4242
bottom: 2.7em;
4343
position: absolute;
44-
text-shadow: 0 0 4px color-mix(in srgb, var(--color-base) 40%, transparent);
44+
padding: 0 0.3em;
45+
font-weight: bold;
46+
text-shadow: 0 0 8px var(--color-base), 0 0 1px var(--color-base), 0 0 1px var(--color-base);
4547
&:not(:empty) ~ .vjs-vtt-thumbnail-display {
4648
bottom: 4em;
4749
}

src/plugins/colors/index.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ const playerColors = `
4949
color: rgba(--text-color, 0.3);
5050
}
5151
52-
.PLAYER-CLASS-PREFIX .vjs-title-bar {
53-
color: --text-color;
54-
background-image: linear-gradient(rgba(--base-color, 0.4), rgba(255, 255, 255, 0) 100%);
55-
}
56-
5752
.PLAYER-CLASS-PREFIX .vjs-recommendations-overlay {
5853
color: --text-color;
5954
background-color: rgba(--base-color, 0.4);

src/plugins/playlist/ui/playlist.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
box-sizing: border-box;
7878

7979
.cld-video-player-skin-dark & {
80-
text-shadow: 1px 1px 1px rgba(#000, 0.3);
80+
text-shadow: 0 0 1px var(--color-base);
8181

8282
@media only screen and (max-width: 768px) {
8383
background: var(--color-base);

src/plugins/playlist/ui/thumbnail/thumbnail.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
bottom: 0;
2323
left: 0;
2424
background: linear-gradient(to top, var(--color-base), transparent 80%);
25-
opacity: 0.6;
25+
opacity: 0.9;
2626
}
2727

2828
&.cld-plw-panel-item-active {
2929
border: 1px solid var(--color-accent);
3030
box-sizing: border-box;
31-
.cld-plw-item-info-wrap {
32-
color: var(--color-accent);
33-
}
31+
box-shadow: 0 0 3em -0.5em var(--color-accent) inset;
3432
}
3533
}
3634

src/video-player.utils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ export const overrideDefaultVideojsComponents = () => {
108108
const Player = videojs.getComponent('Player');
109109
let children = Player.prototype.options_.children;
110110

111-
// Add TitleBar as default
112-
children.push('titleBar');
111+
if (children.indexOf('titleBar') === -1) {
112+
children.push('titleBar');
113+
}
113114

114115
const ControlBar = videojs.getComponent('ControlBar');
115116
if (ControlBar) {

test/e2e/src/pom/colorsApiPage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Page } from '@playwright/test';
22
import { VideoComponent } from '../../components/videoComponent';
33
import { BasePage } from './BasePage';
4-
const COLORS_API_PAGE_COLOR_SKIN_VIDEO_SELECTOR = '//*[@id="vjs_video_3_html5_api"]';
5-
const COLORS_API_PAGE_DARK_SKIN_VIDEO_SELECTOR = '//*[@id="vjs_video_627_html5_api"]';
6-
const COLORS_API_PAGE_LIGHT_SKIN_VIDEO_SELECTOR = '//*[@id="vjs_video_1229_html5_api"]';
4+
const COLORS_API_PAGE_COLOR_SKIN_VIDEO_SELECTOR = '//*[@id="player-1_html5_api"]';
5+
const COLORS_API_PAGE_DARK_SKIN_VIDEO_SELECTOR = '//*[@id="player-2_html5_api"]';
6+
const COLORS_API_PAGE_LIGHT_SKIN_VIDEO_SELECTOR = '//*[@id="player-3_html5_api"]';
77

88
/**
99
* Video player examples colors API page object

test/e2e/src/pom/multiplePlayersPage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Page } from '@playwright/test';
22
import { VideoComponent } from '../../components/videoComponent';
33
import { BasePage } from './BasePage';
4-
const MULTIPLE_PLAYERS_PAGE_PLAYER_1_VIDEO_SELECTOR = '//*[@id="vjs_video_3_html5_api"]';
5-
const MULTIPLE_PLAYERS_PAGE_PLAYER_2_VIDEO_SELECTOR = '//*[@id="vjs_video_627_html5_api"]';
6-
const MULTIPLE_PLAYERS_PAGE_PLAYER_3_VIDEO_SELECTOR = '//*[@id="vjs_video_1229_html5_api"]';
4+
const MULTIPLE_PLAYERS_PAGE_PLAYER_1_VIDEO_SELECTOR = '//*[@id="player-1_html5_api"]';
5+
const MULTIPLE_PLAYERS_PAGE_PLAYER_2_VIDEO_SELECTOR = '//*[@id="player-2_html5_api"]';
6+
const MULTIPLE_PLAYERS_PAGE_PLAYER_3_VIDEO_SELECTOR = '//*[@id="player-3_html5_api"]';
77

88
/**
99
* Video player examples colors API page object

0 commit comments

Comments
 (0)