expo-libvlc-player 0.1.0

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.
Files changed (70) hide show
  1. package/.eslintrc.js +2 -0
  2. package/README.md +107 -0
  3. package/android/.gradle/9.0-milestone-1/checksums/checksums.lock +0 -0
  4. package/android/.gradle/9.0-milestone-1/fileChanges/last-build.bin +0 -0
  5. package/android/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock +0 -0
  6. package/android/.gradle/9.0-milestone-1/gc.properties +0 -0
  7. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  8. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  9. package/android/.gradle/config.properties +2 -0
  10. package/android/.gradle/ideaInitScripts/ijtgtmapper.gradle +3 -0
  11. package/android/.gradle/vcs-1/gc.properties +0 -0
  12. package/android/.idea/AndroidProjectSystem.xml +6 -0
  13. package/android/.idea/android.iml +9 -0
  14. package/android/.idea/caches/deviceStreaming.xml +835 -0
  15. package/android/.idea/deviceManager.xml +13 -0
  16. package/android/.idea/gradle.xml +13 -0
  17. package/android/.idea/misc.xml +3 -0
  18. package/android/.idea/modules.xml +8 -0
  19. package/android/.idea/runConfigurations.xml +17 -0
  20. package/android/.idea/vcs.xml +6 -0
  21. package/android/.idea/workspace.xml +72 -0
  22. package/android/build.gradle +53 -0
  23. package/android/local.properties +8 -0
  24. package/android/proguard-rules.pro +19 -0
  25. package/android/src/main/AndroidManifest.xml +4 -0
  26. package/android/src/main/java/expo/modules/libvlcplayer/AudioFocusManager.kt +210 -0
  27. package/android/src/main/java/expo/modules/libvlcplayer/VlcPlayerManager.kt +82 -0
  28. package/android/src/main/java/expo/modules/libvlcplayer/VlcPlayerModule.kt +129 -0
  29. package/android/src/main/java/expo/modules/libvlcplayer/VlcPlayerView.kt +328 -0
  30. package/android/src/main/java/expo/modules/libvlcplayer/enums/AudioMixingMode.kt +20 -0
  31. package/app.plugin.js +1 -0
  32. package/build/VlcPlayer.types.d.ts +278 -0
  33. package/build/VlcPlayer.types.d.ts.map +1 -0
  34. package/build/VlcPlayer.types.js +2 -0
  35. package/build/VlcPlayer.types.js.map +1 -0
  36. package/build/VlcPlayerModule.d.ts +6 -0
  37. package/build/VlcPlayerModule.d.ts.map +1 -0
  38. package/build/VlcPlayerModule.js +4 -0
  39. package/build/VlcPlayerModule.js.map +1 -0
  40. package/build/VlcPlayerView.d.ts +5 -0
  41. package/build/VlcPlayerView.d.ts.map +1 -0
  42. package/build/VlcPlayerView.js +36 -0
  43. package/build/VlcPlayerView.js.map +1 -0
  44. package/build/index.d.ts +4 -0
  45. package/build/index.d.ts.map +1 -0
  46. package/build/index.js +5 -0
  47. package/build/index.js.map +1 -0
  48. package/build/utils/props.d.ts +3 -0
  49. package/build/utils/props.d.ts.map +1 -0
  50. package/build/utils/props.js +11 -0
  51. package/build/utils/props.js.map +1 -0
  52. package/eslint.config.js +50 -0
  53. package/expo-module.config.json +16 -0
  54. package/ios/Enums/AudioMixingMode.swift +35 -0
  55. package/ios/ExpoLibVlcPlayer.podspec +29 -0
  56. package/ios/VlcPlayerManager.swift +116 -0
  57. package/ios/VlcPlayerModule.swift +110 -0
  58. package/ios/VlcPlayerView.swift +321 -0
  59. package/package.json +49 -0
  60. package/plugin/build/withExpoLibVlcPlayer.d.ts +3 -0
  61. package/plugin/build/withExpoLibVlcPlayer.js +18 -0
  62. package/plugin/src/withExpoLibVlcPlayer.ts +21 -0
  63. package/plugin/tsconfig.json +9 -0
  64. package/plugin/tsconfig.tsbuildinfo +1 -0
  65. package/src/VlcPlayer.types.ts +291 -0
  66. package/src/VlcPlayerModule.ts +7 -0
  67. package/src/VlcPlayerView.tsx +73 -0
  68. package/src/index.ts +4 -0
  69. package/src/utils/props.ts +20 -0
  70. package/tsconfig.json +9 -0
