MediaStream

Overview

The MediaStream interface represents a stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack.

Location


 

active

 

property active: Boolean read;

 

Boolean active { get; }

 

var active: Boolean { get{} }

 

Boolean active { __get; }

 

ReadOnly Property active() As Boolean

addTrack

Stores a copy of the MediaStreamTrack given as argument. If the track has already been added to the MediaStream object, nothing happens.

 

method addTrack(partrack: dynamic): MediaStream

 

MediaStream addTrack(dynamic partrack)

 

func addTrack(_ partrack: dynamic) -> MediaStream

 

MediaStream addTrack(dynamic partrack)

 

Function addTrack(partrack As dynamic) As MediaStream

Parameters:

  • partrack:

clone

Returns a clone of the MediaStream object. The clone will, however, have a unique value for id.

 

method clone: MediaStream

 

MediaStream clone()

 

func clone() -> MediaStream

 

MediaStream clone()

 

Function clone() As MediaStream

getAudioTracks

Returns a list of the MediaStreamTrack objects stored in the MediaStream object that have their kind attribute set to audio. The order is not defined, and may not only vary from one browser to another, but also from one call to another.

 

method getAudioTracks: MediaStream

 

MediaStream getAudioTracks()

 

func getAudioTracks() -> MediaStream

 

MediaStream getAudioTracks()

 

Function getAudioTracks() As MediaStream

getTrackById

Returns the track whose ID corresponds to the one given in parameters, trackid. If no parameter is given, or if no track with that ID does exist, it returns null. If several tracks have the same ID, it returns the first one.

 

method getTrackById(parid: dynamic): String

 

String getTrackById(dynamic parid)

 

func getTrackById(_ parid: dynamic) -> String

 

String getTrackById(dynamic parid)

 

Function getTrackById(parid As dynamic) As String

Parameters:

  • parid:

getVideoTracks

Returns a list of the MediaStreamTrack objects stored in the MediaStream object that have their kind attribute set to "video". The order is not defined, and may not only vary from one browser to another, but also from one call to another.

 

method getVideoTracks: MediaStream

 

MediaStream getVideoTracks()

 

func getVideoTracks() -> MediaStream

 

MediaStream getVideoTracks()

 

Function getVideoTracks() As MediaStream

id

 

property id: Int32 read;

 

Int32 id { get; }

 

var id: Int32 { get{} }

 

Int32 id { __get; }

 

ReadOnly Property id() As Int32

onaddtrack

 

property onaddtrack: EventListener read write;

 

EventListener onaddtrack { get; set; }

 

var onaddtrack: EventListener { get{} set{} }

 

EventListener onaddtrack { __get; __set; }

 

Property onaddtrack() As EventListener

onremovetrack

 

property onremovetrack: EventListener read write;

 

EventListener onremovetrack { get; set; }

 

var onremovetrack: EventListener { get{} set{} }

 

EventListener onremovetrack { __get; __set; }

 

Property onremovetrack() As EventListener

removeTrack

Removes the MediaStreamTrack given as argument. If the track is not part of the MediaStream object, nothing happens.

 

method removeTrack: MediaStream

 

MediaStream removeTrack()

 

func removeTrack() -> MediaStream

 

MediaStream removeTrack()

 

Function removeTrack() As MediaStream

 

active

 

property active: Boolean read;

 

Boolean active { get; }

 

var active: Boolean { get{} }

 

Boolean active { __get; }

 

ReadOnly Property active() As Boolean

id

 

property id: Int32 read;

 

Int32 id { get; }

 

var id: Int32 { get{} }

 

Int32 id { __get; }

 

ReadOnly Property id() As Int32

onaddtrack

 

property onaddtrack: EventListener read write;

 

EventListener onaddtrack { get; set; }

 

var onaddtrack: EventListener { get{} set{} }

 

EventListener onaddtrack { __get; __set; }

 

Property onaddtrack() As EventListener

onremovetrack

 

property onremovetrack: EventListener read write;

 

EventListener onremovetrack { get; set; }

 

var onremovetrack: EventListener { get{} set{} }

 

EventListener onremovetrack { __get; __set; }

 

Property onremovetrack() As EventListener

 

addTrack

Stores a copy of the MediaStreamTrack given as argument. If the track has already been added to the MediaStream object, nothing happens.

 

method addTrack(partrack: dynamic): MediaStream

 

MediaStream addTrack(dynamic partrack)

 

func addTrack(_ partrack: dynamic) -> MediaStream

 

MediaStream addTrack(dynamic partrack)

 

Function addTrack(partrack As dynamic) As MediaStream

Parameters:

  • partrack:

clone

Returns a clone of the MediaStream object. The clone will, however, have a unique value for id.

 

method clone: MediaStream

 

MediaStream clone()

 

func clone() -> MediaStream

 

MediaStream clone()

 

Function clone() As MediaStream

getAudioTracks

Returns a list of the MediaStreamTrack objects stored in the MediaStream object that have their kind attribute set to audio. The order is not defined, and may not only vary from one browser to another, but also from one call to another.

 

method getAudioTracks: MediaStream

 

MediaStream getAudioTracks()

 

func getAudioTracks() -> MediaStream

 

MediaStream getAudioTracks()

 

Function getAudioTracks() As MediaStream

getTrackById

Returns the track whose ID corresponds to the one given in parameters, trackid. If no parameter is given, or if no track with that ID does exist, it returns null. If several tracks have the same ID, it returns the first one.

 

method getTrackById(parid: dynamic): String

 

String getTrackById(dynamic parid)

 

func getTrackById(_ parid: dynamic) -> String

 

String getTrackById(dynamic parid)

 

Function getTrackById(parid As dynamic) As String

Parameters:

  • parid:

getVideoTracks

Returns a list of the MediaStreamTrack objects stored in the MediaStream object that have their kind attribute set to "video". The order is not defined, and may not only vary from one browser to another, but also from one call to another.

 

method getVideoTracks: MediaStream

 

MediaStream getVideoTracks()

 

func getVideoTracks() -> MediaStream

 

MediaStream getVideoTracks()

 

Function getVideoTracks() As MediaStream

removeTrack

Removes the MediaStreamTrack given as argument. If the track is not part of the MediaStream object, nothing happens.

 

method removeTrack: MediaStream

 

MediaStream removeTrack()

 

func removeTrack() -> MediaStream

 

MediaStream removeTrack()

 

Function removeTrack() As MediaStream