Comparing version 0.3.13 to 0.3.14
@@ -48,2 +48,4 @@ import { is, set, on, update, until } from 'minimal-state'; | ||
downloadRecording: (fileName?: string | undefined) => Promise<void>; | ||
startPodcastRecording: () => Promise<void>; | ||
stopPodcastRecording: () => Promise<void>; | ||
}; | ||
@@ -101,6 +103,6 @@ declare function createJam({ jamConfig, initialProps, cachedRooms, debug: debug_ }?: { | ||
setState: { | ||
<L extends "identities" | "roomId" | "myIdentity" | "myId" | "swarm" | "micMuted" | "handRaised" | "inRoom" | "room" | "hasRoom" | "isRoomLoading" | "iAmSpeaker" | "iAmModerator" | "otherDeviceInRoom" | "peers" | "peerState" | "myPeerState" | "reactions" | "soundMuted" | "audioFile" | "audioFileElement" | "myAudio" | "audioPlayError" | "speaking" | "isRecording" | "isSomeoneRecording" | "recordedAudio">(key: L, value: StateType[L]): void; | ||
<L extends "identities" | "swarm" | "roomId" | "myIdentity" | "myId" | "micMuted" | "handRaised" | "inRoom" | "room" | "hasRoom" | "isRoomLoading" | "iAmSpeaker" | "iAmModerator" | "otherDeviceInRoom" | "peers" | "peerState" | "myPeerState" | "reactions" | "soundMuted" | "audioFile" | "audioFileElement" | "myAudio" | "audioPlayError" | "hasMicFailed" | "speaking" | "isRecording" | "isSomeoneRecording" | "recordedAudio">(key: L, value: StateType[L]): void; | ||
(state: Partial<StateType>): void; | ||
}; | ||
onState: (key: "identities" | "roomId" | "myIdentity" | "myId" | "swarm" | "micMuted" | "handRaised" | "inRoom" | "room" | "hasRoom" | "isRoomLoading" | "iAmSpeaker" | "iAmModerator" | "otherDeviceInRoom" | "peers" | "peerState" | "myPeerState" | "reactions" | "soundMuted" | "audioFile" | "audioFileElement" | "myAudio" | "audioPlayError" | "speaking" | "isRecording" | "isSomeoneRecording" | "recordedAudio" | undefined, listener: (...args: unknown[]) => void) => () => void; | ||
onState: (key: "identities" | "swarm" | "roomId" | "myIdentity" | "myId" | "micMuted" | "handRaised" | "inRoom" | "room" | "hasRoom" | "isRoomLoading" | "iAmSpeaker" | "iAmModerator" | "otherDeviceInRoom" | "peers" | "peerState" | "myPeerState" | "reactions" | "soundMuted" | "audioFile" | "audioFileElement" | "myAudio" | "audioPlayError" | "hasMicFailed" | "speaking" | "isRecording" | "isSomeoneRecording" | "recordedAudio" | undefined, listener: (...args: unknown[]) => void) => () => void; | ||
createRoom: (roomId: string, partialRoom?: Partial<RoomType> | undefined) => Promise<boolean>; | ||
@@ -125,2 +127,4 @@ updateRoom: (roomId: string, room: RoomType) => Promise<boolean>; | ||
downloadRecording: (fileName?: string | undefined) => Promise<void>; | ||
startPodcastRecording: () => Promise<void>; | ||
stopPodcastRecording: () => Promise<void>; | ||
}]; |
import { IdentityInfo, IdentityType } from './state'; | ||
export { Identity, importDefaultIdentity, importRoomIdentity, updateInfo }; | ||
declare function Identity(): ({ roomId }: { | ||
declare function Identity({ swarm }: { | ||
swarm: any; | ||
}): ({ roomId }: { | ||
roomId: any; | ||
@@ -9,5 +11,5 @@ }) => any; | ||
seed?: string; | ||
}): void; | ||
}): Promise<void>; | ||
declare function importRoomIdentity(roomId: string, identity: Partial<IdentityType> & { | ||
seed?: string; | ||
}): void; | ||
}): Promise<void>; |
@@ -75,2 +75,3 @@ export { defaultProps, defaultState }; | ||
audioPlayError: boolean; | ||
hasMicFailed: boolean; | ||
speaking: Set<string>; | ||
@@ -77,0 +78,0 @@ isRecording: boolean; |
{ | ||
"name": "jam-core", | ||
"description": "Jam SDK for creating custom audio spaces like Clubhouse / Twitter Spaces, made with WebRTC", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"main": "dist/index.js", | ||
@@ -22,8 +22,7 @@ "license": "AGPL-3.0", | ||
"dependencies": { | ||
"compact-base64": "^2.1.2", | ||
"fast-base64": "^0.1.6", | ||
"mediasoup-client": "^3.6.31", | ||
"minimal-state": "^5.6.0", | ||
"simple-signed-records-engine": "0.1.2", | ||
"tweetnacl": "^1.0.3", | ||
"ua-parser-js": "^0.7.24" | ||
"ua-parser-js": "^0.7.24", | ||
"watsign": "^0.1.6" | ||
}, | ||
@@ -30,0 +29,0 @@ "devDependencies": { |
@@ -352,3 +352,3 @@ # jam-core | ||
Sometimes you might need to manually specify the identity of your user, rather than let us create a random one. For this, we give you two functions which are best called before `createJam()`: | ||
Sometimes you might need to manually specify the identity of your user, rather than let us create a random one. For this, we give you two functions which are best called before `createJam()`. Both are async: | ||
@@ -360,3 +360,3 @@ - `importDefaultIdentity(identity)` lets you replace the current default identity stored in the browser: | ||
importDefaultIdentity({ | ||
await importDefaultIdentity({ | ||
publicKey: '...', | ||
@@ -370,9 +370,12 @@ secretKey: '...', | ||
// just the secret key is enough to restore an existing user: | ||
importDefaultIdentity({secretKey: '...'}); | ||
await importDefaultIdentity({secretKey: '...'}); | ||
// alternatively, you can pass a seed from which the keys are created deterministically: | ||
importDefaultIdentity({seed: 'arbitrary string!', info: {name: 'Christoph'}}); | ||
await importDefaultIdentity({ | ||
seed: 'arbitrary string!', | ||
info: {name: 'Christoph'}, | ||
}); | ||
// if you pass neither keys or seed and an identity already exists, the info will just be merged into the existing one | ||
importDefaultIdentity({info: {name: 'Christoph'}}); | ||
// if you pass neither keys nor seed and an identity already exists, the info will just be merged into the existing one | ||
await importDefaultIdentity({info: {name: 'Christoph'}}); | ||
@@ -392,9 +395,12 @@ let [state, api] = createJam(); | ||
// API is the same as importDefaultIdentity with an additional `roomId` parameter | ||
importRoomIdentity(roomId, {secretKey: '...', info: {name: 'Homer Simpson'}}); | ||
importRoomIdentity(roomId, {secretKey: '...'}); | ||
importRoomIdentity(roomId, { | ||
await importRoomIdentity(roomId, { | ||
secretKey: '...', | ||
info: {name: 'Homer Simpson'}, | ||
}); | ||
await importRoomIdentity(roomId, {secretKey: '...'}); | ||
await importRoomIdentity(roomId, { | ||
seed: 'arbitrary string!', | ||
info: {name: 'Homer Simpson'}, | ||
}); | ||
importRoomIdentity(roomId, {info: {name: 'Homer Simpson'}}); | ||
await importRoomIdentity(roomId, {info: {name: 'Homer Simpson'}}); | ||
@@ -401,0 +407,0 @@ let [state, api] = createJam(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
5
6043
419
1
508775
+ Addedfast-base64@^0.1.6
+ Addedwatsign@^0.1.6
+ Addedfast-base64@0.1.8(transitive)
+ Addedwatever-js-wrapper@0.3.2(transitive)
+ Addedwatsign@0.1.9(transitive)
- Removedcompact-base64@^2.1.2
- Removedsimple-signed-records-engine@0.1.2
- Removedtweetnacl@^1.0.3
- Removed@babel/polyfill@7.12.1(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbuffer@6.0.3(transitive)
- Removedcompact-base64@2.1.3(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedieee754@1.2.1(transitive)
- Removedregenerator-runtime@0.13.11(transitive)
- Removedsimple-signed-records-engine@0.1.2(transitive)
- Removedtweetnacl@1.0.3(transitive)
- Removedtweetnacl-util@0.15.1(transitive)