package/.eslintrc.js ADDED
@@ -0,0 +1,2 @@
1
+ // @generated by expo-module-scripts
2
+ module.exports = require('expo-module-scripts/eslintrc.base.js');
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ <p align="center">
2
+ <img src="https://images.videolan.org/images/VLC-IconSmall.png" alt="VLC icon">
3
+ </p>
4
+
5
+ <h1 align="center">LibVLC Player for Expo</h1>
6
+
7
+ ### Installation
8
+
9
+ Add the package to your npm dependencies
10
+
11
+ ```
12
+ npm install expo-libvlc-player
13
+ ```
14
+
15
+ ### Bare React Native projects
16
+
17
+ For bare React Native projects, you must ensure that you have [installed and configured](https://docs.expo.dev/bare/installing-expo-modules/) the `expo` package before continuing.
18
+
19
+ ### Configure for Android
20
+
21
+ No additional configuration necessary.
22
+
23
+ ### Configure for iOS
24
+
25
+ Run `npx pod-install` after installing the npm package.
26
+
27
+ ## Usage
28
+
29
+ ```tsx
30
+ import { VLCPLayerView } from "expo-libvlc-player";
31
+
32
+ return (
33
+ <View styles={{ height: 576 }}>
34
+ <VLCPlayerView
35
+ style={{ height: "100%" }}
36
+ uri="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
37
+ />
38
+ </View>
39
+ );
40
+ ```
41
+
42
+ See the [example app](example/App.tsx) for additional usage.
43
+
44
+ ### Player methods
45
+
46
+ | Prop | Description | Params |
47
+ | ------------------------ | ------------------------------------- | -------------------------------------- |
48
+ | `play()` | Starts playback of the current player | |
49
+ | `pause()` | Pauses playback of the current player | |
50
+ | `stop()` | Stops playback of the current player | |
51
+ | `seek(position: number)` | Sets position of the current player | Must be a float number between 0 and 1 |
52
+
53
+ ### Player props
54
+
55
+ The `VLCPlayerView` extends React Native `ViewProps` and implements it's own props:
56
+
57
+ | Prop | Description | Default |
58
+ | ------------------ | ----------------------------------------------------------------------------------------- | -------- |
59
+ | `uri` | Sets the URI of the media to be played | |
60
+ | `subtitle` | Sets subtitle URI and enabled state | |
61
+ | `options` | Sets the VLC options to initialize the player with | `[]` |
62
+ | `volume` | Controls the player volume, must be an integer number between `0` and `100` | `100` |
63
+ | `mute` | Sets the player volume to `0` | `false` |
64
+ | `rate` | Controls the player rate, must be a float number between `0` and `1` | `1` |
65
+ | `tracks` | Sets the player audio and subtitle tracks | |
66
+ | `repeat` | Repeats the media once playback is ended | `false` |
67
+ | `aspectRatio` | Sets the player aspect ratio, must be a valid `string` | |
68
+ | `audioMixingMode` | Determines how the player will interact with other audio playing in the system | `"auto"` |
69
+ | `playInBackground` | Determines whether the player should continue playing after the app enters the background | `false` |
70
+ | `autoplay` | Autoplays media once player is created | `true` |
71
+
72
+ #### Callback props
73
+
74
+ | Prop | Description | Payload |
75
+ | ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
76
+ | `onBuffering` | Called after the `Buffering` player event | |
77
+ | `onPlaying` | Called after the `Playing` player event | |
78
+ | `onPaused` | Called after the `Paused` player event | |
79
+ | `onStopped` | Called after the `Stopped` player event | |
80
+ | `onEnded` | Called after the `EndReached` player event | |
81
+ | `onRepeat` | Called after the player repeats the media | |
82
+ | `onWarn` | Called after the player encounters a conflict | `{ warn: string }` |
83
+ | `onError` | Called after the `EncounteredError` player event | `{ error: string }` |
84
+ | `onPositionChanged` | Called after the `PositionChanged` player event | `{ position: number }` |
85
+ | `onLoad` | Called after the `Buffering` player event | `{ width: number, height: number, aspectRatio: string, duration: number, tracks: object, seekable: boolean }` |
86
+ | `onBackground` | Called after the player enters the background | |
87
+
88
+ ## Disclaimer
89
+
90
+ **IMPORTANT:** This project is not affiliated with, endorsed by, or officially supported by VideoLAN or the VLC media player project.
91
+
92
+ The VLC logo and cone icon are trademarks of VideoLAN and are used here solely to indicate compatibility with the following VLC libraries:
93
+
94
+ - `LibVLC v3.6.2` for Android
95
+ - `MobileVLCKit v3.6.0` for iOS
96
+
97
+ This is an independent open-source implementation that provides React Native bindings for VLC's underlying media libraries.
98
+
99
+ For official VLC products and support, please visit [videolan.org](https://www.videolan.org/).
100
+
101
+ ### Credits
102
+
103
+ This project is heavily inspired by existing libraries such as [expo-video](https://github.com/expo/expo/tree/main/packages/expo-video) and [react-native-vlc-media-player](https://github.com/razorRun/react-native-vlc-media-player).
104
+
105
+ ## Contributing
106
+
107
+ Contributions are always welcome. Please raise any issues and/or fix them by creating a pull request.
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Jun 26 02:18:12 CST 2025
2
+ gradle.version=9.0-milestone-1
@@ -0,0 +1,2 @@
1
+ #Thu Jun 26 02:17:37 CST 2025
2
+ java.home=\\\\wsl.localhost\\Ubuntu\\home\\rarbit\\.sdkman\\candidates\\java\\21.0.7-tem
@@ -0,0 +1,3 @@
1
+ ext.pathMapper = [:]
2
+ ext.pathMapper.put("<<target java executable path>>", '/home/rarbit/.sdkman/candidates/java/21.0.7-tem/bin/java')
3
+ ext.mapPath = { path -> pathMapper.get(path) ?: path }
File without changes
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AndroidProjectSystem">
4
+ <option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>