playsinline fix for mobile safari

This commit is contained in:
simon 2021-10-20 20:49:20 +07:00
parent 58efe64c5d
commit e4352e5bec
2 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,7 @@
<video
src="/media/{{ video.media_url }}"
poster="/cache/{{ video.vid_thumb_url }}" controls preload="false"
type='video/mp4' width="100%">
type='video/mp4' width="100%" playsinline>
</video>
</div>
<div class="info-box info-box-3 padding-box">

View File

@ -230,6 +230,7 @@ function createPlayer(button) {
videoPlayer.setAttribute('controls', true);
videoPlayer.setAttribute('autoplay', true);
videoPlayer.setAttribute('width', '100%');
videoPlayer.setAttribute('playsinline', true);
videoPlayer.setAttribute('poster', mediaThumb);
playerElement.appendChild(videoPlayer);
// title bar