SYMPTOMS: Each Mediafront Player in a view plays short mp3 files correctly on Desktop (html5 and Flash) and iPad (html5) and iPhone IOS Simulator but not iPhone (html5).

This is an edited version of the original issue description:

Mediafront created preload="metadata" properties on each audio tag even though I had requested "auto load" in Mediafront's UI. This seems to be correct because, since IOS 4, Apple ignores preload="auto" on mobile Safari.

However, only one (or sometimes two) of the four Mediafront players on our home page play at all on the iPhone Safari. iPad Safari plays them all: each one when Play is clicked.

BTW, I did notice that Mediafront populates one of the Mediafront players duration fields on the iPhone (one that actually plays) whereas *all* the iPad's players have zero duration. Could this mean that Safari is not consistently honouring the audio tag's request to preload the metadata of every audio tag?
Or could it mean there is some race condition ..... and/ or that Mediafront is not picking up the onloadedmetadata event? This is a bit beyond my area of expertise.

The Safari web inspector shows the audio files are not downloaded from the server (on page load) ... as I would expect them not to be ... and shows just little grey blobs in the timeline. It shows this on both iPad and iPhone ... but the iPad will play the audio correctly when asked to by the visitor.

Let me know if I can provide better diagnostic data .... or you could take an iPhone to http://misfitstheatre.com and see what I mean.
As I said, iPad and desktop browsers do exactly what they should. It's only the iPhone that won't do it right.

Further update:
Using Adobe Edge on the iPhone and Edge Inspector on the Mac to inspect the generated HTML, every audio Mediafront player behaved as it should on the iPhone.

Comments

travist’s picture

When you say 'EXPECTED'.... are you saying this is how MediaFront does behave and IS expected, or are you saying this is what is expected but NOT how MediaFront behaves. If it is the first one, then I am leaning toward that you either A) have a media file that is incompatible with certain versions of iOS, or it is possible that I am not setting up the video element with all the necessary pieces that iOS expects. I think this needs more investigation.

iainh’s picture

@travist please see attempt at clearer bug description.
Looking more and more like an iPhone Safari bug.

iainh’s picture

In response to point A)

have a media file that is incompatible with certain versions of iOS

Both iPhones and the iPad are at IOS6. The iPad plays every audio track properly. Neither of the iPhones do. The iPhones will play one or two of the tracks but the others just show "marching ants" when play is clicked.

iainh’s picture

Issue summary: View changes

iPhone Simulator added as OK case

iainh’s picture

Issue summary: View changes

Clearer description

iainh’s picture

Title: multiple preload="metadata" html5 audio players on same page confuses IOS 6 Safari » multiple html5 audio players on same page confuses IOS 6 Safari

The following two JavaScript logs show how, on the iPhone, without any user interaction, the behaviours is completely different from the behaviour on the iPad. On the iPhone it appears that the play event is being triggered erroneously ... by what or whom?

The iPad case

After this sequence of events, all mediafront players play properly when tapped.

…
Event Dispatched DOMContentLoaded jquery.js:37 2.17s 761ms
Timer Fired 128 jquery.js:156 3.14s 1.8ms
Event Dispatched loadstart minplayer.players.html5.js:101 3.40s 151ms
Timer Fired 128 jquery.js:156 3.74s 1.4ms 
Event Dispatched loadstart minplayer.players.html5.js:101 3.74 77.8ms
Event Dispatched progress minplayer.players.html5.js:101 3.82s 0.5ms
Event Dispatched loadstart minplayer.players.html5.js:101 3.85s 69.3ms
Event Dispatched progress minplayer.players.html5.js:101 3.92s 0.1ms
Event Dispatched load minplayer.image.js:53 3.95s 60.3ms 
Event Dispatched load minplayer.image.js:53 4.01s 8.2ms
Event Dispatched load minplayer.image.js:53 4.02s 5.2ms
Event Dispatched load minplayer.image.js:53 4.02s 9.7ms
Event Dispatched load minplayer.image.js:53 4.03s 5.5ms
Event Dispatched load minplayer.image.js:53 4.04s 12.1ms 
Event Dispatched load jquery.js:29 4.05s 0.1ms 
Event Dispatched load jquery.js:57 4.05s 5.5ms
Event Dispatched loadstart minplayer.players.html5.js:101 4.10s 72.7ms 
Event Dispatched  progress minplayer.players.html5.js:101 4.18s 0.2ms
Timer Fired 135 minplayer.players.html5.js:189 4.56s 8.2ms 
Event Dispatched progress minplayer.players.html5.js:101 4.57s 0.5ms
Timer Fired 138 minplayer.players.html5.js:189 4.58s 8.7ms
Timer Fired 141 minplayer.players.html5.js:189 4.58s 7.8ms
Timer Fired 142 jquery.js:156 4.59s 2.6ms 
Event Dispatched load minplayer.image.js:53 4.60s 9.1ms
Event Dispatched load minplayer.image.js:53 4.61s 10.4ms
Timer Fired 145 minplayer.players.html5.js:189 4.64s 8.2ms
Timer Fired 133 minplayer.plugin.js:195 4.65s 1.8ms
... 

