@clockworkdog/cogs-client-react 3.0.0-alpha.14 → 3.0.0-alpha.15
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.
|
@@ -11,7 +11,7 @@ export function MediaSurface({ cogsConnection }) {
|
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
async function updateAudioOutputs() {
|
|
13
13
|
const audioOutputs = {};
|
|
14
|
-
if (!navigator
|
|
14
|
+
if (!navigator?.mediaDevices) {
|
|
15
15
|
// `navigator.mediaDevices` is undefined on COGS AV <= 4.5 because of secure origin permissions
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
@@ -22,8 +22,8 @@ export function MediaSurface({ cogsConnection }) {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
updateAudioOutputs();
|
|
25
|
-
navigator
|
|
26
|
-
return () => navigator
|
|
25
|
+
navigator?.mediaDevices?.addEventListener('devicechange', updateAudioOutputs);
|
|
26
|
+
return () => navigator?.mediaDevices?.removeEventListener('devicechange', updateAudioOutputs);
|
|
27
27
|
}, []);
|
|
28
28
|
// Create and attach new surface manager
|
|
29
29
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "React components and hooks to connect to COGS to build a custom Media Master",
|
|
4
4
|
"author": "Clockwork Dog <info@clockwork.dog>",
|
|
5
5
|
"homepage": "https://github.com/clockwork-dog/cogs-sdk/tree/main/packages/react",
|
|
6
|
-
"version": "3.0.0-alpha.
|
|
6
|
+
"version": "3.0.0-alpha.15",
|
|
7
7
|
"keywords": [],
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"prerelease": "yarn npm publish --access public --tag=next"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@clockworkdog/cogs-client": "^3.0.0-alpha.
|
|
31
|
+
"@clockworkdog/cogs-client": "^3.0.0-alpha.15"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^18.0.0 || ^19.0.0",
|