]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - support/doc/api/embeds.md
Add "ended" embed API event
[github/Chocobozzz/PeerTube.git] / support / doc / api / embeds.md
index 5586e013ad1e67442d9b573dc7ee7ef28a44c032..a4236c521b90df2f2f5d977e235bc174b3b99014 100644 (file)
@@ -46,7 +46,7 @@ await player.ready // wait for the player to be ready
 // now you can use it!
 player.play()
 player.seek(32)
-player.stop()
+player.pause()
 ```
 
 # Methods
@@ -111,14 +111,6 @@ Get the playback volume. Returns a value between `0` and `1`.
 
 You can subscribe to events by using `addEventListener()`. See above for details.
 
-## Event `play`
-
-Fired when playback begins or is resumed after pausing.
-
-## Event `pause`
-
-Fired when playback is paused.
-
 ## Event `playbackStatusUpdate`
 
 Fired every half second to provide the current status of playback. The parameter of the callback will resemble:
@@ -131,11 +123,12 @@ Fired every half second to provide the current status of playback. The parameter
 }
 ```
 
-The `volume` field contains the volume from `0` (silent) to `1` (full volume). The `playbackState` can be `playing` or `paused`. More states may be added later.
+The `volume` field contains the volume from `0` (silent) to `1` (full volume).
+The `playbackState` can be `unstarted`, `playing`, `paused` or `ended`. More states may be added later.
 
 ## Event `playbackStatusChange`
 
-Fired when playback transitions between states, such as `pausing` and `playing`. More states may be added later.
+Fired when playback transitions between states, such as `paused` and `playing`. More states may be added later.
 
 ## Event `resolutionUpdate`