Ready Event not firing in IE

374 views
Skip to first unread message

Sean O'Connor

unread,
Mar 14, 2012, 7:15:19 PM3/14/12
to jpl...@googlegroups.com
Hello,

I have a bit of an interesting problem.  I have an instance of jPlayer where the ready event fires and everything works properly in Chrome, Firefox, and newer versions of IE, but in IE8 the ready event doesn't fire.  Unfortunately when this happens there is also no error events being fired either.

So far I have checked the following:
  • Added the recommended wmode value (docs suggest it effects on FF but since it was a similar enough problem reported, tried it to be safe).
  • Made sure that "display: none" is not applied to the jplayer dom element or the swf.
  • Made sure that the swf_url is an absolute path and is loading properly.
  • Made sure that the crossdomain.xml policy was set and not getting triggered.
I am doing some odd things with iframes since the code is intended to be an embed-able track player but so far I haven't been able to find anything suggesting that that's the cause of this problem.

If anybody could checkout the code at http://lwd.saaspire.com and provide any suggestions it would be greatly appreciated.

Thanks!

-Sean O'Connor

P.S.  When looking at the page at http://lwd.saaspire.com be aware that there is some debugging output setup that uses console.log so if you hit the page with a browser that doesn't provide a console object (e.g. firefox with firebug turned off) it might break.

Sean O'Connor

unread,
Mar 15, 2012, 5:32:05 PM3/15/12
to jpl...@googlegroups.com
Update in case somebody else comes across this problem in the future.

In the page linked below we are creating an iframe with javascript, placing the html for the player in the body of that iframe with javascript, and then we are calling the jPlayer setup bits.  In everything but IE 8 (and maybe 9) this works fine.  Unfortunately in IE8, the browser treats the "about:blank" page that gets loaded into the iframe as a different security context than the containing page.  Accordingly flash doesn't allow for script access for the fallback jPlayer embed (error #2060).

The solution for this will most likely be to take the hit of requiring an extra http request and have the widget HTML loaded via the iframe src attribute instead of being built by javascript.

If anybody has suggestions on easier ways to work around this IE issue they would be very welcome :)

Raviraj Deora

unread,
Apr 20, 2012, 7:52:42 AM4/20/12
to jPlayer: HTML5 Audio & Video for jQuery
Hello,

ready : event is not firing in safari and IOS ( iphone / ipad ).

I have used below code to play audio file. It is working fine in FF,
chrome and IE.

jQuery( document ).ready( function($){



var fb_IMG_select = 'a[href$=".jpg"]:not(.nofancybox),a[href
$=".JPG"]:not(.nofancybox),a[href$=".gif"]:not(.nofancybox),a[href
$=".GIF"]:not(.nofancybox),a[href$=".png"]:not(.nofancybox),a[href
$=".PNG"]:not(.nofancybox)';

$(fb_IMG_select).addClass('fancybox').attr('rel', 'gallery');

$('a.fancybox, area.fancybox').fancybox( {

onComplete : function() {

var src = $('#fancybox-img').attr('src');

var img_bloc = $('a[href="'+src+'"]') ;

this_class = $( img_bloc).children('img').attr('class') ;

var matches = this_class.match(/wp-image-([0-9]*)/g);

matches = matches[0] ;

matches = matches.replace('wp-image-', '');



var obj = jQuery.parseJSON( $('#json_obj').html() );

//console.debug( obj[matches] );



//var mp3url = $('a[href="'+$('#fancybox-img').attr('src')
+'"]').attr('redata-audio') ;

$('#inner_player').html('<div id="jquery_jplayer_1" class="jp-
jplayer"></div>');

jQuery("#jquery_jplayer_1").jPlayer({
swfPath: "http://www.jplayer.org/2.1.0/js/",
supplied: "mp3",
solution: "html, flash",
ready: function(event) {
jQuery(this).jPlayer("setMedia", {
mp3: "http://www.jplayer.org/audio/mp3/TSP-01-
Cro_magnon_man.mp3"
}).jPlayer("play");
}
}); },

onClosed : function() {

$('#inner_player').html('');

}

});

} )


Link to check: http://wptalkingimages.com/34-2/

When you click on any image, MP3 audio file will play, it is playing
fine in FF, Chrome, IE. But not in Safari, IOS. Please let me know
what should I need to do to solve the issue?

On Mar 16, 2:32 am, Sean O'Connor <sean.b.ocon...@gmail.com> wrote:
> Update in case somebody else comes across this problem in the future.
>
> In the page linked below we are creating an iframe with javascript, placing
> the html for the player in the body of that iframe with javascript, and
> then we are calling the jPlayer setup bits.  In everything but IE 8 (and
> maybe 9) this works fine.  Unfortunately in IE8, the browser treats the
> "about:blank" page that gets loaded into the iframe as a different security
> context than the containing page.  Accordingly flash doesn't allow for
> script access for the fallback jPlayer embed (error #2060).
>
> The solution for this will most likely be to take the hit of requiring an
> extra http request and have the widget HTML loaded via the iframe src
> attribute instead of being built by javascript.
>
> If anybody has suggestions on easier ways to work around this IE issue they
> would be very welcome :)
>
>
>
>
>
>
>
> On Wednesday, March 14, 2012 7:15:19 PM UTC-4, Sean O'Connor wrote:
>
> > Hello,
>
> > I have a bit of an interesting problem.  I have an instance of jPlayer
> > where the ready event fires and everything works properly in Chrome,
> > Firefox, and newer versions of IE, but in IE8 the ready event doesn't fire.
> >  Unfortunately when this happens there is also no error events being fired
> > either.
>
> > So far I have checked the following:
>
> >    - Added the recommended wmode value (docs suggest it effects on FF but
> >    since it was a similar enough problem reported, tried it to be safe).
> >    - Made sure that "display: none" is not applied to the jplayer dom
> >    element or the swf.
> >    - Made sure that the swf_url is an absolute path and is loading
> >    properly.
> >    - Made sure that the crossdomain.xml policy was set and not getting
> >    triggered.
>
> > I am doing some odd things with iframes since the code is intended to be
> > an embed-able track player but so far I haven't been able to find anything
> > suggesting that that's the cause of this problem.
>
> > If anybody could checkout the code athttp://lwd.saaspire.comand provide
> > any suggestions it would be greatly appreciated.
>
> > Thanks!
>
> > -Sean O'Connor
>
> > P.S.  When looking at the page athttp://lwd.saaspire.combe aware that
Reply all
Reply to author
Forward
0 new messages