The iPhone case

After this only one (or two) players will play when tapped.

…
…
Event Dispatched DOMContentLoaded jquery.js:37 9.10s 477ms
Event Dispatched loadstart minplayer.players.html5.js:101 9.81s 3.6ms 
Event Dispatched progress minplayer.players.html5.js:101 9.90s 0.2ms
Event Dispatched loadstart minplayer.players.html5.js:101 9.94s 71.8ms
Event Dispatched loadstart minplayer.players.html5.js:101 10.11s 60.4ms
Event Dispatched progress minplayer.players.html5.js:101 10.17s 0.1ms
Event Dispatched loadstart minplayer.players.html5.js:101 10.20s 122ms
Event Dispatched progress minplayer.players.html5.js:101 10.32s 0.0ms
Event Dispatched load minplayer.image.js:53 10.43s 173ms
Event Dispatched load minplayer.image.js:53 10.60s 5.2ms
Event Dispatched load minplayer.image.js:53 10.61s 5.1ms
Event Dispatched load minplayer.image.js:53 10.61s 5.6ms
Event Dispatched load minplayer.image.js:53 10.62s 7.0ms
Event Dispatched load minplayer.image.js:53 10.63s 3.6ms
Event Dispatched load minplayer.image.js:53 10.63s 2.8ms
Event Dispatched load minplayer.image.js:53 10.63s 9.3ms
Event Dispatched load jquery.js:29 10.64s 0.0ms 
Event Dispatched load jquery.js:57 10.64s 5.3ms
Event Dispatched play minplayer.players.html5.js:101 10.69 12.9ms
Event Dispatched waiting minplayer.players.html5.js:101 10.70s 5.5ms
Timer Fired 43785 minplayer.players.html5.js:189 10.71s 7.1ms
Event Dispatched play minplayer.players.html5.js:101 10.71s 9.5ms
Event Dispatched waiting minplayer.players.html5.js:101 10.72s 5.6ms
Event Dispatched progress minplayer.players.html5.js:101 10.73s 0.2ms
Timer Fired 43788 minplayer.players.html5.js:189 10.73s 6.9ms
Event Dispatched play minplayer.players.html5.js:101 10.95s 10.0ms
Event Dispatched waiting minplayer.players.html5.js:101 10.96s 6.8ms
Timer Fired 43791 minplayer.players.html5.js:189 10.96s 7.4ms
Event Dispatched play minplayer.players.html5.js:101 10.97s 11.0ms
Event Dispatched waiting minplayer.players.html5.js:101 10.98s 6.0ms 
Timer Fired 43794 minplayer.players.html5.js:189 10.99s 7.3ms
Timer Fired 43795 jquery.js:156 11.03s 3.9ms
Event Dispatched pause minplayer.players.html5.js:101 11.04s 10.9ms
…
iainh’s picture

Here's a patch that mitigates the problem on the iPhone IOS 6.0 without adversely affecting the iPad IOS 6.0.
It does not trigger the play event when isIDevice is detected but leaves it to pause and onLoaded as before.
Note that this patch is effective only when the source js files are loaded i.e. when Debug is set on.
For it to work with Debug off (see Mediafront Presets UI) you'd have to run the makefile that compresses the source files.

travist’s picture

Status: Active » Fixed

iainH,

I commend you for your efforts. I committed your patch with attribution. http://drupalcode.org/project/mediafront.git/commit/8324d82

Thanks again.

Travis.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Adobe Edge experience