Skip to content

Commit

Permalink
Merge pull request #182 from kaltura/ADA-1809-Recorder-Plugin-Update-…
Browse files Browse the repository at this point in the history
…Zoom

ADA-1809 recorder plugin update zoom
  • Loading branch information
atarsh authored Dec 10, 2024
2 parents 878cc04 + 01f2fa1 commit e7d6d65
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 3 deletions.
38 changes: 38 additions & 0 deletions src/components/App/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@
text-align: center;
height: 100%;
width: 100%;
@media (max-width: 1024px) {
max-width: 100%;
max-height: 100%;
display: block;
height: auto;
width: auto;
}
border-radius: 4px;
font-family: Lato, sans-serif;
background-color: black;
}
.express-recorder__controls {
position: relative;
margin-top: -79px;
@media (max-width: 512px) {
margin-top: -50px;
}
@media (max-width: 320px) {
margin-top: -45px;
}
}
.express-recorder__save {
margin-top: 55px;
Expand All @@ -18,6 +31,15 @@
.express-recorder__countdown {
position: relative;
margin-top: -363px;
@media(max-width: 512px) {
margin-top: -300px;
}
@media(max-width: 427px) {
margin-top: -280px;
}
@media(max-width: 320px) {
margin-top: -190px;
}
}
.controls__cancel {
margin-top: 175px;
Expand All @@ -30,6 +52,16 @@
height: 43px;
width: 100px;
cursor: pointer;
@media(max-width: 512px) {
margin-top: 90px;
}
@media(max-width: 320px) {
margin-top: 5px;
height: 20px;
font-size: 12px;
line-height: 15px;
width: 60px;
}
}
.bottom__btn {
height: 36px;
Expand Down Expand Up @@ -90,6 +122,12 @@
}
.express-recorder__playback {
height: 100%;
@media (max-width: 1024px) {
height: 70vh;
}
@media (max-width: 639px) {
height: 100vh;
}
width: 100%;
border-radius: 4px;
overflow: hidden;
Expand Down
17 changes: 17 additions & 0 deletions src/components/Countdown-timer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
height: 88px;
width: 88px;
text-align: center;
@media (max-width: 256px) {
margin-top: 110px;
}
}

.countdown-number {
Expand All @@ -14,6 +17,10 @@
font-size: 48px;
z-index: 2;
position: relative;
@media (max-width: 320px) {
line-height: 30px;
font-size: 25px;
}
}

@keyframes countdown-anim {
Expand All @@ -36,6 +43,16 @@
margin-top: -86px;
margin-left: 2px;
background-color: rgba(0,0,0,0.5);
@media (max-width: 320px) {
width: 40px;
height: 40px;
margin-left: 20px;
margin-top: -39px;
}
@media (max-width: 256px) {
margin-left: 20px;
margin-top: -35px;
}
}
@keyframes spin {
to {
Expand Down
8 changes: 8 additions & 0 deletions src/components/Recording-timer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ button.timer-button {
align-items: center;
justify-content: space-between;
width: 82px;

@media (max-width: 512px) {
height: 15px;
}
@media (max-width: 320px) {
height: 8px;
padding: 13px 10px 13px 10px;
}
}
.recording-timer {
display: inline-block;
Expand Down
21 changes: 21 additions & 0 deletions src/components/Settings/Settings-devices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,32 @@ export class SettingsDevices extends Component<Props, State> {
selectedClass = styles["selected-device"];
isSelected = true;
}
/**
* Positions the tooltip for a menu item dynamically, especially when the menu is zoomed
* and scrolling is active. Adjusts the tooltip's position and size based on the screen width.
* @param event - The event triggered when interacting with a menu item.
*/
function showTooltip(event: any) {
const label = event.currentTarget;
const tooltip = label.querySelector(".device-label__popup");

const rect = label.getBoundingClientRect();
if (window.innerWidth <= 427) {
tooltip.style.top = `${rect.top - 10}px`;
tooltip.style.left = `${rect.left - rect.width / 2}px`;
tooltip.style.transform = "translateY(50%)";
tooltip.style.width = "60%";
}
if (window.innerWidth <= 320) {
tooltip.style.left = `${rect.left - rect.width}px`;
}
}
return (
<div
key={index.toString()}
onClick={isOn && !isSelected ? () => this.handleItemClick(item) : undefined}
onKeyDown={e => this.handleItemPress(e, item)}
onMouseOver={showTooltip}
className={
selectedClass +
" device-label " +
Expand Down
38 changes: 35 additions & 3 deletions src/components/Settings/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
height: 40px;
background: #111111;
border-radius: 28px;
@media (max-width: 512px) {
height: 20px;
}
@media (max-width: 320px) {
height: 15px;
padding: 0.5em 0.5em;
}
}
Expand All @@ -20,9 +24,12 @@
&:hover {
background-image: linear-gradient(-180deg, #ed2a38, #c51c22);
}
@media (max-width: 512px) {
height: 18px;
width: 18px;
}
@media (max-width: 320px) {
height: 1.8em;
width: 1.8em;
margin-left: 0;
}
}
.resources-item {
Expand Down Expand Up @@ -119,6 +126,9 @@
left: 70px;
top: -8px;
}
@media (max-width: 427px) {
position: fixed;
}
}
.selected-device:before {
content: "";
Expand All @@ -137,6 +147,10 @@
i {
margin-left: 13px;
margin-bottom: 2px;

@media (max-width: 320px) {
margin-left: 0;
}
}
}
.resource-link {
Expand All @@ -152,8 +166,11 @@
background-color: #666666;
border-radius: 4px;
}
@media (max-width: 512px) {
padding: 0;
}
@media (max-width: 320px) {
padding: 0.1em;
margin: 0;
}
}
.device-disabled {
Expand Down Expand Up @@ -188,6 +205,21 @@
border-radius: 4px;
background: #333333;
color: #ffffff;
@media (max-width: 427px) {
bottom: 30px;
left: 8px;
padding: 4px 0;
max-height: 120px;
max-width: 90%;
overflow-y: scroll;
overflow-x: hidden;
}
@media (max-width: 320px) {
max-height: 80px;
}
@media (max-width: 256px) {
max-height: 50px;
}
}
.device-label__selected-icon {
right: 20px;
Expand Down
3 changes: 3 additions & 0 deletions src/components/Toggle-button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
display: block;
padding-left: 10px;
padding-right: 10px;
@media (max-width: 320px) {
line-height: 20px;
}
&:focus {
text-decoration: none;
border-radius: 4px;
Expand Down

0 comments on commit e7d6d65

Please sign in to comment.