Search completed in 1.21 seconds.
137 results for "mediaStreamTrack":
Your results are loading. Please wait...
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
the mediastreamtrackaudiosourceoptions dictionary's mediastreamtrack property must contain a reference to the mediastreamtrack from which the mediastreamtrackaudiosourcenode being created using the mediastreamtrackaudiosourcenode() constructor.
... syntax mediastreamtrackaudiosourceoptions = { mediastreamtrack: audiosourcetrack; } mediastreamtrackaudiosourceoptions.mediastreamtrack = audiosourcetrack; value a mediastreamtrack from which the audio output of the new mediastreamtrackaudiosourcenode will be taken.
... let audioctx = new (window.audiocontext || window.webkitaudiocontext)(); if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getusermedia ( { audio: true, video: false }).then(function(stream) { let options = { mediastreamtrack: stream.getaudiotracks()[0]; } let source = new mediastreamtrackaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment ...
... web audio apithe definition of 'mediastreamtrackaudiosourceoptions.mediastream' in that specification.
MediaStreamTrack - Web APIs
the mediastreamtrack interface represents a single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.
... properties in addition to the properties listed below, mediastreamtrack has constrainable properties which can be set using applyconstraints() and accessed using getconstraints() and getsettings().
... mediastreamtrack.contenthint a string that may be used by the web application to provide a hint as to what type of content the track contains to guide how it should be treated by api consumers.
...And 17 more matches
MediaStreamTrackAudioSourceNode() - Web APIs
the web audio api's mediastreamtrackaudiosourcenode() constructor creates and returns a new mediastreamtrackaudiosourcenode object whose audio is taken from the mediastreamtrack specified in the given options object.
... another way to create a mediastreamtrackaudiosourcenode is to call theaudiocontext.createmediastreamtracksource() method, specifying the mediastreamtrack from which you want to obtain audio.
... syntax audiotracknode = new mediastreamtrackaudiosourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with.
...And 5 more matches
CanvasCaptureMediaStreamTrack - Web APIs
the canvascapturemediastreamtrack interface represents the video track contained in a mediastream being generated from a <canvas> following a call to htmlcanvaselement.capturestream().
... properties this interface inherits the properties of its parent, mediastreamtrack.
... canvascapturemediastreamtrack.canvas read only returns the htmlcanvaselement object whose surface is captured in real-time.
...And 3 more matches
MediaStreamTrackAudioSourceNode - Web APIs
the mediastreamtrackaudiosourcenode interface is a type of audionode which represents a source of audio data taken from a specific mediastreamtrack obtained through the webrtc or media capture and streams apis.
... a mediastreamtrackaudiosourcenode has no inputs and exactly one output, and is created using the audiocontext.createmediastreamtracksource() method.
... number of inputs 0 number of outputs 1 channel count defined by the first audio mediastreamtrack passed to the audiocontext.createmediastreamtracksource() method that created it.
...And 3 more matches
MediaStreamTrackEvent() - Web APIs
the mediastreamtrackevent() constructor returns a newly created mediastreamtrackevent object, which represents an event announcing that a mediastreamtrack has been added to or removed from a mediastream.
... syntax var trackevent = new mediastreamtrackevent(type, {track: amediastreamtrack}); parameters the mediastreamtrackevent() constructor also inherits arguments from event().
... type a domstring representing the name of the type of the mediastreamtrackevent.
...And 3 more matches
AudioContext.createMediaStreamTrackSource() - Web APIs
the createmediastreamtracksource() method of the audiocontext interface creates and returns a mediastreamtrackaudiosourcenode which represents an audio source whose data comes from the specified mediastreamtrack.
... syntax var audioctx = new audiocontext(); var track = audioctx.createmediastreamtracksource(track); parameters track the mediastreamtrack to use as the source of all audio data for the new node.
... return value a mediastreamtrackaudiosourcenode object which acts as a source for audio data found in the specified audio track.
...And 2 more matches
MediaStreamTrackEvent - Web APIs
the mediastreamtrackevent interface represents events which indicate that a mediastream has had tracks added to or removed from the stream through calls to media stream api methods.
...75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediastreamtrackevent" target="_top"><rect x="116" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="221" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediastreamtrackevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} the events based on ...
... track read only a mediastreamtrack object representing the track which was added to the stream.
...And 2 more matches
MediaStreamTrackAudioSourceOptions - Web APIs
the mediastreamtrackaudiosourceoptions dictionary is used when specifying options to the mediastreamtrackaudiosourcenode() constructor.
... it isn't needed when using the audiocontext.createmediastreamtracksource() method.
... properties mediastreamtrack the mediastreamtrack from which to take audio data for this node's output.
... specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions' in that specification.
MediaStreamTrack.clone() - Web APIs
the clone() method of the mediastreamtrack interface creates a duplicate of the mediastreamtrack.
... this new mediastreamtrack object is identical except for its unique id.
... syntax const newtrack = track.clone() return value a new mediastreamtrack instance which is identical to the one clone() was called, except for its new unique id.
MediaStreamTrack: ended event - Web APIs
the ended event of the mediastreamtrack interface is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
... bubbles no cancelable no interface event event handler property mediastreamtrack.onended usage notes ended events fire when the media stream track's source permanently stops sending data on the stream.
... track.addeventlistener('ended', () => { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; }) you can also set up the event handler using the mediastreamtrack.onended property: track.onended = function() { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'ended' in that specification.
MediaStreamTrack: mute event - Web APIs
the mute event is sent to a mediastreamtrack when the track's source is temporarily unable to provide media data.
... note: the condition that most people think of as "muted" (that is, a user-toggled state of silencing a track) is actually managed using the mediastreamtrack.enabled property, for which there are no events.
... bubbles no cancelable no interface event event handler property onmute examples in this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the mediastreamtrack referenced by musictrack.
MediaStreamTrack.onended - Web APIs
the mediastreamtrack.onended event handler is used to specify a function which serves as an eventhandler to be called when the ended event occurs on the track.
... syntax mediastreamtrack.onended = function; value a function to serve as an eventhandler for the ended event.
... track.onended = function(event) { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onended' in that specification.
MediaStreamTrack.onunmute - Web APIs
mediastreamtrack's onunmute event handler is called when the unmute event is received.
... syntax track.onunmute = unmutehandler; value unmutehandler is a function which is called when the mediastreamtrack receives the unmute event.
... mytrack.onunmute = function(evt) { playstateicon.innerhtml = "&#x1f508;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onunmute' in that specification.
MediaStreamTrack.readyState - Web APIs
the mediastreamtrack.readystate read-only property returns an enumerated value giving the status of the track.
...in that case, the output of data can be switched on or off using the mediastreamtrack.enabled property.
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.readystate' in that specification.
MediaStreamTrack.stop() - Web APIs
the mediastreamtrack.stop() method stops the track.
... syntax track.stop() description calling stop() tells the user agent that the track's source—whatever that source may be, including files, network streams, or a local camera or microphone—is no longer needed by the mediastreamtrack.
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.stop()' in that specification.
MediaStreamTrack: unmute event - Web APIs
the unmute event is sent to a mediastreamtrack when the track's source is once again able to provide media data after a period of not being able to do so.
... bubbles no cancelable no interface event event handler property onunmute note: the condition that most people think of as "muted" (that is, a user-controllable way to silence a track) is actually managed using the mediastreamtrack.enabled property, for which there are no events.
... examples in this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the mediastreamtrack stored in the variable musictrack.
CanvasCaptureMediaStreamTrack.canvas - Web APIs
the canvascapturemediastreamtrack canvas read-only property returns the htmlcanvaselement from which frames are being captured.
... // obtain the canvas associated with the stream var canvas = stream.canvas; specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack.canvas' in that specification.
MediaStreamTrack.enabled - Web APIs
the enabled property on the mediastreamtrack interface is a boolean value which is true if the track is allowed to render the source stream or false if it is not.
... usage notes if the mediastreamtrack represents the video input from a camera, disabling the track by setting enabled to false also updates device activity indicators to show that the camera is not currently recording or streaming.
MediaStreamTrack.id - Web APIs
the mediastreamtrack.id read-only property returns a domstring containing a unique identifier (guid) for the track, which is generated by the user agent.
... syntax const id = track.id specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.id' in that specification.
MediaStreamTrack.kind - Web APIs
the mediastreamtrack.kind read-only property returns a domstring set to "audio" if the track is an audio track and to "video", if it is a video track.
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.kind' in that specification.
MediaStreamTrack.label - Web APIs
the mediastreamtrack.label read-only property returns a domstring containing a user agent-assigned label that identifies the track source, as in "internal microphone".
... syntax const label = track.label specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.label' in that specification.
MediaStreamTrack.muted - Web APIs
the muted read-only property of the mediastreamtrack interface returns a boolean value indicating whether or not the track is currently unable to provide media output.
... example this example counts the number of tracks in an array of mediastreamtrack objects which are currently muted.
MediaStreamTrack.onmute - Web APIs
mediastreamtrack's onmute event handler is called when the mute event is received.
... mytrack.onmute = function(evt) { playstateicon.innerhtml = "&#1f507;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onmute' in that specification.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
the canvascapturemediastreamtrack method requestframe() requests that a frame be captured from the canvas and sent to the stream.
MediaStreamTrack.applyConstraints() - Web APIs
the applyconstraints() method of the mediastreamtrack interface applies a set of constraints to the track; these constraints let the web site or app establish ideal values and acceptable ranges of values for the constrainable properties of the track, such as frame rate, dimensions, echo cancelation, and so forth.
MediaStreamTrack.getCapabilities() - Web APIs
the getcapabilities() method of the mediastreamtrack interface returns a mediatrackcapabilities object which specifies the values or range of values which each constrainable property, based upon the platform and user agent.
MediaStreamTrack.getConstraints() - Web APIs
the getconstraints() method of the mediastreamtrack interface returns a mediatrackconstraints object containing the set of constraints most recently established for the track using a prior call to applyconstraints().
MediaStreamTrack.getSettings() - Web APIs
the getsettings() method of the mediastreamtrack interface returns a mediatracksettings object containing the current values of each of the constrainable properties for the current mediastreamtrack.
MediaStreamTrack.onoverconstrained - Web APIs
the mediastreamtrack.onoverconstrained event handler is a property called when the overconstrained event is received.
MediaStreamTrack.remote - Web APIs
the mediastreamtrack.remote read-only property allows javascript to know whether a webrtc mediastreamtrack is from a remote source or a local one.
Index - Web APIs
WebAPIIndex
129 audiocontext.createmediastreamsource() api, audio, audiocontext, audionode, media, mediastream, mediastreamtrack, method, reference, web, web audio, web audio api, createmediastreamsource for more details about media stream audio source nodes, check out the mediastreamaudiosourcenode reference page.
... 130 audiocontext.createmediastreamtracksource() api, audio, audiocontext, mediastreamtrack, mediastreamtrackaudiosource, method, node, reference, web audio api, createmediastreamtracksource, sound, source, track a mediastreamtrackaudiosourcenode object which acts as a source for audio data found in the specified audio track.
... 532 using images advanced, canvas, graphics, html, tutorial importing images into a canvas is basically a two step process: 533 manipulating video using canvas api, canvas, chroma-key, editing, guide, manipulating, video, effects 534 canvascapturemediastreamtrack canvascapturemediastreamtrack, experimental, frame capture, interface, media, media capture, reference, web the canvascapturemediastreamtrack interface represents the video track contained in a mediastream being generated from a <canvas> following a call to htmlcanvaselement.capturestream().
...And 102 more matches
MediaStream - Web APIs
each track is specified as an instance of mediastreamtrack.you can obtain a mediastream object either by using the constructor or by calling mediadevices.getusermedia().
...you can create an empty stream, a stream which is based upon an existing stream, or a stream that contains a specified list of tracks (specified as an array of mediastreamtrack objects).
...this has been removed from the specification; you should instead check the value of mediastreamtrack.readystate to see if its value is ended for the track or tracks you want to ensure have finished playing.
...And 9 more matches
Capabilities, constraints, and settings - Web APIs
overview the process works like this (using mediastreamtrack as an example): if needed, call mediadevices.getsupportedconstraints() to get the list of supported constraints, which tells you what constrainable properties the browser knows about.
... in the media stream api, both mediastream and mediastreamtrack have constrainable properties.
...however, if you use simple values for properties when calling mediastreamtrack.applyconstraints(), the request will always succeed, because these values will be considered a request, not a requirement.
...And 6 more matches
ImageCapture - Web APIs
it provides an interface for capturing images from a photographic device referenced through a valid mediastreamtrack.
... constructor imagecapture() creates a new imagecapture object which can be used to capture still frames (photos) from a given mediastreamtrack which represents a video stream.
... properties imagecapture.track read only returns a reference to the mediastreamtrack passed to the constructor.
...And 3 more matches
MediaStream Image Capture API - Web APIs
this returns an array of mediastreamtrack objects.
... the code below assumes that the first item in the mediastreamtrack array is the one to use.
... you can use the properties of the mediastreamtrack objects to select the one you need.
...And 3 more matches
LocalMediaStream - Web APIs
see stopping a video stream in mediastreamtrack to learn how.
...however, control over playback of media has been moved to the individual mediastreamtrack objects, so this is no longer necessary.
... instead, media is stopped by calling mediastreamtrack.stop() on each track that needs to be stopped.
...And 2 more matches
MediaStreamAudioSourceNode - Web APIs
the mediastreamaudiosourcenode takes the audio from the first mediastreamtrack whose kind attribute's value is audio.
... number of inputs 0 number of outputs 1 channel count defined by the first audio mediastreamtrack passed to the audiocontext.createmediastreamsource() method that created it.
...it has been replaced with the more predictable mediastreamtrackaudiosourcenode, which has better-defined rules for how it chooses the track to output.
...And 2 more matches
Media Capture and Streams API (Media Stream) - Web APIs
a mediastream consists of zero or more mediastreamtrack objects, representing various audio or video tracks.
... each mediastreamtrack may have one or more channels.
... blobevent canvascapturemediastreamtrack inputdeviceinfo mediadevicekind mediadeviceinfo mediadevices mediastream mediastreamconstraints mediastreamevent mediastreamtrack mediastreamtrackevent mediatrackconstraints mediatracksettings mediatracksupportedconstraints overconstrainederror url early versions of the media capture and streams api specification included separate audiostreamtrack and videostreamtrack inter...
...And 2 more matches
WebRTC API - Web APIs
media streams can consist of any number of tracks of media information; tracks, which are represented by objects based on the mediastreamtrack interface, may contain one of a number of types of media data, including audio, video, and text (such as subtitles or even chapter names).
... rtcrtpsender manages the encoding and transmission of data for a mediastreamtrack on an rtcpeerconnection.
... rtcrtpreceiver manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection.
...And 2 more matches
MediaStream.getAudioTracks() - Web APIs
the getaudiotracks() method of the mediastream interface returns a sequence that represents all the mediastreamtrack objects in this stream's track set where mediastreamtrack.kind is audio.
... syntax var mediastreamtracks = mediastream.getaudiotracks() parameters none.
... return value an array of mediastreamtrack objects, one for each audio track contained in the stream.
... early versions of this api included a special audiostreamtrack interface which was used as the type for each entry in the list of audio streams; however, this has since been merged into the main mediastreamtrack interface.
MediaStream.getVideoTracks() - Web APIs
the getvideotracks() method of the mediastream interface returns a sequence of mediastreamtrack objects representing the video tracks in this stream.
... syntax var mediastreamtracks[] = mediastream.getvideotracks(); parameters none.
... return value an array of mediastreamtrack objects, one for each video track contained in the media stream.
... early versions of this api included a special videostreamtrack interface which was used as the type for each entry in the list of video streams; however, this has since been merged into the main mediastreamtrack interface.
RTCPeerConnection - Web APIs
each rtp receiver manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnectiongetsenders()the rtcpeerconnection method getsenders() returns an array of rtcrtpsender objects, each of which represents the rtp sender responsible for transmitting one track's data.getstats()the rtcpeerconnection method getstats() returns a promise which resolves with data providing statistics about either the overall connection or about the specified mediastreamtrack.gets...
... rtcpeerconnection.createdtmfsender() creates a new rtcdtmfsender, associated to a specific mediastreamtrack, that will be able to send dtmf phone signaling over the connection.
... isolationchange sent to the rtcpeerconnection when the isolated property on one of the mediastreamtrack objects associated with the connection changes value.
...instead of watching for this obsolete event, you should watch each for track events; one is sent for each mediastreamtrack added to the connection.
MediaStream.getTracks() - Web APIs
the gettracks() method of the mediastream interface returns a sequence that represents all the mediastreamtrack objects in this stream's track set, regardless of mediastreamtrack.kind.
... syntax var mediastreamtracks = mediastream.gettracks() parameters none.
... return value an array of mediastreamtrack objects.
MediaTrackSettings.deviceId - Web APIs
the mediatracksettings dictionary's deviceid property is a domstring which uniquely identifies the source for the corresponding mediastreamtrack for the origin corresponding to the browsing session.
... since there is a one-to-one pairing of id with each source, all tracks with the same source will share the same id for any given origin, so mediastreamtrack.getcapabilities() will always return exactly one value for deviceid.
... that makes the device id not useful for any changes to constraints when calling mediastreamtrack.applyconstraints().
RTCPeerConnection.addTrack() - Web APIs
syntax rtpsender = rtcpeerconnection.addtrack(track, stream...); parameters track a mediastreamtrack object representing the media track to add to the peer connection.
... the rtcrtptransceiver associated with the sender has a rtcrtpreceiver whose track property specifies a mediastreamtrack whose kind is the same as the kind of the track parameter specified when calling rtcpeerconnection.addtrack().
... a new rtcrtpreceiver is created with a new mediastreamtrack as its track property (not the track specified as a parameter when calling addtrack()).
RTCPeerConnection.getStats() - Web APIs
the rtcpeerconnection method getstats() returns a promise which resolves with data providing statistics about either the overall connection or about the specified mediastreamtrack.
... syntax promise = rtcpeerconnection.getstats(selector) parameters selector optional a mediastreamtrack for which to gather statistics.
... promise = rtcpeerconnection.getstats(selector, successcallback, failurecallback) parameters selector optional a mediastreamtrack for which to gather statistics.
RTCRtpStreamStats - Web APIs
kind a domstring whose value is "audio" if the associated mediastreamtrack is audio-only or "video" if the track contains video.
... trackid a domstring which uniquely identifies the rtcmediastreamtrackstats object representing the associated mediastreamtrack.
... this is not the same as the value of mediastreamtrack.id.
RTCTrackEvent - Web APIs
the webrtc api interface rtctrackevent represents the track event, which is sent when a new mediastreamtrack is added to an rtcrtpreceiver which is part of the rtcpeerconnection.
... track read only the mediastreamtrack which has been added to the connection.
... in addition, the mediastreamtrack specified by the receiver's track is the same one specified by the event's track, and the track has been added to any associated remote mediastream objects.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
these correspond to the following three types of transport supported by rtcpeerconnection: rtcrtpsender rtcrtpsenders handle the encoding and transmission of mediastreamtrack data to a remote peer.
... rtcrtpreceiver rtcrtpreceivers provide the ability to inspect and obtain information about incoming mediastreamtrack data.
... async function enablehold(audiostream) { try { await audiotransceiver.sender.replacetrack(audiostream.getaudiotracks()[0]); audiotransceiver.receiver.track.enabled = false; audiotransceiver.direction = "sendonly"; } catch(err) { /* handle the error */ } } the three lines of code within the try block perform the following steps: replace their outgoing audio track with a mediastreamtrack containing hold music.
Web Audio API - Web APIs
mediastreamtrackaudiosourcenode a node of type mediastreamtrackaudiosourcenode represents an audio source whose data comes from a mediastreamtrack.
... when creating the node using the createmediastreamtracksource() method to create the node, you specify which track to use.
... mediastreamaudiodestinationnode the mediastreamaudiodestinationnode interface represents an audio destination consisting of a webrtc mediastream with a single audiomediastreamtrack, which can be used in a similar way to a mediastream obtained from getusermedia().
HTMLCanvasElement.captureStream() - Web APIs
the htmlcanvaselement capturestream() method returns a mediastream which includes a canvascapturemediastreamtrack containing a real-time video capture of the canvas's contents.
... return value a reference to a mediastream object, which has a single canvascapturemediastreamtrack in it.
ImageCapture() constructor - Web APIs
syntax const imagecapture = new imagecapture(videotrack) parameters videotrack a mediastreamtrack from which the still images will be taken.
... example the following example shows how to use a call to mediadevices.getusermedia() to retrieve the mediastreamtrack needed by the imagecapture() constructor.
ImageCapture.track - Web APIs
the track read-only property of the imagecapture interface returns a reference to the mediastreamtrack passed to the imagecapture() constructor.
... syntax const mediastreamtrack = imagecaptureobj.track value a mediastreamtrack object.
MediaStream() - Web APIs
the mediastream() constructor returns a newly-created mediastream, which serves as a collection of media tracks, each represented by a mediastreamtrack object.
... tracks an array of mediastreamtrack objects, one for each track to add to the stream.
MediaStream.addTrack() - Web APIs
the track is specified as a parameter of type mediastreamtrack.
... syntax stream.addtrack(track); parameters track a mediastreamtrack to add to the stream.
MediaStream: addtrack event - Web APIs
the addtrack event is fired when a new mediastreamtrack object has been added to a mediastream.
... bubbles no cancelable no interface mediastreamtrackevent event handler property onaddtrack examples using addeventlistener(): let stream = new mediastream(); stream.addeventlistener('addtrack', (event) => { console.log(`new ${event.track.kind} track added`); }); using the onaddtrack event handler property: let stream = new mediastream(); stream.onaddtrack = (event) => { console.log(`new ${event.track.kind} track added`); }; specifications specification status media capture and streamsthe definition of 'addtrack' in that specification.
MediaStream.clone() - Web APIs
WebAPIMediaStreamclone
this new mediastream object has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
... return value a new mediastream instance which has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
MediaStream.getTrackById() - Web APIs
the mediastream.gettrackbyid() method returns a mediastreamtrack object representing the track with the specified id string.
... return value if a track is found for which mediastreamtrack.id matches the specified id string, that mediastreamtrack object is returned.
MediaStream.onaddtrack - Web APIs
syntax mediastream.onaddtrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the addtrack event which has occurred.
... the mediastreamtrack representing the track which was added is specified in the event's track property.
MediaStream.onremovetrack - Web APIs
syntax mediastream.onremovetrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the removetrack event which has occurred.
... the mediastreamtrack representing the track which was removed is specified in the event's track property.
MediaStream: removetrack event - Web APIs
the removetrack event is fired when a new mediastreamtrack object has been removed from a mediastream.
... bubbles no cancelable no interface mediastreamtrackevent event handler property onremovetrack examples using addeventlistener(): let stream = new mediastream(); stream.addeventlistener('removetrack', (event) => { console.log(`${event.track.kind} track removed`); }); using the onremovetrack event handler property: let stream = new mediastream(); stream.onremovetrack = (event) => { console.log(`${event.track.kind} track removed`); }; specifications specification status media capture and streamsthe definition of 'removetrack' in that specification.
MediaStreamAudioDestinationNode - Web APIs
the mediastreamaudiodestinationnode interface represents an audio destination consisting of a webrtc mediastream with a single audiomediastreamtrack, which can be used in a similar way to a mediastream obtained from navigator.getusermedia.
... mediastreamaudiodestinationnode.stream is a mediastream containing a single audiomediastreamtrack with the same number of channels as the node itself.
MediaStreamAudioSourceNode.mediaStream - Web APIs
syntax audiosourcestream = mediastreamaudiosourcenode.mediastream; value a mediastream representing the stream which contains the mediastreamtrack serving as the source of audio for the node.
...if the specific track matters to you, or you need to have access to the track itself, you should use a mediastreamtrackaudiosourcenode instead.
MediaTrackSettings.aspectRatio - Web APIs
the mediatracksettings dictionary's aspectratio property is a double-precision floating-point number indicating the aspect ratio of the mediastreamtrack as currently configured.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.aspectratio property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.channelCount - Web APIs
the mediatracksettings dictionary's channelcount property is an integer indicating how many audio channel the mediastreamtrack is currently configured to have.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.channelcount property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.facingMode - Web APIs
the mediatracksettings dictionary's facingmode property is a domstring indicating the direction in which the camera producing the video track represented by the mediastreamtrack is currently facing.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.facingmode property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.frameRate - Web APIs
the mediatracksettings dictionary's framerate property is a double-precision floating-point number indicating the frame rate, in frames per second, of the mediastreamtrack as currently configured.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.framerate property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.height - Web APIs
the mediatracksettings dictionary's height property is an integer indicating the number of pixels tall mediastreamtrack is currently configured to be.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.height property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.latency - Web APIs
the mediatracksettings dictionary's latency property is a double-precision floating-point number indicating the estimated latency (specified in seconds) of the mediastreamtrack as currently configured.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.latency property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.sampleRate - Web APIs
the mediatracksettings dictionary's samplerate property is an integer indicating how many audio samples per second the mediastreamtrack is currently configured for.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.samplerate property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.sampleSize - Web APIs
the mediatracksettings dictionary's samplesize property is an integer indicating the linear sample size (in bits per sample) the mediastreamtrack is currently configured for.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.samplesize property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.volume - Web APIs
the mediatracksettings dictionary's volume property is a double-precision floating-point number indicating the volume of the mediastreamtrack as currently configured, as a value from 0.0 (silence) to 1.0 (maximum supported volume for the device).
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.volume property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.width - Web APIs
the mediatracksettings dictionary's width property is an integer indicating the number of pixels wide mediastreamtrack is currently configured to be.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.width property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
OverconstrainedError.OverconstrainedError() - Web APIs
the overconstrainederror constructor creates a new overconstrainederror object which indicates that the set of desired capabilities for the current mediastreamtrack cannot currently be met.
... when this event is thrown on a mediastreamtrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied.
OverconstrainedError - Web APIs
the overconstrainederror interface of the media capture and streams api indicates that the set of desired capabilities for the current mediastreamtrack cannot currently be met.
... when this event is thrown on a mediastreamtrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied.
RTCPeerConnection.ontrack - Web APIs
the function receives as input the event object, of type rtctrackevent; this event is sent when a new incoming mediastreamtrack has been created and associated with an rtcrtpreceiver object which has been added to the set of receivers on connection.
...this information includes the mediastreamtrack object representing the new track, the rtcrtpreceiver and rtcrtptransceiver, and a list of mediastream objects which indicates which stream or streams the track is part of..
RTCRtpReceiver.track - Web APIs
the track read-only property of the rtcrtpreceiver interface returns the mediastreamtrack associated with the current rtcrtpreceiver instance.
... syntax var mediastreamtrack = rtcrtpreceiver.track value a mediastreamtrack instance.
RTCRtpReceiver - Web APIs
the rtcrtpreceiver interface of the webrtc api manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection.
... properties rtcrtpreceiver.track read only returns the mediastreamtrack associated with the current rtcrtpreceiver instance.
RTCRtpSender.replaceTrack() - Web APIs
the rtcrtpsender method replacetrack() replaces the track currently being used as the sender's source with a new mediastreamtrack.
... syntax trackreplacedpromise = sender.replacetrack(newtrack); parameters newtrack optional a mediastreamtrack specifying the track with which to replace the rtcrtpsender's current source track.
RTCRtpSender.track - Web APIs
the track read-only property of the rtcrtpsender interface returns the mediastreamtrack which is being handled by the rtcrtpsender.
... syntax var mediastreamtrack = rtcrtpsender.track value a mediastreamtrack object representing the media associated with the rtcrtpsender.
RTCRtpSender - Web APIs
the rtcrtpsender interface provides the ability to control and obtain details about how a particular mediastreamtrack is encoded and sent to a remote peer.
... rtcrtpsender.track read only the mediastreamtrack which is being handled by the rtcrtpsender.
RTCRtpStreamStats.trackId - Web APIs
the rtcrtpstreamstats dictionary's trackid property is a string which uniquely identifies the rtcmediastreamtrackstats object which contains the track statistics for the mediastreamtrack for which statistics are provided in this object.
... syntax var trackid = rtcrtpstreamstats.trackid; value a domstring which uniquely identifies the rtcmediastreamtrackstats object that provides statistics for the track for which statistics are being collected by this rtcstatsreport.
RTCTrackEvent.track - Web APIs
the webrtc api interface rtctrackevent's read-only track property specifies the mediastreamtrack that has been added to the rtcpeerconnection.
... syntax var track = trackevent.track; value a mediastreamtrack indicating the track which has been added to the rtcpeerconnection.
RTCTrackEventInit.track - Web APIs
the rtctrackeventinit dictionary's track property specifies the mediastreamtrack associated with the track event.
... syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var track = trackeventinit.track; value a mediastreamtrack representing the track with which the event is associated.
WebRTC Statistics API - Web APIs
rtcicecandidatestats rtcstats media-source statistics about the media produced by the mediastreamtrack attached to an rtp sender.
... rtcmediastreamstats rtcstats track statistics related to a specific mediastreamtrack's attachment to one of the connection's senders or receivers.
Web APIs
WebAPI
cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrate...
...maccess mediakeysystemconfiguration mediakeys medialist mediametadata mediapositionstate mediaquerylist mediaquerylistevent mediaquerylistlistener mediarecorder mediarecordererrorevent mediasession mediasessionactiondetails mediasettingsrange mediasource mediastream mediastreamaudiodestinationnode mediastreamaudiosourcenode mediastreamaudiosourceoptions mediastreamconstraints mediastreamevent mediastreamtrack mediastreamtrackaudiosourcenode mediastreamtrackaudiosourceoptions mediastreamtrackevent mediatrackconstraints mediatracksettings mediatracksupportedconstraints merchantvalidationevent messagechannel messageevent messageport metadata mimetype mimetypearray mouseevent mousescrollevent mousewheelevent mutationevent mutationobserver mutationobserverinit mutationrecord n ndefmessage ndefre...
Codecs used by WebRTC - Web media technologies
containerless media webrtc uses bare mediastreamtrack objects for each track being shared from one peer to another, without a container or even a mediastream associated with the tracks.
... with that in hand, we walk through the list of senders, looking for the first one whose mediastreamtrack indicates that it's track's kind is video, indicating that the track's data is video media.
AudioContext - Web APIs
audiocontext.createmediastreamtracksource() creates a mediastreamtrackaudiosourcenode associated with a mediastream representing an media stream track.
DisplayMediaStreamConstraints - Web APIs
video if true (the default), the display contents are included in a mediastreamtrack within the stream provided by getdisplaymedia().
ImageCapture.getPhotoCapabilities() - Web APIs
this example also shows how the imagecapture object is created using a mediastreamtrack retrieved from a device's mediastream.
ImageCapture.getPhotoSettings() - Web APIs
this example also shows how the imagecapture object is created using a mediastreamtrack retrieved from a device's mediastream.
ImageCapture.grabFrame() - Web APIs
the grabframe() method of the imagecapture interface takes a snapshot of the live video in a mediastreamtrack and returns a promise that resolves with a imagebitmap containing the snapshot.
ImageCapture.takePhoto() - Web APIs
the takephoto() method of the imagecapture interface takes a single exposure using the video capture device sourcing a mediastreamtrack and returns a promise that resolves with a blob containing the data.
MediaDevices - Web APIs
getsupportedconstraints() returns an object conforming to mediatracksupportedconstraints indicating which constrainable properties are supported on the mediastreamtrack interface.
MediaRecorder.ignoreMutedMedia - Web APIs
the ignoremutedmedia property of the mediarecorder interface indicates whether the mediarecorder instance will record input, when the input mediastreamtrack is muted.
MediaRecorder.onerror - Web APIs
this also happens when a mediastreamtrack within the stream is marked as isolated due to the peeridentity constraint on the source stream.
MediaRecorder.start() - Web APIs
this also happens when a mediastreamtrack within the stream is marked as isolated due to the peeridentity constraint on the source stream.
MediaRecorder - Web APIs
mediarecorder.ignoremutedmedia indicates whether the mediarecorder instance will record input when the input mediastreamtrack is muted.
MediaRecorderErrorEvent.error - Web APIs
this also happens when a mediastreamtrack within the stream is marked as isolated due to the peeridentity constraint on the source stream.
active - Web APIs
a stream is considered active if at least one of its mediastreamtracks is not in the mediastreamtrack.ended state.
MediaStream.ended - Web APIs
WebAPIMediaStreamended
this property has been removed from the specification; you should instead rely on the ended event or check the value of mediastreamtrack.readystate to see if its value is "ended" for the track or tracks you want to ensure have finished playing.
MediaStreamAudioDestinationNode.stream - Web APIs
the stream property of the audiocontext interface represents a mediastream containing a single audiomediastreamtrack with the same number of channels as the node itself.
MediaStreamAudioSourceOptions.mediaStream - Web APIs
syntax mediastreamaudiosourceoptions = { mediastream: audiosourcestream; } mediastreamaudiosourceoptions.mediastream = audiosourcestream; value a mediastream representing the stream from which to use a mediastreamtrack as the source of audio for the node.
MediaStreamConstraints - Web APIs
when a peer identity is set, mediastreamtracks from that peer have their isolated flag set to true.
Recording a media element - Web APIs
stopping the input stream the stop() function simply stops the input media: function stop(stream) { stream.gettracks().foreach(track => track.stop()); } this works by calling mediastream.gettracks(), using foreach() to call mediastreamtrack.stop() on each track in the stream.
MediaTrackConstraints.cursor - Web APIs
usage notes you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video mediastreamtrack, then checking the value of the returned mediatracksettings object's cursor object.
MediaTrackConstraints.deviceId - Web APIs
because of this, there's no use for the device id when calling mediastreamtrack.applyconstraints(), since there is only one possible value; however, you can record a deviceid and use it to ensure that you get the same source for multiple calls to getusermedia().
MediaTrackConstraints.displaySurface - Web APIs
usage notes you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video mediastreamtrack, then checking the value of the returned mediatracksettings object's displaysurface object.
MediaTrackConstraints.groupId - Web APIs
because of this, there's no use for the group id when calling mediastreamtrack.applyconstraints(), since there is only one possible value, and you can't use it to ensure the same group is used across multiple browsing sessions when calling getusermedia().
MediaTrackConstraints.logicalSurface - Web APIs
usage notes you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video mediastreamtrack, then checking the value of the returned mediatracksettings object's logicalsurface object.
MediaTrackSettings.autoGainControl - Web APIs
this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.autogaincontrol property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.echoCancellation - Web APIs
this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.echocancellation property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings.groupId - Web APIs
the mediatracksettings dictionary's groupid property is a browsing-session unique domstring which identifies the group of devices which includes the source for the mediastreamtrack.
MediaTrackSettings.noiseSuppression - Web APIs
this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.noisesuppression property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
MediaTrackSettings - Web APIs
the mediatracksettings dictionary is used to return the current values configured for each of a mediastreamtrack's settings.
MediaTrackSupportedConstraints - Web APIs
the mediatracksupportedconstraints dictionary establishes the list of constrainable properties recognized by the user agent or browser in its implementation of the mediastreamtrack object.
PhotoCapabilities - Web APIs
this example also shows how the imagecapture object is created using a mediastreamtrack retrieved from a device's mediastream.
RTCInboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcinboundrtpstreamstats dictionary indicates the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the mediastreamtrack which is receiving the incoming media.
RTCOutboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcoutboundrtpstreamstats dictionary indicates the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object representing the mediastreamtrack which is being sent on this stream.
RTCPeerConnection.addTransceiver() - Web APIs
syntax rtptransceiver = rtcpeerconnection.addtransceiver(trackorkind, init); parameters trackorkind a mediastreamtrack to associate with the transceiver, or a domstring which is used as the kind of the receiver's track, and by extension of the rtcrtpreceiver itself.
RTCPeerConnection.createOffer() - Web APIs
the sdp offer includes information about any mediastreamtracks already attached to the webrtc session, codec, and options supported by the browser, and any candidates already gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
RTCPeerConnection.getReceivers() - Web APIs
each rtp receiver manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection syntax var receivers = rtcpeerconnection.getreceivers(); return value an array of rtcrtpreceiver objects, one for each track on the connection.
RTCRtpContributingSource - Web APIs
timestamp optional a domhighrestimestamp indicating the most recent time at which a frame originating from this source was delivered to the receiver's mediastreamtrack specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcontributingsource' in that specification.
RTCRtpSender.setParameters() - Web APIs
the setparameters() method of the rtcrtpsender interface applies changes the configuration of sender's track, which is the mediastreamtrack for which the rtcrtpsender is responsible.
RTCRtpStreamStats.kind - Web APIs
this string will always be the same as the one provided by the associated mediastreamtrack object's kind property.
RTCStatsReport - Web APIs
the data within provides statistics related to a particular mediastreamtrack's attachment to an rtcrtpsender; also included are the media level metrics that go along with the track.
RTCStatsType - Web APIs
the data within provides statistics related to a particular mediastreamtrack's attachment to an rtcrtpsender; also included are the media level metrics that go along with the track.
RTCTrackEvent() - Web APIs
track the mediastreamtrack the event is associated with.
RTCTrackEventInit.receiver - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var rtpreceiver = trackeventinit.receiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
RTCTrackEventInit.streams - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var streamlist = trackeventinit.streams; value an array of mediastream objects, one for each stream which make up the track.
RTCTrackEventInit.transceiver - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var rtptransceiver = trackeventinit.transceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
RTCTrackEventInit - Web APIs
track the mediastreamtrack the event is associated with.
Using the Screen Capture API - Web APIs
it stops the stream by getting its track list using mediastream.gettracks(), then calling each track's {domxref("mediastreamtrack.stop, "stop()")}} method.
Signaling and video calling - Web APIs
for both remote and local video streams, we iterate over each track, calling the mediastreamtrack.stop() method to close each one.
Media container formats (file types) - Web media technologies
instead, it streams the encoded audio and video tracks directly from one peer to another using mediastreamtrack objects to represent each track.
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
codecs used by webrtc webrtc doesn't use a container, but instead streams the encoded media itself from peer to peer using mediastreamtrack objects to represent each audio or video track.