New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amp story auto-advance-after a background-audio skips the page on iOS #33831
Comments
Technically I don't think this is supported (the ID is supposed to be that of a media element), but I agree we should either (a) support this, or (b) fail more explicitly (e.g. console error that says this is not supported). |
It's actually supported, I'd be curious to know when it broke and how it's broken. Code: amphtml/extensions/amp-story/1.0/page-advancement.js Lines 1143 to 1152 in cdc2855
Test: amphtml/extensions/amp-story/1.0/test/test-page-advancement.js Lines 187 to 199 in cdc2855
Given we have a unit test to make sure we create the correct advancement mode, I'd think the code fails here when we try to retrieve the audio element: amphtml/extensions/amp-story/1.0/page-advancement.js Lines 993 to 997 in cdc2855
|
The functionality works on Desktop and Android but not iOS, which is weird. The Q/A story we use for audio has an example of this, but the Q/A story has an mp4 video as background-audio, which might contribute to the bug not triggering. @hongcatlover sent me a video of this bug and was able to repro as well with an mp3 audio file |
Was the story muted when you tried this? I don't know whether the sequence of events for when you try to play a muted audio file is the same cross-browser (but, for playing muted video, the behavior is well-defined). |
When setting the auto-advance-after to the pageID it should use the background-audio length to advance, but on iOS (tested on Safari) it auto-advances the page really fast. This makes it impossible to navigate backwards.
The background audio does load and play if the auto-advance is disabled on the page, so the problem should not be related to the audio file.
cc @ampproject/wg-stories
The text was updated successfully, but these errors were encountered: