From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pt-br/web/api/mediastreamtrack/index.html | 181 ++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 files/pt-br/web/api/mediastreamtrack/index.html (limited to 'files/pt-br/web/api/mediastreamtrack/index.html') diff --git a/files/pt-br/web/api/mediastreamtrack/index.html b/files/pt-br/web/api/mediastreamtrack/index.html new file mode 100644 index 0000000000..33f62732dc --- /dev/null +++ b/files/pt-br/web/api/mediastreamtrack/index.html @@ -0,0 +1,181 @@ +--- +title: MediaStreamTrack +slug: Web/API/MediaStreamTrack +translation_of: Web/API/MediaStreamTrack +--- +
{{APIRef("Media Capture and Streams")}}
+ +

Resumo

+ +

A interface MediaStream representa uma stream de conteúdo de mídia. Uma stream consiste em várias tracks, como faixas de áudio e vídeo.

+ +

Properties

+ +
+
{{domxref("MediaStreamTrack.enabled")}}
+
Is a Boolean value with a value of true if the track is enabled, that is allowed to render the media source stream; or false if it is disabled, that is not rendering the media source stream but silence and blackness. If the track has been disconnected, this value can be changed but has no more effect.
+
{{domxref("MediaStreamTrack.id")}} {{readonlyInline}}
+
Returns a {{domxref("DOMString")}} containing a unique identifier (GUID) for the track; it is generated by the browser.
+
{{domxref("MediaStreamTrack.kind")}} {{readonlyInline}}
+
Returns a {{domxref("DOMString")}} set to "audio" if the track is an audio track and to "video", if it is a video track. It doesn't change if the track is deassociated from its source.
+
{{domxref("MediaStreamTrack.label")}} {{readonlyInline}}
+
Returns a {{domxref("DOMString")}} containing a user agent-assigned label that identifies the track source, as in "internal microphone". The string may be left empty and is empty as long as no source has been connected. When the track is deassociated from its source, the label is not changed.
+
{{domxref("MediaStreamTrack.muted")}} {{readonlyInline}}
+
Returns a Boolean value with a value of true if the track is muted, false otherwise.
+
{{domxref("MediaStreamTrack.readonly")}} {{readonlyInline}}
+
Returns a Boolean value with a value of true if the track is readonly (such a video file source or a camera that settings can't be modified),false otherwise.
+
{{domxref("MediaStreamTrack.readyState")}} {{readonlyInline}}
+
Returns an enumerated value giving the status of the track.It takes one of the following values: +
    +
  • "live" which indicates that an input is connected and does its best-effort in providing real-time data. In that case, the output of data can be switched on or off using the MediaStreamTrack.enabled attribute.
  • +
  • "ended" which indicates that the input is not giving any more data and will never provide new data.
  • +
+
+
{{domxref("MediaStreamTrack.remote")}} {{readonlyInline}}
+
Returns a boolean value with a value of true if the track is sourced by a {{domxref("RTCPeerConnection")}}, false otherwise.
+
+ +

Event handlers

+ +
+
{{domxref("MediaStreamTrack.onstarted")}}
+
Is a {{domxref("EventHandler")}} containing the action to perform when an {{event("started")}} event is fired on the object, that is when a new {{domxref("MediaStreamTrack")}} object is added.
+
{{domxref("MediaStreamTrack.onmute")}}
+
Is a {{domxref("EventHandler")}} containing the action to perform when an {{event("mute")}} event is fired on the object, that is when the streaming is terminating.
+
{{domxref("MediaStreamTrack.onunmute")}}
+
Is a {{domxref("EventHandler")}} containing the action to perform when an {{event("unmute")}} event is fired on the object, that is when a  {{domxref("MediaStreamTrack")}} object is removed from it.
+
{{domxref("MediaStreamTrack.onoverconstrained")}}
+
Is a {{domxref("EventHandler")}} containing the action to perform when an {{event("overconstrained")}} event is fired on the object, that is when a  {{domxref("MediaStreamTrack")}} object is removed from it.
+
{{domxref("MediaStreamTrack.oneended")}}
+
Is a {{domxref("EventHandler")}} containing the action to perform when an {{event("ended_(MediaStream)", "ended")}} event is fired on the object, that is when a  {{domxref("MediaStreamTrack")}} object is removed from it.
+
+ +

Methods

+ +
+
{{domxref("MediaStreamTrack.getConstraints()")}}
+
 
+
{{domxref("MediaStreamTrack.applyConstraints()")}}
+
 
+
{{domxref("MediaStreamTrack.getSettings()")}}
+
 
+
{{domxref("MediaStreamTrack.getCapabilities()")}}
+
 
+
{{domxref("MediaStreamTrack.clone()")}}
+
 
+
{{domxref("MediaStreamTrack.stop()")}}
+
Stops playing the source associated to the track, both the source and the track are deassociated. The track state is set to ended.
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Media Capture', '#mediastreamtrack', 'MediaStreamTrack')}}{{Spec2('Media Capture')}}Initial definition
+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}
stop(){{CompatUnknown}}{{CompatGeckoDesktop(34)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
muted, onmuted, onunmuted, readonly, readyState, remote, onstarted, onended, onoverconstrained, appendConstraint(), applyConstraints(), constraints(), getConstraints(){{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}
+ + + + + + +
stop()
+
{{CompatUnknown}}{{CompatGeckoDesktop(34)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
muted, onmuted, onunmuted, readonly, readyState, remote, onstarted, onended, onoverconstrained, appendConstraint(), applyConstraints(), constraints(), getConstraints(){{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}
+
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf