Error messages of stream playback

When Stream.play fails to play the stream, this interface provides detailed error messages.

In most cases, you can prompt the user to resume the playback (Stream.resume) by a user gesture except when the status is "aborted".

Hierarchy

  • StreamPlayError

Index

Properties

Properties

reason

reason: string

The reason why the playback fails. Usually, this value is an event that triggers the playback failure. Possible values include the following:

  • "stalled": The failure might be caused by the browser policy. See stalled event.
  • "pause": The stream playback might be paused by the user. See pause event.
  • "suspend": The failure might be caused by the browser policy. See suspend event.
  • "canplay": Some browsers automatically stop the playback when the playback window is not displayed on the screen. See canplay event.
  • "error": The playback failure is usually caused by autoplay restriction.

Due to the differences in browsers, reason may have different values for the same event.

status

status: string

The status of the player:

  • "aborted": The player is removed before the stream is played successfully.
  • "paused": The player is stopped.