@dialtribe/react-sdk 0.1.0-alpha.15 → 0.1.0-alpha.16
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/dialtribe-streamer.js +9 -3
- package/dist/dialtribe-streamer.js.map +1 -1
- package/dist/dialtribe-streamer.mjs +9 -3
- package/dist/dialtribe-streamer.mjs.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1583,7 +1583,12 @@ function DialtribeStreamer({
|
|
|
1583
1583
|
const audioInputs = devices.filter((device) => device.kind === "audioinput");
|
|
1584
1584
|
console.log(`\u{1F4F7} Found ${videoInputs.length} video input device(s)`);
|
|
1585
1585
|
console.log(`\u{1F3A4} Found ${audioInputs.length} audio input device(s)`);
|
|
1586
|
-
|
|
1586
|
+
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
1587
|
+
const hasMultiple = videoInputs.length > 1 || isIOS && isVideoKey;
|
|
1588
|
+
setHasMultipleCameras(hasMultiple);
|
|
1589
|
+
if (isIOS && videoInputs.length <= 1) {
|
|
1590
|
+
console.log("\u{1F4F1} iOS device detected - assuming multiple cameras available");
|
|
1591
|
+
}
|
|
1587
1592
|
setVideoDevices(videoInputs.map((d) => ({
|
|
1588
1593
|
deviceId: d.deviceId,
|
|
1589
1594
|
label: d.label || `Camera ${d.deviceId.slice(0, 8)}`
|
|
@@ -1600,7 +1605,8 @@ function DialtribeStreamer({
|
|
|
1600
1605
|
}
|
|
1601
1606
|
} catch (err) {
|
|
1602
1607
|
console.error("\u274C Failed to enumerate devices:", err);
|
|
1603
|
-
|
|
1608
|
+
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
1609
|
+
setHasMultipleCameras(isIOS && isVideoKey);
|
|
1604
1610
|
}
|
|
1605
1611
|
};
|
|
1606
1612
|
React2.useEffect(() => {
|
|
@@ -1634,7 +1640,7 @@ function DialtribeStreamer({
|
|
|
1634
1640
|
if (videoRef.current && mediaStream) {
|
|
1635
1641
|
videoRef.current.srcObject = mediaStream;
|
|
1636
1642
|
}
|
|
1637
|
-
}, [mediaStream]);
|
|
1643
|
+
}, [mediaStream, isVideoEnabled]);
|
|
1638
1644
|
const requestMediaPermissions = async () => {
|
|
1639
1645
|
if (!streamKey) return;
|
|
1640
1646
|
try {
|