@livepeer/core-web
Advanced tools
Comparing version 4.1.12 to 4.1.13
@@ -68,3 +68,3 @@ import { MediaControllerStore } from '@livepeer/core/media'; | ||
*/ | ||
audio: boolean; | ||
audio: boolean | Omit<MediaTrackConstraints, "deviceId">; | ||
/** | ||
@@ -93,3 +93,3 @@ * The creatorId for the current broadcast. | ||
*/ | ||
video: boolean; | ||
video: boolean | Omit<MediaTrackConstraints, "deviceId">; | ||
}; | ||
@@ -96,0 +96,0 @@ type BroadcastAriaText = { |
@@ -420,3 +420,3 @@ // src/broadcast.ts | ||
aspectRatio: initialProps?.aspectRatio ?? null, | ||
audio: initialProps?.video ?? true, | ||
audio: initialProps?.audio ?? true, | ||
creatorId: initialProps.creatorId ?? null, | ||
@@ -771,2 +771,4 @@ forceEnabled: initialProps?.forceEnabled ?? false, | ||
requestedVideoDeviceId: state.__controls.requestedVideoInputDeviceId, | ||
initialAudioConfig: state.__initialProps.audio, | ||
initialVideoConfig: state.__initialProps.video, | ||
previousMediaStream: state.mediaStream | ||
@@ -781,3 +783,5 @@ }), | ||
requestedVideoDeviceId, | ||
previousMediaStream | ||
previousMediaStream, | ||
initialAudioConfig, | ||
initialVideoConfig | ||
}) => { | ||
@@ -795,2 +799,4 @@ try { | ||
} | ||
const audioConstraints = typeof initialAudioConfig !== "boolean" ? initialAudioConfig : null; | ||
const videoConstraints = typeof initialVideoConfig !== "boolean" ? initialVideoConfig : null; | ||
const stream = await (requestedVideoDeviceId === "screen" ? getDisplayMedia({ | ||
@@ -802,5 +808,8 @@ // for now, only the microphone audio track is supported - we don't support multiple | ||
// and we don't listen to the `video` enabled state | ||
video: true | ||
// | ||
// we apply the video constraints to the video track | ||
video: videoConstraints ?? true | ||
}) : getUserMedia({ | ||
audio: audio && requestedAudioDeviceId && requestedAudioDeviceId !== "default" ? { | ||
...audioConstraints ? audioConstraints : {}, | ||
deviceId: { | ||
@@ -810,4 +819,7 @@ // we pass ideal here, so we don't get overconstrained errors | ||
} | ||
} : Boolean(audio), | ||
} : audio ? { | ||
...audioConstraints ? audioConstraints : {} | ||
} : false, | ||
video: video && requestedVideoDeviceId && requestedVideoDeviceId !== "default" ? { | ||
...videoConstraints ? videoConstraints : {}, | ||
deviceId: { | ||
@@ -817,3 +829,5 @@ // we pass ideal here, so we don't get overconstrained errors | ||
} | ||
} : Boolean(video) | ||
} : video ? { | ||
...videoConstraints ? videoConstraints : {} | ||
} : false | ||
})); | ||
@@ -820,0 +834,0 @@ if (stream) { |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "4.1.12", | ||
"version": "4.1.13", | ||
"type": "module", | ||
@@ -86,3 +86,3 @@ "repository": { | ||
"zustand": "^4.5.0", | ||
"@livepeer/core": "3.1.12" | ||
"@livepeer/core": "3.1.13" | ||
}, | ||
@@ -89,0 +89,0 @@ "keywords": [ |
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
743871
6599
+ Added@livepeer/core@3.1.13(transitive)
- Removed@livepeer/core@3.1.12(transitive)
Updated@livepeer/core@3.1.13