Menu

Google Chrome Chatroom Error

Help
2010-11-07
2012-11-15
1 2 > >> (Page 1 of 2)
  • DigiOz Multimedia

    Hello Team,

    Visitors using Google Chrome 7.0.517.44 with Ajax Chat have been receiving the following error message:

    TypeError: Object #<an HTMLObjectElement> has no method 'create'
    

    This bug has been reported to Google as well here:

    http://www.google.com/support/forum/p/Chrome/thread?tid=4887282bde990424&hl=en

    I was wondering if there is a workaround for this issue or not?

    Thanks,
    Pete

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-08

    I've had another user report this as well.

    No workarounds yet, and it's almost certainly flash related. I'd like to see if the chrome team deems it a bug on their end.

    Best relevant post on the topic I can find is here http://stackoverflow.com/questions/1436722/problem-accessing-externalinterface-exposed-method-in-google-chrome

    I'll follow up on this. It worked with no problems in older versions of chrome. If they don't fix it, we'll have to try the timeout thing.

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-08

    Incidentally the offending line is this one:

    sound = FABridge.ajaxChat.create('flash.media.Sound');

    You can comment out the loadSounds function to get rid of the warning message but that doesn't fix the problem of chrome users not having sound.

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-08

    And, again, on further inspection, it's not just us, it's a chromium bug that may or may not get fixed in the near future.

    This is informative and has a fix that I'll play with later and let you know if I can make it work. Had no lick trying to timeout the call (too bad it's not so easy)

    http://code.google.com/p/chromium/issues/detail?id=988

     
  • Waxity (Jonah)

    Waxity (Jonah) - 2010-11-08

    I have commented out the lines of code causing the error but I really didn't want to. Now there is NO SOUND at all, and I'd like to have sound. Any Suggestions?

     
  • DigiOz Multimedia

    I assume that flash player was used for cross browser compatibility. Perhaps a different approach would be using simple JavaScript? Something along the lines of the following:

            function playSound(soundURL) {
                document.write("<embed src='" + soundURL + "' hidden='true' autostart='true' loop='false' />");
            }
    

    You can then call it from anywhere:

    playSound('path/to/file/filename.wav');
    

    We use this in our Open Source Portal and it works well with Chrome, FireFox and IE. Perhaps that could be a workaround (or a long term solution depending how you feel about it)?

    Thanks,
    Pete

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-08

    Flash was used because it's consistent across browsers, doubles as a tool for the socket server ( the socket server uses basically the same bit of flash being used to play sounds) and doesn't break web standards to embed.

    At the time that chat was made, its creator looked at various javascript only alternatives and decided that it was the best option. I trust his assessment of that. Aside from this new chrome bug, it's worked well for years on all browsers.

    For the long term, of course, the new html5 specs would allow us to play sounds without even thinking about flash or embed tags. It comes with a native <audio> tag and any self respecting project would switch over to that ;)
    It's only a matter of time until enough people are willing to convert. Personally I'm more than willing to completely abandon ie6 with this project, and leave a legacy version available for download if people want ie6 support.
    Unfortunately at the moment this would mean also abandoning ie7 and 8 with regards to sound, and that's going a bit far.

     
  • DigiOz Multimedia

    Fair enough frug. Thanks for your time. We are all looking forward to HTML 5 as developers, so hopefully that will make things a lot easier.

    In the meantime maybe we should try the timeout idea?

    Thanks,
    Pete

     
  • Waxity (Jonah)

    Waxity (Jonah) - 2010-11-08

    so what's the decision or is it still "under assessment"

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-10

    I've tried the timeout thing and that didn't help. I've also tried other fixes provided by people to fix chrome's lack of support for document.load and that's led me to believe that that isn't, actually, the problem here.

    FABridge's .create method isn't working and I don't know why.

    I've played around with it and think the problem lies in FAbridge.swf
    The actionscript (and socket) part of this project is never something we've had anyone on team dedicated to working with so hopefully i can figure it out or we can find someone who does.

     
  • Waxity (Jonah)

    Waxity (Jonah) - 2010-11-11

    any updates?

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-12

    I'll have some time on the weekend to hack it up.

    Since chrome supports html5 already, I can try and offer a hack that uses that for sound if chrome is detected.

     
  • Waxity (Jonah)

    Waxity (Jonah) - 2010-11-13

    Ok, so if in chrome use HTML5, if in IE or FireFox use Flash, right?

     
  • Waxity (Jonah)

    Waxity (Jonah) - 2010-11-13

    That is a very valid fix, yes. I did this on my website and thumbs up. I have uploaded the fix to the mods section on my website for other on here to download. Here's how to fix the sound issue:

    Before doing anything below be sure to back up your stuff, I wont be held responsible for any issues you have.
    1. Download the new FABridge.js file from http://chickentalk.org/mods/FABridge.js.zip
    2. Extract the zip folder, you should have the file FABridge.js.
    3. Upload the FABridge.js file to the js folder in your Ajax Chat root.
    4. The upload will overwrite the old FABridge.js in the folder.

    reload chat and Sound should work great :D

    Hope this is helpful :D
    -Jonah

     
  • DigiOz Multimedia

    I want to thank Struan who came up with this fix for sharing his solution with us.
    Frug, please let us know if there are any issues with us using this fix.

    Thanks
    Pete

     
  • Anonymous

    Anonymous - 2010-11-14

    does sound work in chrome at that point?

     
  • Lori Carey

    Lori Carey - 2010-11-14

    That worked for me, thank you!

    Just a note that users will probably need to clear their cache before reloading the chat room for the fix to take effect.

     
  • DigiOz Multimedia

    Yes, the sound works in Chrome after this fix.

     
  • Waxity (Jonah)

    Waxity (Jonah) - 2010-11-14

    Struan suggested that this fix be included with Ajax Chat and I second that idea.

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-14

    Hey guys. Sorry I'm late to the party.

    It seems a few people spread the word about this solution from the google webmaster discussion.

    I had tried to recompile and update the .swf file but it is only the js file that needs updating. Figures.

    Anyway, yes this fix will be included in a patch asap. For now, you can grab the SDK from the link above or from this link which is straight from adobe:

    http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4/flex_sdk_4.1.0.16032_mpl.zip

    Unzip it, go to frameworks/javascript/fabridge/src and replace your FABridge.js with the one in there.

     
  • Anonymous

    Anonymous - 2010-11-14

    I still get no sound in chrome.

     
  • Philip Nicolcev

    Philip Nicolcev - 2010-11-15

    Try closing your browser, opening a new window, then clearing your browser cache (cookies don't matter, just the cache itself) and then loading the chat page.
    Javascript has a tendency to cache on some browsers even if you refresh the page.

     
  • Dust

    Dust - 2011-02-24

    jsebean, thanx a lot!

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.