@snapcall/stream-ui 1.42.1 → 1.42.3
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/stream-ui.esm.js +6 -8
- package/dist/stream-ui.js +6 -8
- package/package.json +1 -1
package/dist/stream-ui.esm.js
CHANGED
|
@@ -535,7 +535,10 @@ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src)=>{
|
|
|
535
535
|
canvas.height = video.height;
|
|
536
536
|
canvas.width = video.width;
|
|
537
537
|
ctx?.drawImage(video, 0, 0);
|
|
538
|
-
|
|
538
|
+
const img = canvas.toDataURL('image/jpeg');
|
|
539
|
+
stream.removeTrack(src);
|
|
540
|
+
video.srcObject = null;
|
|
541
|
+
return img;
|
|
539
542
|
};
|
|
540
543
|
|
|
541
544
|
|
|
@@ -6290,17 +6293,13 @@ const $cbe12d51333f02bd$export$9ee2a145b590ce4b = ()=>{
|
|
|
6290
6293
|
|
|
6291
6294
|
|
|
6292
6295
|
|
|
6293
|
-
|
|
6294
6296
|
const $29e2063f6bd67bba$export$6aa26f5ebe6471fc = ({ kind: kind, includeDefault: includeDefault = false } = {})=>{
|
|
6295
6297
|
const getMediaDevices = async ()=>{
|
|
6296
|
-
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).processMediaPermissionsAndResolveRequests({
|
|
6297
|
-
audio: kind === 'audioinput',
|
|
6298
|
-
video: kind === 'videoinput'
|
|
6299
|
-
});
|
|
6300
6298
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
6301
6299
|
const filteredDevices = devices.filter((device)=>{
|
|
6302
6300
|
if (device.deviceId === 'default' && !includeDefault) return false;
|
|
6303
6301
|
if (kind && kind !== device.kind) return false;
|
|
6302
|
+
if (!device.deviceId) return false;
|
|
6304
6303
|
return true;
|
|
6305
6304
|
});
|
|
6306
6305
|
return filteredDevices;
|
|
@@ -11845,10 +11844,9 @@ const $24e31aa1532c4049$export$f9da3144ae2525a3 = ()=>{
|
|
|
11845
11844
|
} catch (err) {
|
|
11846
11845
|
console.warn("Couldn't capture video for thumbnail", err);
|
|
11847
11846
|
}
|
|
11848
|
-
if (mode !== 'audio') $24e31aa1532c4049$var$recordInterval = window.setInterval(()=>{
|
|
11847
|
+
if (mode !== 'audio' && (0, $94dc317d964bfa69$export$53479bc84d79bdc2).instance) $24e31aa1532c4049$var$recordInterval = window.setInterval(()=>{
|
|
11849
11848
|
const addImage = async ()=>{
|
|
11850
11849
|
let image = undefined;
|
|
11851
|
-
console.log(mode);
|
|
11852
11850
|
if (mode === 'screen') image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureScreenShare().catch(console.error);
|
|
11853
11851
|
else image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(undefined).catch(console.error);
|
|
11854
11852
|
if (image) await (0, $94dc317d964bfa69$export$53479bc84d79bdc2).instance?.addVideoImage(image);
|
package/dist/stream-ui.js
CHANGED
|
@@ -541,7 +541,10 @@ const $3575c8a563f2a1da$export$4a210166cc9cb64b = async (src)=>{
|
|
|
541
541
|
canvas.height = video.height;
|
|
542
542
|
canvas.width = video.width;
|
|
543
543
|
ctx?.drawImage(video, 0, 0);
|
|
544
|
-
|
|
544
|
+
const img = canvas.toDataURL('image/jpeg');
|
|
545
|
+
stream.removeTrack(src);
|
|
546
|
+
video.srcObject = null;
|
|
547
|
+
return img;
|
|
545
548
|
};
|
|
546
549
|
|
|
547
550
|
|
|
@@ -6296,17 +6299,13 @@ const $8f65e34d23588915$export$9ee2a145b590ce4b = ()=>{
|
|
|
6296
6299
|
|
|
6297
6300
|
|
|
6298
6301
|
|
|
6299
|
-
|
|
6300
6302
|
const $cf45aa5122d1e9ea$export$6aa26f5ebe6471fc = ({ kind: kind, includeDefault: includeDefault = false } = {})=>{
|
|
6301
6303
|
const getMediaDevices = async ()=>{
|
|
6302
|
-
await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).processMediaPermissionsAndResolveRequests({
|
|
6303
|
-
audio: kind === 'audioinput',
|
|
6304
|
-
video: kind === 'videoinput'
|
|
6305
|
-
});
|
|
6306
6304
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
6307
6305
|
const filteredDevices = devices.filter((device)=>{
|
|
6308
6306
|
if (device.deviceId === 'default' && !includeDefault) return false;
|
|
6309
6307
|
if (kind && kind !== device.kind) return false;
|
|
6308
|
+
if (!device.deviceId) return false;
|
|
6310
6309
|
return true;
|
|
6311
6310
|
});
|
|
6312
6311
|
return filteredDevices;
|
|
@@ -11851,10 +11850,9 @@ const $e86e3e83467d5bba$export$f9da3144ae2525a3 = ()=>{
|
|
|
11851
11850
|
} catch (err) {
|
|
11852
11851
|
console.warn("Couldn't capture video for thumbnail", err);
|
|
11853
11852
|
}
|
|
11854
|
-
if (mode !== 'audio') $e86e3e83467d5bba$var$recordInterval = window.setInterval(()=>{
|
|
11853
|
+
if (mode !== 'audio' && (0, $c489a777d7081058$export$53479bc84d79bdc2).instance) $e86e3e83467d5bba$var$recordInterval = window.setInterval(()=>{
|
|
11855
11854
|
const addImage = async ()=>{
|
|
11856
11855
|
let image = undefined;
|
|
11857
|
-
console.log(mode);
|
|
11858
11856
|
if (mode === 'screen') image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureScreenShare().catch(console.error);
|
|
11859
11857
|
else image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(undefined).catch(console.error);
|
|
11860
11858
|
if (image) await (0, $c489a777d7081058$export$53479bc84d79bdc2).instance?.addVideoImage(image);
|