avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
94 stars 51 forks source link

Error When Using iOS User Agent in Browser Device Emulation #4879

Open Dananji opened 2 years ago

Dananji commented 2 years ago

Description

When using mobile device emulators in Firefox and Chrome with Apple device user agents, the streaming doesn't work in the Avalon player. But in the actual devices (iPhone 12 Pro, Safari and Chrome) streaming work as expected. Tested item: NY World's Fair Home Movies 1964-1965 on MCO.

Error in the browser emulator: iphone-avalon-player.png When this happens the following error is logged to the browser console;

Uncaught (in promise) DOMException: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. 

Done Looks Like

elynema commented 2 years ago

Works fine on iPhone 7, Google Chrome and Safari. Works fine on 4th gen iPad, Google Chrome and Safari.

joncameron commented 2 years ago

This appears to be exclusive to specific user agent strings (for Apple devices) in the emulation modes for these browsers.

I tested with the latest Firefox and Chrome on my Mac and could reproduce this. Not sure why Mozilla/5.0 (Linux; Android 11; SAMSUNG SM-G973U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/14.2 Chrome/87.0.4280.141 Mobile Safari/537.36 works but Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1 does not.

joncameron commented 2 years ago

Might be a patch to our existing MediaElement version or an upgrade to MediaElement within Avalon.

joncameron commented 2 years ago

Revisit after an update to current MediaElement.