aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/mediastreamtrack/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/api/mediastreamtrack/index.html')
-rw-r--r--files/pt-br/web/api/mediastreamtrack/index.html181
1 files changed, 181 insertions, 0 deletions
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
+---
+<div>{{APIRef("Media Capture and Streams")}}</div>
+
+<h2 id="Resumo">Resumo</h2>
+
+<p>A interface <strong><code>MediaStream</code></strong><strong> r</strong>epresenta uma stream de conteúdo de mídia. Uma stream consiste em várias <em>tracks</em>, como faixas de áudio e vídeo.</p>
+
+<h2 id="Properties">Properties</h2>
+
+<dl>
+ <dt>{{domxref("MediaStreamTrack.enabled")}}</dt>
+ <dd>Is a Boolean value with a value of <code>true</code> if the track is enabled, that is allowed to render the media source stream; or <code>false</code> 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.</dd>
+ <dt>{{domxref("MediaStreamTrack.id")}} {{readonlyInline}}</dt>
+ <dd>Returns a {{domxref("DOMString")}} containing a unique identifier (GUID) for the track; it is generated by the browser.</dd>
+ <dt>{{domxref("MediaStreamTrack.kind")}} {{readonlyInline}}</dt>
+ <dd>Returns a {{domxref("DOMString")}} set to <code>"audio"</code> if the track is an audio track and to <code>"video"</code>, if it is a video track. It doesn't change if the track is deassociated from its source.</dd>
+ <dt>{{domxref("MediaStreamTrack.label")}} {{readonlyInline}}</dt>
+ <dd>Returns a {{domxref("DOMString")}} containing a user agent-assigned label that identifies the track source, as in <code>"internal microphone"</code>. 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.</dd>
+ <dt>{{domxref("MediaStreamTrack.muted")}} {{readonlyInline}}</dt>
+ <dd>Returns a Boolean value with a value of <code>true</code> if the track is muted, <code>false</code> otherwise.</dd>
+ <dt>{{domxref("MediaStreamTrack.readonly")}} {{readonlyInline}}</dt>
+ <dd>Returns a Boolean value with a value of <code>true</code> if the track is readonly (such a video file source or a camera that settings can't be modified),<code>false</code> otherwise.</dd>
+ <dt>{{domxref("MediaStreamTrack.readyState")}} {{readonlyInline}}</dt>
+ <dd>Returns an enumerated value giving the status of the track.It takes one of the following values:
+ <ul>
+ <li><code>"live"</code> 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 <code>MediaStreamTrack.enabled</code> attribute.</li>
+ <li><code>"ended"</code> which indicates that the input is not giving any more data and will never provide new data.</li>
+ </ul>
+ </dd>
+ <dt>{{domxref("MediaStreamTrack.remote")}} {{readonlyInline}}</dt>
+ <dd>Returns a boolean value with a value of <code>true</code> if the track is sourced by a {{domxref("RTCPeerConnection")}}, <code>false</code> otherwise.</dd>
+</dl>
+
+<h3 id="Event_handlers">Event handlers</h3>
+
+<dl>
+ <dt>{{domxref("MediaStreamTrack.onstarted")}}</dt>
+ <dd>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.</dd>
+ <dt>{{domxref("MediaStreamTrack.onmute")}}</dt>
+ <dd>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.</dd>
+ <dt>{{domxref("MediaStreamTrack.onunmute")}}</dt>
+ <dd>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.</dd>
+ <dt>{{domxref("MediaStreamTrack.onoverconstrained")}}</dt>
+ <dd>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.</dd>
+ <dt>{{domxref("MediaStreamTrack.oneended")}}</dt>
+ <dd>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.</dd>
+</dl>
+
+<h2 id="Methods">Methods</h2>
+
+<dl>
+ <dt>{{domxref("MediaStreamTrack.getConstraints()")}}</dt>
+ <dd> </dd>
+ <dt>{{domxref("MediaStreamTrack.applyConstraints()")}}</dt>
+ <dd> </dd>
+ <dt>{{domxref("MediaStreamTrack.getSettings()")}}</dt>
+ <dd> </dd>
+ <dt>{{domxref("MediaStreamTrack.getCapabilities()")}}</dt>
+ <dd> </dd>
+ <dt>{{domxref("MediaStreamTrack.clone()")}}</dt>
+ <dd> </dd>
+ <dt>{{domxref("MediaStreamTrack.stop()")}}</dt>
+ <dd>Stops playing the source associated to the track, both the source and the track are deassociated. The track state is set to <code>ended</code>.</dd>
+</dl>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Media Capture', '#mediastreamtrack', 'MediaStreamTrack')}}</td>
+ <td>{{Spec2('Media Capture')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>stop()</code></td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoDesktop(34)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>muted</code>, <code>onmuted</code>, <code>onunmuted</code>, <code>readonly</code>, <code>readyState</code>, <code>remote</code>, <code>onstarted</code>, <code>onended</code>, <code>onoverconstrained</code>, <code>appendConstraint()</code>, <code>applyConstraints()</code>, <code>constraints()</code>, <code>getConstraints()</code></td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td>
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <td><code>stop()</code></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoDesktop(34)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>muted</code>, <code>onmuted</code>, <code>onunmuted</code>, <code>readonly</code>, <code>readyState</code>, <code>remote</code>, <code>onstarted</code>, <code>onended</code>, <code>onoverconstrained</code>, <code>appendConstraint()</code>, <code>applyConstraints()</code>, <code>constraints()</code>, <code>getConstraints()</code></td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li><a href="/en-US/docs/WebRTC/MediaStream_API" title="/en-US/docs/WebRTC/MediaStream_API">Using the MediaStream API</a></li>
+</ul>