@snapcall/stream-ui 1.42.1 → 1.42.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/stream-ui.esm.js +5 -3
- package/dist/stream-ui.js +5 -3
- 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
|
|
|
@@ -11845,10 +11848,9 @@ const $24e31aa1532c4049$export$f9da3144ae2525a3 = ()=>{
|
|
|
11845
11848
|
} catch (err) {
|
|
11846
11849
|
console.warn("Couldn't capture video for thumbnail", err);
|
|
11847
11850
|
}
|
|
11848
|
-
if (mode !== 'audio') $24e31aa1532c4049$var$recordInterval = window.setInterval(()=>{
|
|
11851
|
+
if (mode !== 'audio' && (0, $94dc317d964bfa69$export$53479bc84d79bdc2).instance) $24e31aa1532c4049$var$recordInterval = window.setInterval(()=>{
|
|
11849
11852
|
const addImage = async ()=>{
|
|
11850
11853
|
let image = undefined;
|
|
11851
|
-
console.log(mode);
|
|
11852
11854
|
if (mode === 'screen') image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureScreenShare().catch(console.error);
|
|
11853
11855
|
else image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(undefined).catch(console.error);
|
|
11854
11856
|
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
|
|
|
@@ -11851,10 +11854,9 @@ const $e86e3e83467d5bba$export$f9da3144ae2525a3 = ()=>{
|
|
|
11851
11854
|
} catch (err) {
|
|
11852
11855
|
console.warn("Couldn't capture video for thumbnail", err);
|
|
11853
11856
|
}
|
|
11854
|
-
if (mode !== 'audio') $e86e3e83467d5bba$var$recordInterval = window.setInterval(()=>{
|
|
11857
|
+
if (mode !== 'audio' && (0, $c489a777d7081058$export$53479bc84d79bdc2).instance) $e86e3e83467d5bba$var$recordInterval = window.setInterval(()=>{
|
|
11855
11858
|
const addImage = async ()=>{
|
|
11856
11859
|
let image = undefined;
|
|
11857
|
-
console.log(mode);
|
|
11858
11860
|
if (mode === 'screen') image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureScreenShare().catch(console.error);
|
|
11859
11861
|
else image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(undefined).catch(console.error);
|
|
11860
11862
|
if (image) await (0, $c489a777d7081058$export$53479bc84d79bdc2).instance?.addVideoImage(image);
|