@livedigital/client 2.32.1 → 2.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine/media/index.d.ts +1 -1
- package/dist/engine/media/tracks/BaseTrack.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/engine/media/index.ts +8 -2
- package/src/engine/media/tracks/BaseTrack.ts +4 -0
- package/src/engine/system/index.ts +2 -2
package/package.json
CHANGED
|
@@ -117,8 +117,14 @@ class Media {
|
|
|
117
117
|
return Array.from(this.tracks.values());
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
clearTracks(): void {
|
|
121
|
-
|
|
120
|
+
async clearTracks(): Promise<void> {
|
|
121
|
+
try {
|
|
122
|
+
this.getAllTracks().map((track) => track.stopMediaStreamTrack());
|
|
123
|
+
} catch (error) {
|
|
124
|
+
this.#logger.warn('clearTracks()', { error });
|
|
125
|
+
} finally {
|
|
126
|
+
this.tracks.clear();
|
|
127
|
+
}
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
static getScreenVideoTrackParams(options?: CreateScreenVideoTrackOptions): CreateVideoTrackParams {
|
|
@@ -108,14 +108,14 @@ class System {
|
|
|
108
108
|
try {
|
|
109
109
|
await this.requestMediaDevicesAccess();
|
|
110
110
|
} catch (errorVideoAndAudio) {
|
|
111
|
-
if (
|
|
111
|
+
if (![DeviceErrors.NotFoundError, DeviceErrors.NotAllowedError].includes(errorVideoAndAudio.message)) {
|
|
112
112
|
throw errorVideoAndAudio;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
try {
|
|
116
116
|
await this.requestMediaDevicesAccess({ audio: true });
|
|
117
117
|
} catch (errorAudioOnly) {
|
|
118
|
-
if (
|
|
118
|
+
if (![DeviceErrors.NotFoundError, DeviceErrors.NotAllowedError].includes(errorAudioOnly.message)) {
|
|
119
119
|
throw errorAudioOnly;
|
|
120
120
|
}
|
|
121
121
|
|