Answer the question
In order to leave comments, you need to log in
Why doesn't video work in safari?
Hello.
I use the tag to embed a video on a page. To start and stop the video, I use my own button, on which I hung a click event. jQuery code.
The code:
<video controls="" id="project_video">
<source src="http://revolution/wp-content/uploads/2021/04/00021.mp4" type="video/mp4">
</video>
$('.project').on('click', '.button-video', function(){
var video_id = $(this).data('video_id'),
button_id = $(this).attr('id'),
obj_video = $('#' + video_id)[0];
if (obj_video.paused && button_id != 'button_pause'){
obj_video.play()
} else {
obj_video.pause();
}
return false;
});
Answer the question
In order to leave comments, you need to log in
JavaScript is blocked in safari, some functions do not work. Or try enabling JavaScript in your safari. I don't know what specific version of safari you are using, but you should look at how js works in safari.
I would open the developer panel, there will be some errors and I would change the code based on them
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question