Skip to content

Commit

Permalink
Merge pull request #5623 from avalonmediasystem/playlist-items-height
Browse files Browse the repository at this point in the history
  • Loading branch information
Dananji authored Feb 2, 2024
2 parents c68131f + 44e31b5 commit a74dc68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/javascript/components/PlaylistRamp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const Ramp = ({

let interval;

const USER_AGENT = window.navigator.userAgent;
const IS_MOBILE = (/Mobi/i).test(USER_AGENT);

React.useEffect(() => {
let url = `${base_url}/playlists/${playlist_id}/manifest.json`;
setManifestUrl(url);
Expand Down Expand Up @@ -86,7 +89,7 @@ const Ramp = ({
<Card className="ramp--playlist-accordion">
<Card.Header>
<h4>{activeItemTitle}</h4>
{ activeItemSummary && <div>{activeItemSummary}</div> }
{activeItemSummary && <div>{activeItemSummary}</div>}
</Card.Header>
<Card.Body>
<Accordion>
Expand Down Expand Up @@ -114,7 +117,7 @@ const Ramp = ({
</Card.Body>
</Card>
</Col>
<Col sm={4} className="ramp--playlist-items-column">
<Col sm={4} className={`ramp--playlist-items-column ${IS_MOBILE ? 'mobile-view' : ''}`}>
<Row>
<Col sm={6}>
<AutoAdvanceToggle />
Expand Down
7 changes: 7 additions & 0 deletions app/javascript/components/Ramp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,11 @@
max-height: inherit;
}
}

/* CSS for playlist items column height in landscape mode for mobile devices */
@media(orientation: landscape) {
.ramp--playlist-items-column.mobile-view {
height: 109vh !important;
}
}
}

0 comments on commit a74dc68

Please sign in to comment.