Skip to content

Commit 7917297

Browse files
fix(FEC-15083): Add right controls to xs player (#1198)
This fixes https://kaltura.atlassian.net/browse/FEC-15083
1 parent b031c3a commit 7917297

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

src/components/bottom-bar/_bottom-bar.scss

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,6 @@
113113
}
114114
}
115115

116-
&.size-xs {
117-
.bottom-bar {
118-
.controls-container {
119-
.right-controls {
120-
display: none;
121-
}
122-
}
123-
}
124-
}
125-
126116
&.size-xs,
127117
&.size-sm {
128118
.control-button-container:not(.upper-bar-icon) {

src/components/bottom-bar/bottom-bar-utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ export function filterControlsByPriority(
55
currentControlWidth: number,
66
lowerPriorityControls: string[][]
77
): string[] {
8-
const numOfOverflowControls = Math.ceil((currentMinBreakPointWidth - currentBarWidth) / currentControlWidth) || 1;
8+
// Add 20% buffer to account for spacing/margins between controls
9+
const overflow = currentMinBreakPointWidth - currentBarWidth;
10+
const adjustedOverflow = overflow * 1.2;
11+
12+
const numOfOverflowControls = Math.ceil(adjustedOverflow / currentControlWidth) || 1;
913
const controlsToRemove = lowerPriorityControls.flat().slice(0, numOfOverflowControls);
1014
const priorityPair: string[] = [...lowerPriorityControls].reverse().find(p => p.length > 1)!;
1115
if (controlsToRemove[controlsToRemove.length - 1] === priorityPair?.[0]) {

0 commit comments

Comments
 (0)