Jump to content

HTML5 video load() not working in Safari


mart94

Recommended Posts

Hi!

 

I've developed HTML5 video player with my own controls. On the right side I have playlist, if I click on <li> element, then new video will be loaded and it starts playing. Everything works fine in Firefox, Chrome, Opera, IE 9 but there is problem in Safari. Well, If I click on <li> element, then new video won't be loaded.

Code is located at http://martleib.com/projektid/elion_html5_videoplayer/ (You can view Source Code)

 

I quess, the problem is somewhere in "js/player.js" in

	$('.video_sidebar .overview li').click(function() {
	var mp4link = $(this).attr('mp4link');
	var webmlink = $(this).attr('webmlink');

	$("#html5-video-tag video")[0].pause();
	$("#html5-video-tag video #mp4").attr("src", mp4link);
	$("#html5-video-tag video #webm").attr("src", webmlink);

	$("#html5-video-tag video")[0].load();
	$("#html5-video-tag video")[0].play();

	$(".video_sidebar .overview li").css("background", "none");
	$(this).css("background-color", "#fff");
});

 

But when you visit link http://martleib.com/projektid/elion_html5_videoplayer/?id=1 (it simulates click on first <li> element in playlist) then video will be loaded and starts.

 

All the best

Mart L.

Link to comment
https://forums.phpfreaks.com/topic/264434-html5-video-load-not-working-in-safari/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.