
JWplayer crashes on iOS, all other browsers work fine.
Hey guys,
On my website http://www.facecolor.cc I have an problem which only occurs on iOS. When the new page is loaded an animations are finished I launch the function checkForVideo();
bc.. function checkForVideo(){
$('.VideoModule, .VideoHolder').each(function(i, obj){
var videoObject = $(this);
var videoWidth = videoObject.width();
var videoHeight = videoWidth/1920*1080;
if( videoObject.find('div').length == 0 ){
var id = videoObject.prop('id');
var videoUrl = videoObject.data('src');
if(id==''){
id = Math.round(Math.random()*100000000) ;
}
id = 'videoPlayer'+id;
videoObject.append('<div id='+id+'></div>');
jwplayer(id).setup({
flashplayer: "/_javascript/jwplayer/jwplayer.flash.swf",
file: videoUrl,
width: videoWidth,
height: videoHeight,
stretching: 'uniform',
bufferlength:0,
events: {
onPlay:onVideoPlay
}
})//.play();
}
})
}
Even with the most basic embed bc.. jwplayer(id).setup({flashplayer: "/_javascript/jwplayer/jwplayer.flash.swf", file: videoUrl)} it crashes.
Any idea how this is possible?
Kind regards,
Edwin Veldhuizen