Share Button amp-story-player dispatch event click
Description
I am trying to listen to a share button with a custom event, however, there's no click event associated with it.
Reproduction Steps
- Click on the share button
- Try to use an Custom Event like , navigation, storyNavigation Example:
document.querySelectorAll('amp-story-player').addEventListener('navigation', (event) => { console.log('click to share button'); })
Relevant Logs
No response
Browser(s) Affected
Chrome, Firefox, Safari, Edge, UC Browser
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
v0
@Enriqe can I assign this issue to you? Will leave it up to you to set the priority.
/cc @gmajoulet
Can you try to replace the navigation event you're listening to with the correct one you configured?
Cf our documentation: https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-story-player.md#customizing-position--visibility-of-story-ui-controls
I didn't configure it on Controls, I am using the share control that comes with an external WebStory inside an iframe so I am trying to use any of the API events to catch the onclick event but no one takes this event.
if I create a control this will lose the original behavior of the Share control button of external webstory so that's why I need another event maybe that comes from the API to track this share control click.
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.
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.