Adds explainer for the play method returning this.

This commit is contained in:
Jaroslav Polakovič 2021-11-08 10:14:51 +01:00
Родитель f09c567d99
Коммит 4b2a4e5e56
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -306,7 +306,10 @@ export default class extends HTMLElement {
* it's possible we're initializing MSE and we can't really
* use the `play` method if the source is going to change.
*
* @returns {Promise} Promise indicating whether the playback started.
* @returns {Promise<this>} Promise indicating whether the playback started.
* Returns the current `VideoPlayer` instance, which
* allows outside code to respond to success or failure
* adequately, e.g. by muting the video and retrying.
*/
play() {
const HAVE_NOTHING = 0;