-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery plugin, global context, etc #27
Comments
Thanks for the feedback, I don't have a solution for you, but I do have a couple of data points.
Based on you never getting the onReady callback, I'd guess that the flash audio component (which is separate from flXHR) hasn't loaded. - You didn't remove that too did you ? (it might be interesting to see if the java audio component works - by setting audio:'java', on the phono ). If you can give some more details, we'll look into it - javascript console logs would be great. |
Here's what I get when I wrap most of the code with (function($){})(jQuery);
|
Hm. I used the same wrapped code, but now I put it in a separate JS file and loaded it via jQuery.getScript. |
@undsoft can you explain more detail about your solution, I am stuck with this issue for a whole day |
Hi guys,
I'm trying to embed phono in my embeddable widget.
User copies widget code (2 lines) to his page and then widget does the rest - preloads the jquery if necessary and initializes itself.
I've faced a problem of incorporating phono to my code.
Phono depends on $ variable to be pointing to jQuery object. (ex. line 960
$(document).ready(function()
)So, I have to load Phono after jQuery was loaded. This means loading Phono code in a callback.
But when placed inside of a callback, it doesn't work, presumably because phono depends on flXHR and flXHR seems to use global context a lot.
For example, this line is not nice:
So, I thought that maybe I can live with adding some objects to global space of user's page. I cut out flXHR code and placed it into a global context.
No errors now, flXHR used correct urls, but I never get onReady callback from phono.
Network tab show continious requests being sent to 'http-bind' and console says:
no requests during idle cycle, sending blank request
Does anyone have any experience in situation like this?
The text was updated successfully, but these errors were encountered: