Skip to content

Commit

Permalink
Mobile icons (#527)
Browse files Browse the repository at this point in the history
* Use fluid:true on videojs setup for responsive design

* Adjust width of player icons for Android
  • Loading branch information
Dananji authored Jun 17, 2024
1 parent 6ba3a20 commit d9ae3af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MediaPlayer/VideoJS/VideoJSPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ function VideoJSPlayer({
data-testid={`videojs-${isVideo ? 'video' : 'audio'}-element`}
data-canvasindex={cIndexRef.current}
ref={videoJSRef}
className='video-js vjs-big-play-centered vjs-disabled'
className={`video-js vjs-big-play-centered vjs-disabled ${IS_ANDROID ? 'is-mobile' : ''}`}
onTouchStart={saveTouchStartCoords}
onTouchEnd={mobilePlayToggle}
style={{ display: `${canvasIsEmptyRef.current ? 'none' : ''}` }}
Expand Down
12 changes: 12 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@
width: 2.5rem !important;
}

.is-mobile .vjs-control-bar {
font-size: 90%;
}

.is-mobile .vjs-control {
width: 2rem !important;
}

/* Make the horizontal volume panel always visible for audio */
.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active {
transition: none !important;
Expand Down Expand Up @@ -139,6 +147,10 @@ video/poster area the controls are displayed correctly. */
}

/* captions button selection */
.is-mobile .captions-on {
border-bottom: 0.3rem ridge $primaryGreen !important;
}

.captions-on {
border-bottom: 0.45rem ridge $primaryGreen !important;
}
Expand Down

0 comments on commit d9ae3af

Please sign in to comment.