Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Setting of volume or mute/unmute while playing is not working. #111

Closed
windchime18 opened this issue Mar 20, 2017 · 2 comments
Closed

Setting of volume or mute/unmute while playing is not working. #111

windchime18 opened this issue Mar 20, 2017 · 2 comments

Comments

@windchime18
Copy link

Is it possible to unmute or change the volume while playing the video? I have tried it but it wont work.

var video = document.querySelector('video');
enableInlineVideo(video);
video.addEventListener('touchstart', function () {
if (video.paused === false) {
video.pause();
}
else{
video.play();
}
});
$('#volume').on('change', function() {
$("#video").removeAttr('muted');
video.volume=this.value;
console.log(video.volume);
});

<video id="video" autoplay muted playsinline src="file.mp4"></video>
<br><br>
<div id="video-controls">
<input type="range" id="volume" min="0" max="1" step="0.1" value="1" />
</div>

@fregante
Copy link
Owner

iOS does not support volume changes.

Mute toggling is tracked in #56

@windchime18
Copy link
Author

Thank you for your prompt reply. :) 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants