@aperture-browser/session-react 0.0.0-nightly.86.594137d99de2 → 0.0.0-nightly.87.b249cb4c5698
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.
|
@@ -1800,6 +1800,7 @@ function useBrowserControl({ sessionId, credentials, displayName, sessionToken,
|
|
|
1800
1800
|
const [browserViewportSize, setBrowserViewportSizeState] = useState(null);
|
|
1801
1801
|
const [captured, setCaptured] = useState(false);
|
|
1802
1802
|
const [recordingBusy, setRecordingBusy] = useState(false);
|
|
1803
|
+
const canRecord = collaborationRole === "owner" || collaborationRole === "editor";
|
|
1803
1804
|
const activeTargetIdRef = useRef(null);
|
|
1804
1805
|
const viewportRef = useRef(viewport);
|
|
1805
1806
|
const inputDimensionsRef = useRef(DEFAULT_VIEWPORT);
|
|
@@ -1963,11 +1964,11 @@ function useBrowserControl({ sessionId, credentials, displayName, sessionToken,
|
|
|
1963
1964
|
}), "Recording failed to start"), [live]);
|
|
1964
1965
|
const startRecording = useCallback((mode) => {
|
|
1965
1966
|
const targetId = activeTargetIdRef.current;
|
|
1966
|
-
if (!targetId ||
|
|
1967
|
+
if (!targetId || !canRecord || recordingBusy) return;
|
|
1967
1968
|
setRecordingBusy(true);
|
|
1968
1969
|
runStartRecording(mode, targetId);
|
|
1969
1970
|
}, [
|
|
1970
|
-
|
|
1971
|
+
canRecord,
|
|
1971
1972
|
recordingBusy,
|
|
1972
1973
|
runStartRecording
|
|
1973
1974
|
]);
|
|
@@ -2061,6 +2062,7 @@ function useBrowserControl({ sessionId, credentials, displayName, sessionToken,
|
|
|
2061
2062
|
viewportAutoSizeDefault,
|
|
2062
2063
|
captured,
|
|
2063
2064
|
recordings: live.recordings,
|
|
2065
|
+
canRecord,
|
|
2064
2066
|
recordingBusy,
|
|
2065
2067
|
remoteCursorEnabled: live.presentation?.cursorVisible ?? true,
|
|
2066
2068
|
collaboration: live.collaboration,
|
|
@@ -2201,4 +2203,4 @@ function useSharedSession({ token, displayName, onNotice }) {
|
|
|
2201
2203
|
//#endregion
|
|
2202
2204
|
export { makeApertureRuntime as a, collaborationPaintLifetimeMs as c, RuntimeProviderMissingError as d, useBaseUrl as f, useRuntime as g, useRunApi as h, ApertureProvider as i, useLiveSession as l, useFork as m, parseShareToken as n, useBrowserControl as o, useEffectCallback as p, useSharedSession as r, SessionViewport as s, LiveSessionError$1 as t, RuntimeProvider as u };
|
|
2203
2205
|
|
|
2204
|
-
//# sourceMappingURL=headless-
|
|
2206
|
+
//# sourceMappingURL=headless-BctsPMrj.js.map
|