这篇翻译不完整。请帮忙从英语翻译这篇文章。
MediaStream.addTrack()
方法会给流添加一个新轨道。指定一个MediaStreamTrack
对象作为参数。
如果指定的track已经存在于流的track set里的话,该方法不会产生作用。
语法
stream.addTrack(track);
Parameters
track
- A
MediaStreamTrack
to add to the stream.
Example
Specifications
Specification | Status | Comment |
---|---|---|
Media Capture and Streams addTrack() |
Editor's Draft | Initial specification. |
Browser compatibility
?
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) | 34 (34) | 未实现 | (Yes) | ? |
addTrack() and removeTrack() |
? | 44 (44) | ? | ? | ? |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | ? | 34.0 (34) | 未实现 | ? | ? |
addTrack() and removeTrack() |
? | 44 (44) | ? | ? | ? | ? |
See also
MediaStream
, the interface it belongs to.