Open MCFreddie777 opened 2 years ago
Interesting. This actually works as expected testing from Chrome 94.0.4606.97.
I'm not sure about this usage of insertAdjacentHtml
, since this means the player will first be built (new AmpStoryPlayer(...)
), then later have the controls configuration added, which the player does not currently observe changes to its children in the document. Seems like this could be a race condition in theory.
In general, I would recommend creating the player in HTML as specified in the documentation and showing it when the user has clicked the button; this will also potentially speed up the user interaction on click.
Can you try that to see if it works?
Interesting. This actually works as expected testing from Chrome 94.0.4606.97.
Working in Chrome, Safari on macOS as well. Also, in Opera, Edge, Firefox and Chrome for Android 11. Seems like it is iOS only bug.
I'm not sure about this usage of
insertAdjacentHtml
, since this means the player will first be built (new AmpStoryPlayer(...)
), then later have the controls configuration added, which the player does not currently observe changes to its children in the document. Seems like this could be a race condition in theory.
No, I already tried this, first inserting the json config, then creating instance of player, but with no success.
In general, I would recommend creating the player in HTML as specified in the documentation and showing it when the user has clicked the button; this will also potentially speed up the user interaction on click.
Can you try that to see if it works?
This works, but I'm sorry, this is not applicable to all usecase. I need to create the player dynamically, from JS.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Description
When using story from
URL.createObjectURL()
, the close button is not visible on mobile devicesReproduction Steps
1. Correct behaviour: When loading story from different html file, the close button is visible (both mobile and desktop).
Code: https://github.com/MCFreddie777/MCFreddie777.github.io/tree/master/webstory/from-html-file Demo: https://mcfreddie777.github.io/webstory/from-html-file/ Screenshot:
2. However, when using story from
URL.createObjectURL()
, the close button is not visible on mobile devices.Code: https://github.com/MCFreddie777/MCFreddie777.github.io/blob/master/webstory/from-object-url/index.html Demo: https://mcfreddie777.github.io/webstory/from-object-url/ Screenshot:
Disclaimer: Testing on Safari, Chrome in iOS 15.0.
Relevant Logs
No response
Browser(s) Affected
OS(s) Affected
Device(s) Affected
No response
AMP Version Affected
No response