crowdplaysdk 0.2.4 → 0.2.5
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/README.md +3 -0
- package/ios/CrowdPlayRNModule.swift +9 -2
- package/ios/wire.rb +13 -1
- package/lib/ConsentScreen.js +9 -5
- package/lib/index.d.ts +3 -1
- package/llms.txt +3 -1
- package/package.json +1 -1
- package/src/ConsentScreen.tsx +9 -5
- package/src/index.ts +3 -2
package/README.md
CHANGED
|
@@ -134,6 +134,9 @@ Your app key doubles as your data credential — see the CrowdPlay dashboard
|
|
|
134
134
|
- iOS 17+, React Native ≥ 0.71. **iOS only for now** — no Android engine
|
|
135
135
|
yet, calls to the module on other platforms throw with a clear message.
|
|
136
136
|
- Real device required to record (the Simulator has no camera/mic).
|
|
137
|
+
- The npm version can run ahead of the compiled engine version wire.rb
|
|
138
|
+
pins — bridge and doc fixes ship without a new engine binary. wire.rb
|
|
139
|
+
always pins the engine release this bridge was tested against.
|
|
137
140
|
- Keep the screen awake during sessions; force-quitting the app pauses
|
|
138
141
|
uploads until next launch (they resume automatically).
|
|
139
142
|
- **Slow join + glitchy first seconds = bad radio, not a bug.** Congested
|
|
@@ -74,10 +74,17 @@ final class CrowdPlayRNCore {
|
|
|
74
74
|
"name": participant.name?.isEmpty == false ? participant.name! : identity]
|
|
75
75
|
}
|
|
76
76
|
.sorted { ($0["identity"] as? String ?? "") < ($1["identity"] as? String ?? "") }
|
|
77
|
-
|
|
77
|
+
// Local identity included (field request): apps need their own
|
|
78
|
+
// identity string to correlate with remote lists / assign roles.
|
|
79
|
+
let localIdentity = engine.room.localParticipant.identity?.stringValue
|
|
80
|
+
let key = (participants.map { $0["identity"] as? String ?? "" } + [localIdentity ?? ""])
|
|
81
|
+
.joined(separator: ",")
|
|
78
82
|
if key != lastParticipantsKey {
|
|
79
83
|
lastParticipantsKey = key
|
|
80
|
-
send("crowdplay:participants", [
|
|
84
|
+
send("crowdplay:participants", [
|
|
85
|
+
"participants": participants,
|
|
86
|
+
"localIdentity": localIdentity as Any,
|
|
87
|
+
])
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
// Audio route (D-079): the current output device by NAME plus the
|
package/ios/wire.rb
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# `gem install xcodeproj`).
|
|
13
13
|
|
|
14
14
|
require 'fileutils'
|
|
15
|
+
require 'pathname'
|
|
15
16
|
begin
|
|
16
17
|
require 'xcodeproj'
|
|
17
18
|
rescue LoadError
|
|
@@ -21,6 +22,9 @@ rescue LoadError
|
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
SDK_URL = 'https://github.com/symbiateam/crowdplaysdk'
|
|
25
|
+
# The ENGINE release this bridge was tested against. The npm package
|
|
26
|
+
# version may be AHEAD of this (bridge/docs fixes ship without a new
|
|
27
|
+
# engine binary); that is deliberate, not drift.
|
|
24
28
|
SDK_VERSION = '0.2.3'
|
|
25
29
|
BRIDGE_FILES = ['CrowdPlayRNModule.swift', 'CrowdPlayRNVideoView.swift', 'CrowdPlayReactNative.m'].freeze
|
|
26
30
|
|
|
@@ -80,7 +84,15 @@ target.build_configurations.each do |config|
|
|
|
80
84
|
#import <React/RCTViewManager.h>
|
|
81
85
|
OBJC
|
|
82
86
|
end
|
|
83
|
-
|
|
87
|
+
# The setting must point at wherever the file ACTUALLY went. When the
|
|
88
|
+
# project has no group named after itself (newer RN templates), the
|
|
89
|
+
# fallback above places files at the project root — hardcoding
|
|
90
|
+
# "<Project>/<header>" there produced a missing-input build failure
|
|
91
|
+
# (field-reported on the RN 0.87 template). Derive it instead:
|
|
92
|
+
# SRCROOT is the .xcodeproj's directory.
|
|
93
|
+
srcroot = Pathname.new(File.dirname(project.path.to_s))
|
|
94
|
+
relative = Pathname.new(header_path).relative_path_from(srcroot).to_s
|
|
95
|
+
config.build_settings['SWIFT_OBJC_BRIDGING_HEADER'] = relative
|
|
84
96
|
end
|
|
85
97
|
|
|
86
98
|
project.save
|
package/lib/ConsentScreen.js
CHANGED
|
@@ -96,13 +96,17 @@ function CrowdPlayConsentScreen({ onConsent, style }) {
|
|
|
96
96
|
</react_native_1.Pressable>
|
|
97
97
|
</react_native_1.View>);
|
|
98
98
|
}
|
|
99
|
+
// Every color is EXPLICIT: this screen is legally load-bearing and must
|
|
100
|
+
// render identically (and legibly) in any host app, light or dark theme.
|
|
101
|
+
// A consent screen that can come out black-on-black is the wrong failure
|
|
102
|
+
// mode (field-reported). Hosts can restyle via the `style` prop.
|
|
99
103
|
const styles = react_native_1.StyleSheet.create({
|
|
100
|
-
container: { padding: 20, gap: 16 },
|
|
101
|
-
title: { fontSize: 20, fontWeight: '700' },
|
|
102
|
-
body: { fontSize: 15, lineHeight: 21 },
|
|
104
|
+
container: { padding: 20, gap: 16, backgroundColor: '#ffffff' },
|
|
105
|
+
title: { fontSize: 20, fontWeight: '700', color: '#111111' },
|
|
106
|
+
body: { fontSize: 15, lineHeight: 21, color: '#222222' },
|
|
103
107
|
row: { flexDirection: 'row', alignItems: 'center', gap: 10 },
|
|
104
|
-
agree: { fontSize: 15 },
|
|
105
|
-
note: { fontSize: 12,
|
|
108
|
+
agree: { fontSize: 15, color: '#111111' },
|
|
109
|
+
note: { fontSize: 12, color: '#666666' },
|
|
106
110
|
button: { backgroundColor: '#1f6feb', borderRadius: 8, paddingVertical: 12, alignItems: 'center' },
|
|
107
111
|
buttonDisabled: { opacity: 0.4 },
|
|
108
112
|
buttonPressed: { opacity: 0.8 },
|
package/lib/index.d.ts
CHANGED
|
@@ -111,9 +111,11 @@ export interface CrowdPlayEvents {
|
|
|
111
111
|
sessions: UploadProgress[];
|
|
112
112
|
onWifi: boolean;
|
|
113
113
|
};
|
|
114
|
-
/** Remote participants (join/leave)
|
|
114
|
+
/** Remote participants (join/leave) plus YOUR OWN identity string
|
|
115
|
+
* (null until connected). Render a CrowdPlayVideoView per entry. */
|
|
115
116
|
participants: {
|
|
116
117
|
participants: Participant[];
|
|
118
|
+
localIdentity: string | null;
|
|
117
119
|
};
|
|
118
120
|
/** Live capture warnings: audioStalled (engine down, auto-recovering),
|
|
119
121
|
* micSilent (dead mic), clipping (too-hot mic), crossTalk (loudspeaker
|
package/llms.txt
CHANGED
|
@@ -174,7 +174,9 @@ Events (CrowdPlay.addListener):
|
|
|
174
174
|
// and offer retryRecording()
|
|
175
175
|
'uploads' { sessions: UploadProgress[]; onWifi: boolean }
|
|
176
176
|
// onWifi false = video is waiting for WiFi; say so
|
|
177
|
-
'participants' { participants: {identity, name}[] }
|
|
177
|
+
'participants' { participants: {identity, name}[]; localIdentity }
|
|
178
|
+
// render tiles; localIdentity = YOUR identity string
|
|
179
|
+
// (null until connected) for role assignment/correlation
|
|
178
180
|
'warning' { kind: 'audioStalled'|'micSilent'|'clipping'|
|
|
179
181
|
'crossTalk'|'micPolicy'; active; message }
|
|
180
182
|
'audioRoute' { currentOutputName; detectedOutputs; headphonesConnected }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crowdplaysdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "CrowdPlay lossless conversation capture for React Native (iOS). Studio-grade per-participant recording during live video calls, delivered to CrowdPlay automatically.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
package/src/ConsentScreen.tsx
CHANGED
|
@@ -79,13 +79,17 @@ export function CrowdPlayConsentScreen({ onConsent, style }: CrowdPlayConsentScr
|
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
// Every color is EXPLICIT: this screen is legally load-bearing and must
|
|
83
|
+
// render identically (and legibly) in any host app, light or dark theme.
|
|
84
|
+
// A consent screen that can come out black-on-black is the wrong failure
|
|
85
|
+
// mode (field-reported). Hosts can restyle via the `style` prop.
|
|
82
86
|
const styles = StyleSheet.create({
|
|
83
|
-
container: { padding: 20, gap: 16 },
|
|
84
|
-
title: { fontSize: 20, fontWeight: '700' },
|
|
85
|
-
body: { fontSize: 15, lineHeight: 21 },
|
|
87
|
+
container: { padding: 20, gap: 16, backgroundColor: '#ffffff' },
|
|
88
|
+
title: { fontSize: 20, fontWeight: '700', color: '#111111' },
|
|
89
|
+
body: { fontSize: 15, lineHeight: 21, color: '#222222' },
|
|
86
90
|
row: { flexDirection: 'row', alignItems: 'center', gap: 10 },
|
|
87
|
-
agree: { fontSize: 15 },
|
|
88
|
-
note: { fontSize: 12,
|
|
91
|
+
agree: { fontSize: 15, color: '#111111' },
|
|
92
|
+
note: { fontSize: 12, color: '#666666' },
|
|
89
93
|
button: { backgroundColor: '#1f6feb', borderRadius: 8, paddingVertical: 12, alignItems: 'center' },
|
|
90
94
|
buttonDisabled: { opacity: 0.4 },
|
|
91
95
|
buttonPressed: { opacity: 0.8 },
|
package/src/index.ts
CHANGED
|
@@ -118,8 +118,9 @@ export interface CrowdPlayEvents {
|
|
|
118
118
|
recording: { isRecording: boolean; error?: string };
|
|
119
119
|
/** Upload progress for every session with outstanding or recent work. */
|
|
120
120
|
uploads: { sessions: UploadProgress[]; onWifi: boolean };
|
|
121
|
-
/** Remote participants (join/leave)
|
|
122
|
-
|
|
121
|
+
/** Remote participants (join/leave) plus YOUR OWN identity string
|
|
122
|
+
* (null until connected). Render a CrowdPlayVideoView per entry. */
|
|
123
|
+
participants: { participants: Participant[]; localIdentity: string | null };
|
|
123
124
|
/** Live capture warnings: audioStalled (engine down, auto-recovering),
|
|
124
125
|
* micSilent (dead mic), clipping (too-hot mic), crossTalk (loudspeaker
|
|
125
126
|
* leaking the far end into this mic), micPolicy (unexpected input). */
|