expo-livekit-screen-share 0.1.5 → 0.2.1

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/build/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type ConfigPlugin } from "@expo/config-plugins";
2
- type ScreenShareOptions = {
2
+ export type ScreenShareOptions = {
3
3
  ios?: {
4
4
  extensionName?: string;
5
5
  appGroupIdentifier?: string;
package/build/index.js CHANGED
@@ -29,9 +29,10 @@ function getAppGroupIdentifier(bundleIdentifier) {
29
29
  function getExtensionBundleIdentifier(bundleIdentifier, extensionName) {
30
30
  return `${bundleIdentifier}.${extensionName}`;
31
31
  }
32
+ const DOWNLOAD_TIMEOUT_MS = 30000;
32
33
  function httpsGet(url) {
33
34
  return new Promise((resolve, reject) => {
34
- https_1.default
35
+ const req = https_1.default
35
36
  .get(url, (res) => {
36
37
  if (res.statusCode &&
37
38
  res.statusCode >= 300 &&
@@ -49,6 +50,10 @@ function httpsGet(url) {
49
50
  res.on("end", () => resolve(data));
50
51
  })
51
52
  .on("error", reject);
53
+ req.setTimeout(DOWNLOAD_TIMEOUT_MS, () => {
54
+ req.destroy();
55
+ reject(new Error(`Download timed out after ${DOWNLOAD_TIMEOUT_MS}ms: ${url}`));
56
+ });
52
57
  });
53
58
  }
54
59
  async function downloadSwiftFiles(cacheDir) {
@@ -172,6 +177,7 @@ function withScreenShareExtensionFiles(config, extensionName, appGroupId) {
172
177
  NSExtension: {
173
178
  NSExtensionPointIdentifier: "com.apple.broadcast-services-upload",
174
179
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).SampleHandler",
180
+ RPBroadcastProcessMode: "RPBroadcastProcessModeSampleBuffer",
175
181
  },
176
182
  };
177
183
  fs_1.default.writeFileSync(path_1.default.join(extensionPath, "Info.plist"), plist_1.default.build(extensionInfoPlist));
@@ -208,11 +214,11 @@ function withScreenSharePodfilePostInstall(config, extensionName) {
208
214
  .each do |project|
209
215
  extension_target = project.native_targets.find { |t| t.name == '${extensionName}' }
210
216
  next unless extension_target
211
- extension_target.build_configurations.each do |config|
212
- config.build_settings['CC'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
213
- config.build_settings['CXX'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
214
- config.build_settings['LD'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
215
- config.build_settings['LDPLUSPLUS'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
217
+ extension_target.build_configurations.each do |ext_config|
218
+ ext_config.build_settings['CC'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
219
+ ext_config.build_settings['CXX'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
220
+ ext_config.build_settings['LD'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
221
+ ext_config.build_settings['LDPLUSPLUS'] = '$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
216
222
  end
217
223
  project.save()
218
224
  end`;
@@ -234,7 +240,7 @@ function withScreenSharePodfilePostInstall(config, extensionName) {
234
240
  continue;
235
241
  }
236
242
  if (postInstallDepth > 0) {
237
- if (trimmed.match(/\bdo\b(\s+\|.*\|)?$/)) {
243
+ if (trimmed.match(/\bdo\b(\s+\|.*\|)?\s*$/)) {
238
244
  postInstallDepth++;
239
245
  }
240
246
  if (trimmed === "end") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-livekit-screen-share",
3
- "version": "0.1.5",
3
+ "version": "0.2.1",
4
4
  "description": "Expo config plugin for LiveKit screen sharing on iOS (Broadcast Upload Extension) and Android (foreground service)",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -21,7 +21,8 @@
21
21
  ],
22
22
  "files": [
23
23
  "build",
24
- "README.md"
24
+ "README.md",
25
+ "LICENSE"
25
26
  ],
26
27
  "scripts": {
27
28
  "build": "bun run tsc",
@@ -34,10 +35,7 @@
34
35
  },
35
36
  "dependencies": {
36
37
  "@expo/config-plugins": ">=8.0.0",
37
- "@expo/plist": ">=0.1.0",
38
- "expo": "~55.0.9",
39
- "react": "19.2.0",
40
- "react-native": "0.83.4"
38
+ "@expo/plist": ">=0.1.0"
41
39
  },
42
40
  "devDependencies": {
43
41
  "@types/node": "^25.5.0",