crowdplaysdk 0.2.3 → 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 CHANGED
@@ -36,6 +36,7 @@ What the app is about — read carefully:
36
36
 
37
37
  - npm install crowdplaysdk
38
38
  - In ios/: pod install, then run
39
+ gem install xcodeproj --user-install # one-time
39
40
  ruby node_modules/crowdplaysdk/ios/wire.rb <MyProjectName>
40
41
  (adds the compiled CrowdPlay engine + bridge to the Xcode project)
41
42
  - Info.plist: NSMicrophoneUsageDescription, NSCameraUsageDescription,
@@ -62,6 +63,7 @@ What the app is about — read carefully:
62
63
 
63
64
  1. `npm install crowdplaysdk`
64
65
  2. `cd ios && pod install`
66
+ (one-time: `gem install xcodeproj --user-install` — the wiring script needs it)
65
67
  3. `ruby node_modules/crowdplaysdk/ios/wire.rb <YourProjectName>` —
66
68
  idempotent; adds the CrowdPlaySDK Swift package (the compiled engine), copies
67
69
  the three bridge files into your app target, and points the Swift
@@ -132,6 +134,9 @@ Your app key doubles as your data credential — see the CrowdPlay dashboard
132
134
  - iOS 17+, React Native ≥ 0.71. **iOS only for now** — no Android engine
133
135
  yet, calls to the module on other platforms throw with a clear message.
134
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.
135
140
  - Keep the screen awake during sessions; force-quitting the app pauses
136
141
  uploads until next launch (they resume automatically).
137
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
- let key = participants.map { $0["identity"] as? String ?? "" }.joined(separator: ",")
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", ["participants": 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,9 +12,19 @@
12
12
  # `gem install xcodeproj`).
13
13
 
14
14
  require 'fileutils'
15
- require 'xcodeproj'
15
+ require 'pathname'
16
+ begin
17
+ require 'xcodeproj'
18
+ rescue LoadError
19
+ abort "wire.rb needs the xcodeproj gem (one-time install):\n\n" \
20
+ " gem install xcodeproj --user-install\n\n" \
21
+ "then re-run this script."
22
+ end
16
23
 
17
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.
18
28
  SDK_VERSION = '0.2.3'
19
29
  BRIDGE_FILES = ['CrowdPlayRNModule.swift', 'CrowdPlayRNVideoView.swift', 'CrowdPlayReactNative.m'].freeze
20
30
 
@@ -74,7 +84,15 @@ target.build_configurations.each do |config|
74
84
  #import <React/RCTViewManager.h>
75
85
  OBJC
76
86
  end
77
- config.build_settings['SWIFT_OBJC_BRIDGING_HEADER'] = "#{project_name}/#{header_name}"
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
78
96
  end
79
97
 
80
98
  project.save
@@ -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, opacity: 0.6 },
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). Render a CrowdPlayVideoView per entry. */
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
@@ -68,7 +68,9 @@ its video calls invisibly; recording is infrastructure, not identity:
68
68
 
69
69
  1. npm install crowdplaysdk
70
70
  2. cd ios && pod install (installs RN's own pods; CrowdPlay has none)
71
- 3. ruby node_modules/crowdplaysdk/ios/wire.rb <YourProjectName>
71
+ 3. gem install xcodeproj --user-install (one-time; wire.rb needs it
72
+ and says so itself if missing)
73
+ ruby node_modules/crowdplaysdk/ios/wire.rb <YourProjectName>
72
74
  Idempotent. It: adds the CrowdPlaySDK binary Swift package to the Xcode
73
75
  project, copies the three native bridge files into the app target,
74
76
  creates/points the Swift bridging header at the React headers, and
@@ -172,7 +174,9 @@ Events (CrowdPlay.addListener):
172
174
  // and offer retryRecording()
173
175
  'uploads' { sessions: UploadProgress[]; onWifi: boolean }
174
176
  // onWifi false = video is waiting for WiFi; say so
175
- 'participants' { participants: {identity, name}[] } // render tiles
177
+ 'participants' { participants: {identity, name}[]; localIdentity }
178
+ // render tiles; localIdentity = YOUR identity string
179
+ // (null until connected) for role assignment/correlation
176
180
  'warning' { kind: 'audioStalled'|'micSilent'|'clipping'|
177
181
  'crossTalk'|'micPolicy'; active; message }
178
182
  'audioRoute' { currentOutputName; detectedOutputs; headphonesConnected }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crowdplaysdk",
3
- "version": "0.2.3",
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",
@@ -20,7 +20,7 @@
20
20
  "homepage": "https://github.com/symbiateam/crowdplaysdk",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/symbiateam/crowdplaysdk.git"
23
+ "url": "git+https://github.com/symbiateam/crowdplaysdk.git"
24
24
  },
25
25
  "keywords": [
26
26
  "react-native",
@@ -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, opacity: 0.6 },
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). Render a CrowdPlayVideoView per entry. */
122
- participants: { participants: Participant[] };
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). */