This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

endOfStream

Summary

Used to indicate that the end of the stream has been reached.

Method of apis/media_source_extensions/MediaSourceapis/media_source_extensions/MediaSource

Syntax

 MediaSource.endOfStream(error);

Parameters

error

Data-type
enum

(Optional)

Type: EndOfStreamError

If an error has occurred, this optional parameter can be used to send error information.

EndOfStreamError error values

network
A network error occurred.
decode
A decode error occurred.

Return Value

No return value

Usage

 This method throws an INVALID_STATE_ERR exception under the following conditions:
  • If the readyState attribute is not open.
  • If the updating attribute is true on any SourceBuffer in sourceBuffers.