@stream-io/react-native-webrtc
Advanced tools
@@ -130,3 +130,16 @@ "use strict"; | ||
clone() { | ||
throw new Error('Not implemented.'); | ||
if (this.remote) { | ||
throw new Error('clone is not implemented for remote tracks'); | ||
} | ||
const id = WebRTCModule.mediaStreamTrackClone(this.id); | ||
return new MediaStreamTrack({ | ||
id, | ||
kind: this.kind, | ||
remote: this.remote, | ||
constraints: (0, _RTCUtil.deepClone)(this._constraints), | ||
enabled: this._enabled, | ||
settings: (0, _RTCUtil.deepClone)(this._settings), | ||
peerConnectionId: this._peerConnectionId, | ||
readyState: this._readyState | ||
}); | ||
} | ||
@@ -133,0 +146,0 @@ getCapabilities() { |
@@ -123,3 +123,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
clone() { | ||
throw new Error('Not implemented.'); | ||
if (this.remote) { | ||
throw new Error('clone is not implemented for remote tracks'); | ||
} | ||
const id = WebRTCModule.mediaStreamTrackClone(this.id); | ||
return new MediaStreamTrack({ | ||
id, | ||
kind: this.kind, | ||
remote: this.remote, | ||
constraints: deepClone(this._constraints), | ||
enabled: this._enabled, | ||
settings: deepClone(this._settings), | ||
peerConnectionId: this._peerConnectionId, | ||
readyState: this._readyState | ||
}); | ||
} | ||
@@ -126,0 +139,0 @@ getCapabilities() { |
@@ -59,3 +59,3 @@ import { EventTarget, Event } from 'event-target-shim/index'; | ||
applyConstraints(): never; | ||
clone(): never; | ||
clone(): MediaStreamTrack; | ||
getCapabilities(): never; | ||
@@ -62,0 +62,0 @@ getConstraints(): object; |
{ | ||
"name": "@stream-io/react-native-webrtc", | ||
"version": "118.1.2", | ||
"version": "118.2.0-rc1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -167,4 +167,19 @@ import { EventTarget, Event, defineEventAttribute } from 'event-target-shim/index'; | ||
clone(): never { | ||
throw new Error('Not implemented.'); | ||
clone(): MediaStreamTrack { | ||
if (this.remote) { | ||
throw new Error('clone is not implemented for remote tracks'); | ||
} | ||
const id = WebRTCModule.mediaStreamTrackClone(this.id); | ||
return new MediaStreamTrack({ | ||
id, | ||
kind: this.kind, | ||
remote: this.remote, | ||
constraints: deepClone(this._constraints), | ||
enabled: this._enabled, | ||
settings: deepClone(this._settings), | ||
peerConnectionId: this._peerConnectionId, | ||
readyState: this._readyState, | ||
}); | ||
} | ||
@@ -171,0 +186,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1126924
5.48%308
1.32%12333
0.62%1
Infinity%