hello World example (Professional XMPP Programming with JavaScript and jQuery chapter 3) -> Dependency on flXHR (flash player) makes example unusable on mobile

301 views
Skip to first unread message

Chris Fortmüller

unread,
Sep 5, 2014, 4:12:45 PM9/5/14
to str...@googlegroups.com
Hi,

I am trying to write a little mobile IM client using strophe.js and Jack Moffat's book. I am currently in chapter 3, which among other files, loads flXHR.js (<script src='../scripts/flXHR.js'></script>), which seems to somehow depend on flash player. My question is, why is flash player required for this?

The example runs nicely on my desktop, but if I try to run it on my android phone, the console gives the following:


Uncaught Error: 14, flXHR: Flash Player Update Failed, The Flash Player was either not detected or could not be updated.

   

Obviously, since flash is not available on mobile platforms, this makes sense. However, I don't understand why flash is required for this simple example application, or for xmpp code in general. Could someone explain to me the dependency, and maybe also offer a solution/workaround to get this example running on mobile platforms as well?

Thanks and best regards,

Chris


Matthew Wild

unread,
Sep 5, 2014, 4:57:11 PM9/5/14
to str...@googlegroups.com
Hi Chris,

On 5 September 2014 21:12, Chris Fortmüller <chri...@gmail.com> wrote:
> Hi,
>
> I am trying to write a little mobile IM client using strophe.js and Jack
> Moffat's book. I am currently in chapter 3, which among other files, loads
> flXHR.js (<script src='../scripts/flXHR.js'></script>), which seems to
> somehow depend on flash player. My question is, why is flash player required
> for this?

It isn't really required in any modern browser, I hope. It's used to
implement cross-domain requests when browsers didn't always support
them. See: http://caniuse.com/#feat=cors

I never really used flXHR (a more portable alternative is to simply
proxy requests through the same place your code is served from), but
as far as I know you should be able to just remove that <script> tag
to make it work.

Regards,
Matthew

Chris Fortmüller

unread,
Sep 5, 2014, 5:18:37 PM9/5/14
to str...@googlegroups.com
Hi Matthew, thanks for your help. Removing all references to flxhr worked. Thanks!
Reply all
Reply to author
Forward
0 new messages