expo-libvlc-player 7.1.1 → 7.1.3

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.
@@ -29,5 +29,5 @@ repositories {
29
29
  }
30
30
 
31
31
  dependencies {
32
- implementation 'org.videolan.android:libvlc-all:3.7.4'
32
+ implementation 'org.videolan.android:libvlc-all:3.7.5'
33
33
  }
@@ -1,9 +1,9 @@
1
1
  {
2
- "platforms": ["apple", "android"],
3
- "apple": {
4
- "modules": ["LibVlcPlayerModule"]
5
- },
2
+ "platforms": ["android", "apple"],
6
3
  "android": {
7
4
  "modules": ["expo.modules.libvlcplayer.LibVlcPlayerModule"]
5
+ },
6
+ "apple": {
7
+ "modules": ["LibVlcPlayerModule"]
8
8
  }
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libvlc-player",
3
- "version": "7.1.1",
3
+ "version": "7.1.3",
4
4
  "description": "LibVLC Player for Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -8,12 +8,13 @@
8
8
  "build": "node scripts/build.js",
9
9
  "clean": "node scripts/clean.js",
10
10
  "lint": "eslint src/",
11
- "prepare": "node scripts/prepare.js",
11
+ "open:android": "node scripts/open-android.js",
12
12
  "open:ios": "node scripts/open-ios.js",
13
- "open:android": "node scripts/open-android.js"
13
+ "prepare": "node scripts/prepare.js"
14
14
  },
15
15
  "keywords": [
16
16
  "react-native",
17
+ "vlc",
17
18
  "expo",
18
19
  "libvlc",
19
20
  "player",
@@ -45,8 +46,5 @@
45
46
  "expo": "*",
46
47
  "react": "*",
47
48
  "react-native": "*"
48
- },
49
- "allowScripts": {
50
- "fsevents@2.3.3": true
51
49
  }
52
50
  }
@@ -5,6 +5,19 @@ const LOCAL_NETWORK_USAGE = "Allow $(PRODUCT_NAME) to access your local network"
5
5
  const AUDIO_BACKGROUND_MODE = "audio";
6
6
  const PICTURE_CONFIG_MANIFEST = "android:supportsPictureInPicture";
7
7
  const withExpoLibVlcPlayer = (config, { localNetworkPermission, supportsPictureInPicture } = {}) => {
8
+ (0, config_plugins_1.withAndroidManifest)(config, (config) => {
9
+ const needsConfigMod = typeof supportsPictureInPicture === "boolean";
10
+ if (needsConfigMod) {
11
+ const activity = config_plugins_1.AndroidConfig.Manifest.getMainActivityOrThrow(config.modResults);
12
+ if (supportsPictureInPicture) {
13
+ activity.$[PICTURE_CONFIG_MANIFEST] = "true";
14
+ }
15
+ else {
16
+ Reflect.deleteProperty(activity.$, PICTURE_CONFIG_MANIFEST);
17
+ }
18
+ }
19
+ return config;
20
+ });
8
21
  config_plugins_1.IOSConfig.Permissions.createPermissionsPlugin({
9
22
  NSLocalNetworkUsageDescription: LOCAL_NETWORK_USAGE,
10
23
  })(config, {
@@ -24,19 +37,6 @@ const withExpoLibVlcPlayer = (config, { localNetworkPermission, supportsPictureI
24
37
  }
25
38
  return config;
26
39
  });
27
- (0, config_plugins_1.withAndroidManifest)(config, (config) => {
28
- const needsConfigMod = typeof supportsPictureInPicture === "boolean";
29
- if (needsConfigMod) {
30
- const activity = config_plugins_1.AndroidConfig.Manifest.getMainActivityOrThrow(config.modResults);
31
- if (supportsPictureInPicture) {
32
- activity.$[PICTURE_CONFIG_MANIFEST] = "true";
33
- }
34
- else {
35
- Reflect.deleteProperty(activity.$, PICTURE_CONFIG_MANIFEST);
36
- }
37
- }
38
- return config;
39
- });
40
40
  return config;
41
41
  };
42
42
  exports.default = withExpoLibVlcPlayer;
@@ -19,39 +19,39 @@ const withExpoLibVlcPlayer: ConfigPlugin<WithExpoLibVlcPlayerProps> = (
19
19
  config,
20
20
  { localNetworkPermission, supportsPictureInPicture } = {}
21
21
  ) => {
22
- IOSConfig.Permissions.createPermissionsPlugin({
23
- NSLocalNetworkUsageDescription: LOCAL_NETWORK_USAGE,
24
- })(config, {
25
- NSLocalNetworkUsageDescription: localNetworkPermission,
26
- });
27
-
28
- withInfoPlist(config, (config) => {
22
+ withAndroidManifest(config, (config) => {
29
23
  const needsConfigMod = typeof supportsPictureInPicture === "boolean";
30
24
 
31
25
  if (needsConfigMod) {
32
- const backgroundModes = config.modResults.UIBackgroundModes ?? [];
33
- const filteredModes = backgroundModes.filter((mode) => mode !== AUDIO_BACKGROUND_MODE);
26
+ const activity = AndroidConfig.Manifest.getMainActivityOrThrow(config.modResults);
34
27
 
35
28
  if (supportsPictureInPicture) {
36
- config.modResults.UIBackgroundModes = [...filteredModes, AUDIO_BACKGROUND_MODE];
29
+ activity.$[PICTURE_CONFIG_MANIFEST] = "true";
37
30
  } else {
38
- config.modResults.UIBackgroundModes = filteredModes;
31
+ Reflect.deleteProperty(activity.$, PICTURE_CONFIG_MANIFEST);
39
32
  }
40
33
  }
41
34
 
42
35
  return config;
43
36
  });
44
37
 
45
- withAndroidManifest(config, (config) => {
38
+ IOSConfig.Permissions.createPermissionsPlugin({
39
+ NSLocalNetworkUsageDescription: LOCAL_NETWORK_USAGE,
40
+ })(config, {
41
+ NSLocalNetworkUsageDescription: localNetworkPermission,
42
+ });
43
+
44
+ withInfoPlist(config, (config) => {
46
45
  const needsConfigMod = typeof supportsPictureInPicture === "boolean";
47
46
 
48
47
  if (needsConfigMod) {
49
- const activity = AndroidConfig.Manifest.getMainActivityOrThrow(config.modResults);
48
+ const backgroundModes = config.modResults.UIBackgroundModes ?? [];
49
+ const filteredModes = backgroundModes.filter((mode) => mode !== AUDIO_BACKGROUND_MODE);
50
50
 
51
51
  if (supportsPictureInPicture) {
52
- activity.$[PICTURE_CONFIG_MANIFEST] = "true";
52
+ config.modResults.UIBackgroundModes = [...filteredModes, AUDIO_BACKGROUND_MODE];
53
53
  } else {
54
- Reflect.deleteProperty(activity.$, PICTURE_CONFIG_MANIFEST);
54
+ config.modResults.UIBackgroundModes = filteredModes;
55
55
  }
56
56
  }
57
57