-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Áudio</title> | ||
<link rel="stylesheet" href="https://cdn.plyr.io/3.6.7/plyr.css"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> | ||
<style> | ||
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap'); | ||
|
||
body { | ||
height: 100vh; | ||
overflow: hidden; | ||
margin: 0px; | ||
} | ||
|
||
.audio-container { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
font-family: 'Open Sans', sans-serif; | ||
justify-content: flex-start; | ||
cursor: pointer; | ||
width: 100px; | ||
} | ||
|
||
.audio-container img { | ||
width: 50px; | ||
height: 50px; | ||
border-radius: 50%; | ||
object-fit: cover; | ||
padding-right: 8px; | ||
padding-left: 10px; | ||
} | ||
|
||
.audio-container .microphone-icon { | ||
position: relative; | ||
margin-left: -67px; | ||
margin-bottom: -25px; | ||
font-size: 22px; | ||
color: #4ad954; | ||
} | ||
|
||
.audio-container .microphone-icon.blue { | ||
color: #3db8ee; | ||
} | ||
|
||
.plyr--audio .plyr__control.plyr__tab-focus, | ||
.plyr--audio .plyr__control:hover, | ||
.plyr--audio .plyr__control[aria-expanded=false] { | ||
background: rgba(0, 0, 0, 0); | ||
background: var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, rgba(0, 0, 0, 0)))); | ||
color: rgba(0, 0, 0, 0); | ||
color: var(--plyr-audio-control-color-hover, #797979) | ||
} | ||
|
||
.plyr--audio .plyr__controls { | ||
background: rgba(0, 0, 0, 0); | ||
background: var(--plyr-audio-controls-background, rgba(0, 0, 0, 0)); | ||
border-radius: inherit; | ||
color: #4a5464; | ||
color: var(--plyr-audio-control-color,#4a5464); | ||
margin-left: 0px; | ||
padding: 0px; | ||
} | ||
|
||
.plyr--audio .plyr__control--overlaid .plyr__control__icon { | ||
font-size: 33px; | ||
} | ||
|
||
.plyr--full-ui input[type=range]::-webkit-slider-thumb { | ||
-webkit-appearance: none; | ||
border: 0; | ||
border-radius: 100%; | ||
box-shadow: 0 1px 1px rgba(35,40,47,.15),0 0 0 1px rgba(35,40,47,.2); | ||
box-shadow: var(--plyr-range-thumb-shadow,0 1px 1px rgba(35,40,47,.15),0 0 0 1px rgba(35,40,47,.2)); | ||
height: 13px; | ||
height: var(--plyr-range-thumb-height,13px); | ||
margin-top: -4px; | ||
margin-top: calc(var(--plyr-range-thumb-height,13px)/2*-1 - var(--plyr-range-track-height,5px)/2*-1); | ||
position: relative; | ||
-webkit-transition: all .2s ease; | ||
transition: all .2s ease; | ||
width: 13px; | ||
width: var(--plyr-range-thumb-height,13px); | ||
background: var(--range-thumb-background, #4ad954); | ||
} | ||
|
||
.plyr--full-ui input[type=range].blue::-webkit-slider-thumb { | ||
background: var(--range-thumb-background-active, #3db8ee); | ||
} | ||
|
||
.hide { | ||
display: none; | ||
} | ||
|
||
.plyr__controls .plyr__controls__item.plyr__progress__container:first-child, | ||
.plyr__controls .plyr__controls__item.plyr__time+.plyr__time, | ||
.plyr__controls .plyr__controls__item.plyr__time:first-child { | ||
padding-left: 0; | ||
display: block; | ||
margin-left: 7.5px; | ||
} | ||
|
||
.plyr__time+.plyr__time:before { | ||
content: ""; | ||
margin-right: var(--plyr-control-spacing); | ||
} | ||
|
||
.plyr--audio .plyr__controls .plyr__controls__item.plyr__time--current.hide, | ||
.plyr--audio .plyr__controls .plyr__controls__item.plyr__time--duration.hide { | ||
display: none; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<div class="audio-container" id="audioContainer"> | ||
<!-- Cole o link do Seu áudio Abaixo--> | ||
<audio class="plyr" src="https://atendimentoprivado.com.br:39533/typebot/public/workspaces/clnlxtx850001qn2hmewsubzp/typebots/clnt3aafq0001qn2guc9233mm/blocks/htff76ogppg093r8dnlmjyv5?v=1697473635061"></audio> | ||
<!-- Cole o link da Sua imagem Abaixo--> | ||
<img src="https://atendimentoprivado.com.br:39533/typebot/public/workspaces/clnlxtx850001qn2hmewsubzp/typebots/clnt3aafq0001qn2guc9233mm/hostAvatar?v=1697473705010" alt="Imagem"> | ||
<div class="microphone-icon"> | ||
<i class="fas fa-microphone"></i> | ||
</div> | ||
</div> | ||
|
||
<script src="https://cdn.plyr.io/3.6.7/plyr.js"></script> | ||
<script> | ||
document.addEventListener('DOMContentLoaded', function() { | ||
const player = new Plyr('.plyr', { | ||
controls: ['play', 'progress', 'current-time', 'duration'] | ||
}); | ||
|
||
const audioElement = document.querySelector('.plyr'); | ||
const currentTimeElement = document.querySelector('.plyr__time--current'); | ||
const durationElement = document.querySelector('.plyr__time--duration'); | ||
const microphoneIcon = document.querySelector('.microphone-icon'); | ||
|
||
currentTimeElement.classList.add('hide'); // Adiciona a classe 'hide' ao iniciar | ||
|
||
audioElement.addEventListener('play', function() { | ||
currentTimeElement.classList.remove('hide'); | ||
durationElement.classList.add('hide'); | ||
microphoneIcon.classList.add('blue'); // Adiciona a classe 'blue' para alterar a cor do ícone | ||
audioElement.classList.add('blue'); // Adiciona a classe 'blue' para alterar o background do controle deslizante | ||
audioElement.style.setProperty('--range-thumb-background', '#3db8ee'); | ||
}); | ||
|
||
audioElement.addEventListener('pause', function() { | ||
currentTimeElement.classList.add('hide'); | ||
durationElement.classList.remove('hide'); | ||
}); | ||
|
||
const audioContainer = document.getElementById('audioContainer'); | ||
audioContainer.addEventListener('click', function() { | ||
const playButton = audioContainer.querySelector('.plyr__controls button[data-plyr="play"]'); | ||
playButton.click(); | ||
}); | ||
|
||
const playPauseButton = document.getElementById('audioContainer').querySelector('.plyr__controls button[data-plyr="play"]'); | ||
const audioBox = document.querySelector('.audio-box'); | ||
playPauseButton.addEventListener('click', function() { | ||
const playButton = audioContainer.querySelector('.plyr__controls button[data-plyr="play"]'); | ||
playButton.click(); | ||
}); | ||
|
||
audioBox.addEventListener('click', function(event) { | ||
event.stopPropagation(); | ||
const playButton = audioContainer.querySelector('.plyr__controls button[data-plyr="play"]'); | ||
playButton.click(); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |