ampproject / ampproject/amphtml
How to tell video dock component that video is playing so it goes to dock position?
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Does anyone know how to tell video dock component from video player component IFRAME that video is playing and that it can undock when it goes out of the viewport ?
For example how to fire postMessage that the component will be able to recieve it? (Just example amphtml\extensions\amp-jwplayer\0.1\amp-jwplayer.js)

Would it be in this case something like this?
```js
postMessage({
type: 'play',
detail: 'test'
}, window);
```
So I am building a new video player, that will be able to dock. For example like these:
[amp-brid-player](https://amp.dev/documentation/components/amp-brid-player)
[amp-brightcove](https://amp.dev/documentation/components/amp-brightcove)
[amp-dailymotion](https://amp.dev/documentation/components/amp-dailymotion)
[amp-delight-player](https://github.com/ampproject/amphtml/blob/main/extensions/amp-delight-player/amp-delight-player.md)
[amp-ima-video](https://amp.dev/documentation/components/amp-ima-video)
[amp-jwplayer](https://amp.dev/documentation/components/amp-jwplayer)
[amp-video](https://amp.dev/documentation/components/amp-video)
[amp-video-iframe](https://amp.dev/documentation/components/amp-video-iframe)
[amp-youtube](https://amp.dev/documentation/components/amp-youtube)
1. How can I tell from my video player iframe to the dock component that my video is playing and that it can dock
2. is it neccesery to have this request to our server that returns HTML and player inside it,
or can I just build inframe on client side and load my player that way?
Contributor guide
Assessment
This issue has not been assessed yet.