Mini-Player controls patch (#1688)
* Remove draggable component from mini player on mobile * Replace draggable disabling method * Clean code
This commit is contained in:
parent
363fe82050
commit
4ffec69f25
2 changed files with 57 additions and 58 deletions
|
@ -375,15 +375,15 @@ export default function FileRenderFloating(props: Props) {
|
|||
|
||||
return (
|
||||
<Draggable
|
||||
onDrag={!isMobile ? handleDragMove : undefined}
|
||||
onStart={!isMobile ? handleDragStart : undefined}
|
||||
onStop={!isMobile ? handleDragStop : undefined}
|
||||
onDrag={handleDragMove}
|
||||
onStart={handleDragStart}
|
||||
onStop={handleDragStop}
|
||||
defaultPosition={position}
|
||||
position={isFloating ? position : { x: 0, y: 0 }}
|
||||
bounds="parent"
|
||||
disabled={noFloatingPlayer}
|
||||
handle={!isMobile ? '.draggable' : ''}
|
||||
handle=".draggable"
|
||||
cancel=".button"
|
||||
disabled={noFloatingPlayer}
|
||||
>
|
||||
<div
|
||||
className={classnames([CONTENT_VIEWER_CLASS], {
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
|
||||
.icon {
|
||||
flex-shrink: 0;
|
||||
// width:20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,12 +100,64 @@
|
|||
.autoplay-countdown {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vjs-play-control {
|
||||
transform: unset !important;
|
||||
display: inline-block !important;
|
||||
position: fixed !important;
|
||||
top: 12px !important;
|
||||
left: calc(50% - 80px) !important;
|
||||
height: 32px !important;
|
||||
width: 32px !important;
|
||||
background-color: rgba(var(--color-primary-static), 0.6) !important;
|
||||
border-radius: 50% !important;
|
||||
opacity: 1 !important;
|
||||
pointer-events: unset !important;
|
||||
padding: 15px !important;
|
||||
|
||||
.vjs-icon-placeholder {
|
||||
&::before {
|
||||
font-size: 2.2em !important;
|
||||
line-height: 32px !important;
|
||||
background-size: 60%;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
&::before {
|
||||
line-height: 32px !important;
|
||||
}
|
||||
}
|
||||
.vjs-control-text {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vjs-control-bar {
|
||||
display: inline-block !important;
|
||||
opacity: 1 !important;
|
||||
|
||||
.vjs-progress-control.vjs-control {
|
||||
top: 40px;
|
||||
margin: unset !important;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
.vjs-slider {
|
||||
margin: 0 !important;
|
||||
div,
|
||||
span {
|
||||
height: 3px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
background: unset !important;
|
||||
}
|
||||
|
@ -116,43 +167,6 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.vjs-play-control {
|
||||
transform: unset !important;
|
||||
display: inline-block !important;
|
||||
position: fixed !important;
|
||||
top: 12px !important;
|
||||
left: calc(50% - 80px) !important;
|
||||
height: 32px !important;
|
||||
width: 32px !important;
|
||||
background-color: rgba(var(--color-primary-static), 0.6) !important;
|
||||
border-radius: 50% !important;
|
||||
opacity: 1 !important;
|
||||
pointer-events: unset !important;
|
||||
padding: 15px !important;
|
||||
|
||||
.vjs-icon-placeholder {
|
||||
&::before {
|
||||
font-size: 2.2em !important;
|
||||
line-height: 32px !important;
|
||||
background-size: 60%;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
&::before {
|
||||
line-height: 32px !important;
|
||||
}
|
||||
}
|
||||
.vjs-control-text {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.vjs-play-control.vjs-playing {
|
||||
.vjs-icon-placeholder::before {
|
||||
content: '' !important;
|
||||
|
@ -171,21 +185,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.video-js {
|
||||
.vjs-progress-control.vjs-control {
|
||||
top: 38px;
|
||||
margin: unset !important;
|
||||
max-width: 100%;
|
||||
.vjs-slider {
|
||||
margin: 0 !important;
|
||||
div,
|
||||
span {
|
||||
height: 2px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content__info {
|
||||
margin-top: -50px;
|
||||
opacity: 0;
|
||||
|
|
Loading…
Reference in a new issue