@uppy/audio
Version:
Uppy plugin that records audio using the device’s microphone.
198 lines (178 loc) • 4.05 kB
CSS
.uppy-Audio-container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.uppy-Audio-audioContainer {
display: flex;
width: 100%;
height: 100%;
background-color: #cfcfcf;
position: relative;
justify-content: center;
align-items: center;
}
.uppy-Audio-player {
width: 85%;
border-radius: 12px;
}
.uppy-Audio-canvas {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.uppy-Audio-footer {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
padding: 20px 20px;
}
.uppy-Audio-audioSourceContainer {
width: 100%;
flex-grow: 0;
}
.uppy-size--lg .uppy-Audio-audioSourceContainer {
width: 33%;
margin: 0;
}
.uppy-Audio-audioSource-select {
display: block;
font-size: 16px;
line-height: 1.2;
padding: 0.4em 1em 0.3em 0.4em;
width: 100%;
max-width: 90%;
border: 1px solid #757575;
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23757575%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
background-repeat: no-repeat;
background-position: right 0.4em top 50%, 0 0;
background-size: 0.65em auto, 100%;
margin: auto;
margin-bottom: 10px;
white-space: nowrap;
text-overflow: ellipsis;
}
.uppy-size--lg .uppy-Audio-audioSource-select {
font-size: 14px;
margin-bottom: 0;
}
.uppy-Audio-audioSource-select::-ms-expand {
display: none;
}
.uppy-Audio-buttonContainer {
width: 50%;
margin-left: 25%;
text-align: center;
flex: 1;
}
.uppy-size--lg .uppy-Audio-buttonContainer {
width: 34%;
margin-left: 0;
}
.uppy-Audio-recordingLength {
width: 25%;
flex-grow: 0;
color: #757575;
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
text-align: right;
}
.uppy-size--lg .uppy-Audio-recordingLength {
width: 33%;
}
.uppy-Audio-button {
width: 45px;
height: 45px;
border-radius: 50%;
background-color: #e32437;
color: #fff;
cursor: pointer;
transition: all 0.3s;
}
.uppy-Audio-button:focus {
outline: none;
}
.uppy-Audio-button::-moz-focus-inner {
border: 0;
}
.uppy-Audio-button:focus {
box-shadow: 0 0 0 3px rgba(18, 105, 207, 0.5);
}
.uppy-Audio-button:hover {
background-color: #d31b2d;
}
[data-uppy-theme=dark] .uppy-Audio-button:focus {
outline: none;
}
[data-uppy-theme=dark] .uppy-Audio-button::-moz-focus-inner {
border: 0;
}
[data-uppy-theme=dark] .uppy-Audio-button:focus {
box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85);
}
.uppy-Audio-button--submit {
background-color: #1269cf;
margin: 0 12px;
}
.uppy-Audio-button--submit:hover {
background-color: #105db8;
}
.uppy-Audio-button svg {
width: 26px;
height: 26px;
max-width: 100%;
max-height: 100%;
display: inline-block;
vertical-align: text-top;
overflow: hidden;
fill: currentColor;
}
.uppy-size--md .uppy-Audio-button {
width: 60px;
height: 60px;
}
.uppy-Audio-permissons {
padding: 15px;
display: flex;
align-items: center;
justify-content: center;
flex-flow: column wrap;
height: 100%;
flex: 1;
}
.uppy-Audio-permissons p {
max-width: 450px;
line-height: 1.3;
text-align: center;
line-height: 1.45;
color: #939393;
margin: 0;
}
.uppy-Audio-permissonsIcon svg {
width: 100px;
height: 75px;
color: #bbb;
margin-bottom: 30px;
}
.uppy-Audio-title {
font-size: 22px;
line-height: 1.35;
font-weight: 400;
margin: 0;
margin-bottom: 5px;
padding: 0 15px;
max-width: 500px;
text-align: center;
color: #333;
}
[data-uppy-theme=dark] .uppy-Audio-title {
color: #eaeaea;
}