Hello I would like to know why I can't set the default value of volume of my audio in a modal in svelte. When I add this line : audio.volume = 0.5;
my modal not open anymore. Here is all the modal component :
<script>
export let texte;
export let clip;
let audio = document.getElementById("aled");
audio.volume = 0.5;
</script>
<style>
body
{
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.clip
{
text-align: center;
}
</style>
<body>
<div class="clip">
<audio id="aled" src={clip} controls></audio>
<div>
BLA BLA
{texte}
</div>
</div>
</body>
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment