Page MenuHomePhabricator

mwEmbed gives JS error on iphone
Closed, ResolvedPublic

Description

I was testing webkit for some iphone things (using iphone useragent) and happened to notice that I got an error on pages with video and mwEmbed enabled. The error is:

ResourceLoader.php:446
TypeError: Result of expression 'source' [undefined] is not an object.

That line reads: var videoAttribues={'id':_this.pid,'poster':_this.poster,'src':source.src,'controls':'true'}

Now I realize that we won't have video playback on the iphone for the forseable future (though VLC for iphone was just approved today :D ), but it probably shouldn't generate an uncatched JS error either.


Version: unspecified
Severity: normal

Details

Reference
bz25490

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:16 PM
bzimport set Reference to bz25490.

mdale wrote:

This is caused by chrome supporting ogg video in the video tag and then pretending to be an iPhone User Agent, which is hard coded to select the h.264 source which then does not exists. I have added a warning and added fallback ogg support in r74649 ( the iPhone / iPad don't get a html /css user interface since so many things are broken in their html5 implementation. )

It would be really cool to launch the vlc app to playback the ogg / WebM on the iphone / iPad let me know how that works or how it could be done.

Well for now, a download button leading straight to the file could work of course. The upcoming VLC app would have registered the .ogg/.ogv/.oga filetypes and then the downloaded file would be opened by VLC.

It hasn't been implemented to play streams yet (because the rules for that are a lot stricter in the appstore approval process, so applidium is picking the low hanging fruit first), but I can imagine that later a vlcios:// protocol handler could be added to the app, and that we can just pass the http url alla:
vlcios://?url=encodedurl directly to the VLC application, avoiding downloading and just playing from the http stream directly.

I'll try to talk to pdherbemont of applidium about it.