@cinecrew/cinecrew-player 0.1.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/CineCrewPlayer.podspec +22 -0
- package/LICENSE +21 -0
- package/NOTICE +6 -0
- package/README.md +574 -0
- package/android/build.gradle +48 -0
- package/android/proguard-rules.pro +29 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/yuanzhou/vlc/ReactVlcPlayerPackage.java +28 -0
- package/android/src/main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerView.java +988 -0
- package/android/src/main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerViewManager.java +208 -0
- package/android/src/main/java/com/yuanzhou/vlc/vlcplayer/VideoEventEmitter.java +136 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/app.plugin.cjs +1 -0
- package/assets/cinecrew-player-logo.svg +44 -0
- package/package.json +132 -0
- package/packages/react-native-vlc-media-player/LICENSE +21 -0
- package/packages/react-native-vlc-media-player/VLCPlayer.js +207 -0
- package/packages/react-native-vlc-media-player/expo/android/withGradleTasks.cjs +49 -0
- package/packages/react-native-vlc-media-player/expo/ios/withMobileVlcKit.cjs +28 -0
- package/packages/react-native-vlc-media-player/expo/withVlcMediaPlayer.cjs +10 -0
- package/packages/react-native-vlc-media-player/index.d.ts +354 -0
- package/packages/react-native-vlc-media-player/ios/RCTVLCPlayer/RCTVLCPlayer.h +36 -0
- package/packages/react-native-vlc-media-player/ios/RCTVLCPlayer/RCTVLCPlayer.m +635 -0
- package/packages/react-native-vlc-media-player/ios/RCTVLCPlayer/RCTVLCPlayerManager.h +5 -0
- package/packages/react-native-vlc-media-player/ios/RCTVLCPlayer/RCTVLCPlayerManager.m +100 -0
- package/src/native/InlineLivePlayer.js +321 -0
- package/src/native/MediaPlayerView.js +3093 -0
- package/src/native/customization.js +44 -0
- package/src/native/index.js +107 -0
- package/src/native/media/ElectronVideoPlayer.js +288 -0
- package/src/native/media/EmojiPickerModal.js +30 -0
- package/src/native/media/LiveChatDrawer.js +1177 -0
- package/src/native/media/LiveRecordingOverlay.js +319 -0
- package/src/native/media/WebVideoPlayer.js +320 -0
- package/src/native/media/YouTubeVideoPlayer.native.js +120 -0
- package/src/native/media/YouTubeVideoPlayer.web.js +169 -0
- package/src/native/media/player/AudioOnlyView.js +337 -0
- package/src/native/media/player/CenterControls.js +94 -0
- package/src/native/media/player/ExoVideoFallback.js +329 -0
- package/src/native/media/player/PipOverlay.js +1 -0
- package/src/native/media/player/PlayerBottomBar.js +295 -0
- package/src/native/media/player/PlayerTopBar.js +255 -0
- package/src/native/media/player/VLCBoundary.js +41 -0
- package/src/native/media/player/VerticalIndicator.js +184 -0
- package/src/native/media/player/index.js +9 -0
- package/src/native/media/player/playerConstants.js +159 -0
- package/src/native/media/web/useWebAc3AudioPlayback.native.js +6 -0
- package/src/native/media/web/useWebAc3AudioPlayback.web.js +219 -0
- package/src/native/media/web/useWebHlsPlayback.native.js +3 -0
- package/src/native/media/web/useWebHlsPlayback.web.js +66 -0
- package/src/native/media/web/useWebMediaSession.js +90 -0
- package/src/native/media/web/useWebMpegTsPlayback.native.js +3 -0
- package/src/native/media/web/useWebMpegTsPlayback.web.js +356 -0
- package/src/native/media/web/useWebVideoAspectRatio.js +52 -0
- package/src/native/media/web/webPlaybackErrors.js +4 -0
- package/src/utils/layoutUtils.js +12 -0
- package/src/utils/mediaUtils.js +7 -0
- package/src/utils/recording.js +8 -0
- package/src/utils/runtimePlatform.js +19 -0
- package/src/utils/sourceUtils.js +99 -0
- package/src/utils/youtubeHtml.js +34 -0
- package/src/web/index.js +1129 -0
- package/src/web/styles.css +378 -0
- package/types/index.d.ts +268 -0
- package/vendor/mpegts.js/LICENSE +202 -0
- package/vendor/mpegts.js/mpegts.js +3 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
package com.yuanzhou.vlc.vlcplayer;
|
|
2
|
+
|
|
3
|
+
import android.text.TextUtils;
|
|
4
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
5
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
6
|
+
import com.facebook.react.common.MapBuilder;
|
|
7
|
+
import com.facebook.react.uimanager.SimpleViewManager;
|
|
8
|
+
import com.facebook.react.uimanager.ThemedReactContext;
|
|
9
|
+
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
10
|
+
import java.util.Map;
|
|
11
|
+
import javax.annotation.Nullable;
|
|
12
|
+
|
|
13
|
+
public class ReactVlcPlayerViewManager extends SimpleViewManager<ReactVlcPlayerView> {
|
|
14
|
+
|
|
15
|
+
private static final String REACT_CLASS = "RCTVLCPlayer";
|
|
16
|
+
|
|
17
|
+
private static final String PROP_SRC = "source";
|
|
18
|
+
private static final String PROP_SRC_URI = "uri";
|
|
19
|
+
private static final String PROP_SUBTITLE_URI = "subtitleUri";
|
|
20
|
+
private static final String PROP_REPEAT = "repeat";
|
|
21
|
+
private static final String PROP_PAUSED = "paused";
|
|
22
|
+
private static final String PROP_MUTED = "muted";
|
|
23
|
+
private static final String PROP_VOLUME = "volume";
|
|
24
|
+
private static final String PROP_SEEK = "seek";
|
|
25
|
+
private static final String PROP_RESUME = "resume";
|
|
26
|
+
private static final String PROP_RATE = "rate";
|
|
27
|
+
private static final String PROP_VIDEO_ASPECT_RATIO = "videoAspectRatio";
|
|
28
|
+
private static final String PROP_AUTO_ASPECT_RATIO = "autoAspectRatio";
|
|
29
|
+
private static final String PROP_CLEAR = "clear";
|
|
30
|
+
private static final String PROP_PROGRESS_UPDATE_INTERVAL = "progressUpdateInterval";
|
|
31
|
+
private static final String PROP_TEXT_TRACK = "textTrack";
|
|
32
|
+
private static final String PROP_AUDIO_TRACK = "audioTrack";
|
|
33
|
+
private static final String PROP_ACCEPT_INVALID_CERTIFICATES = "acceptInvalidCertificates";
|
|
34
|
+
private static final String PROP_PLAY_IN_BACKGROUND = "playInBackground";
|
|
35
|
+
private static final String PROP_PLAY_WHEN_INACTIVE = "playWhenInactive";
|
|
36
|
+
|
|
37
|
+
@Override
|
|
38
|
+
public String getName() {
|
|
39
|
+
return REACT_CLASS;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@Override
|
|
43
|
+
protected ReactVlcPlayerView createViewInstance(ThemedReactContext themedReactContext) {
|
|
44
|
+
return new ReactVlcPlayerView(themedReactContext);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@Override
|
|
48
|
+
public void onDropViewInstance(ReactVlcPlayerView view) {
|
|
49
|
+
view.cleanUpResources();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@Override
|
|
53
|
+
public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
|
54
|
+
MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
|
|
55
|
+
for (String event : VideoEventEmitter.Events) {
|
|
56
|
+
builder.put(event, MapBuilder.of("registrationName", event));
|
|
57
|
+
}
|
|
58
|
+
return builder.build();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@ReactProp(name = PROP_CLEAR)
|
|
62
|
+
public void setClear(final ReactVlcPlayerView videoView, final boolean clear) {
|
|
63
|
+
videoView.cleanUpResources();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@ReactProp(name = PROP_SRC)
|
|
67
|
+
public void setSrc(final ReactVlcPlayerView videoView, @Nullable ReadableMap src) {
|
|
68
|
+
if (src == null) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
String uriString = src.hasKey(PROP_SRC_URI) ? src.getString(PROP_SRC_URI) : null;
|
|
72
|
+
if (TextUtils.isEmpty(uriString)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
videoView.setSrc(src);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@ReactProp(name = PROP_SUBTITLE_URI)
|
|
79
|
+
public void setSubtitleUri(final ReactVlcPlayerView videoView, final String subtitleUri) {
|
|
80
|
+
videoView.setSubtitleUri(subtitleUri);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@ReactProp(name = PROP_REPEAT, defaultBoolean = false)
|
|
84
|
+
public void setRepeat(final ReactVlcPlayerView videoView, final boolean repeat) {
|
|
85
|
+
videoView.setRepeatModifier(repeat);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@ReactProp(name = PROP_PROGRESS_UPDATE_INTERVAL, defaultFloat = 0f)
|
|
89
|
+
public void setInterval(final ReactVlcPlayerView videoView, final float interval) {
|
|
90
|
+
videoView.setmProgressUpdateInterval(interval);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@ReactProp(name = PROP_PAUSED, defaultBoolean = false)
|
|
94
|
+
public void setPaused(final ReactVlcPlayerView videoView, final boolean paused) {
|
|
95
|
+
videoView.setPausedModifier(paused);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@ReactProp(name = PROP_MUTED, defaultBoolean = false)
|
|
99
|
+
public void setMuted(final ReactVlcPlayerView videoView, final boolean muted) {
|
|
100
|
+
videoView.setMutedModifier(muted);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@ReactProp(name = PROP_VOLUME, defaultFloat = 1.0f)
|
|
104
|
+
public void setVolume(final ReactVlcPlayerView videoView, final float volume) {
|
|
105
|
+
videoView.setVolumeModifier((int) volume);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@ReactProp(name = PROP_SEEK)
|
|
109
|
+
public void setSeek(final ReactVlcPlayerView videoView, final float seek) {
|
|
110
|
+
videoView.setPosition(seek);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@ReactProp(name = PROP_AUTO_ASPECT_RATIO, defaultBoolean = false)
|
|
114
|
+
public void setAutoAspectRatio(final ReactVlcPlayerView videoView, final boolean autoPlay) {
|
|
115
|
+
videoView.setAutoAspectRatio(autoPlay);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@ReactProp(name = PROP_PLAY_IN_BACKGROUND, defaultBoolean = false)
|
|
119
|
+
public void setPlayInBackground(final ReactVlcPlayerView videoView, final boolean play) {
|
|
120
|
+
videoView.setPlayInBackground(play);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@ReactProp(name = PROP_PLAY_WHEN_INACTIVE, defaultBoolean = false)
|
|
124
|
+
public void setPlayWhenInactive(final ReactVlcPlayerView videoView, final boolean play) {
|
|
125
|
+
videoView.setPlayWhenInactive(play);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@ReactProp(name = PROP_RESUME, defaultBoolean = true)
|
|
129
|
+
public void setResume(final ReactVlcPlayerView videoView, final boolean autoPlay) {
|
|
130
|
+
videoView.doResume(autoPlay);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@ReactProp(name = PROP_RATE)
|
|
134
|
+
public void setRate(final ReactVlcPlayerView videoView, final float rate) {
|
|
135
|
+
videoView.setRateModifier(rate);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@ReactProp(name = PROP_VIDEO_ASPECT_RATIO)
|
|
139
|
+
public void setVideoAspectRatio(final ReactVlcPlayerView videoView, final String aspectRatio) {
|
|
140
|
+
videoView.setAspectRatio(aspectRatio);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@ReactProp(name = PROP_AUDIO_TRACK)
|
|
144
|
+
public void setAudioTrack(final ReactVlcPlayerView videoView, final int audioTrack) {
|
|
145
|
+
videoView.setAudioTrack(audioTrack);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@ReactProp(name = PROP_TEXT_TRACK)
|
|
149
|
+
public void setTextTrack(final ReactVlcPlayerView videoView, final int textTrack) {
|
|
150
|
+
videoView.setTextTrack(textTrack);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@ReactProp(name = PROP_ACCEPT_INVALID_CERTIFICATES, defaultBoolean = false)
|
|
154
|
+
public void setAcceptInvalidCertificates(
|
|
155
|
+
final ReactVlcPlayerView videoView, final boolean accept) {
|
|
156
|
+
videoView.setAcceptInvalidCertificates(accept);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
public void startRecording(final ReactVlcPlayerView videoView, final String recordingPath) {
|
|
160
|
+
videoView.startRecording(recordingPath);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
public void stopRecording(final ReactVlcPlayerView videoView) {
|
|
164
|
+
videoView.stopRecording();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public void stopPlayer(final ReactVlcPlayerView videoView) {
|
|
168
|
+
videoView.stopPlayer();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
public void snapshot(final ReactVlcPlayerView videoView, final String path) {
|
|
172
|
+
videoView.doSnapshot(path);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@Override
|
|
176
|
+
public Map<String, Integer> getCommandsMap() {
|
|
177
|
+
return MapBuilder.of(
|
|
178
|
+
"startRecording", 1,
|
|
179
|
+
"stopRecording", 2,
|
|
180
|
+
"snapshot", 3);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@Override
|
|
184
|
+
public void receiveCommand(ReactVlcPlayerView root, int commandId, @Nullable ReadableArray args) {
|
|
185
|
+
switch (commandId) {
|
|
186
|
+
case 1:
|
|
187
|
+
if (args != null && args.size() > 0 && !args.isNull(0)) {
|
|
188
|
+
String path = args.getString(0);
|
|
189
|
+
root.startRecording(path);
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
|
|
193
|
+
case 2:
|
|
194
|
+
root.stopRecording();
|
|
195
|
+
break;
|
|
196
|
+
|
|
197
|
+
case 3:
|
|
198
|
+
if (args != null && args.size() > 0 && !args.isNull(0)) {
|
|
199
|
+
String path = args.getString(0);
|
|
200
|
+
root.doSnapshot(path);
|
|
201
|
+
}
|
|
202
|
+
break;
|
|
203
|
+
|
|
204
|
+
default:
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
package com.yuanzhou.vlc.vlcplayer;
|
|
2
|
+
|
|
3
|
+
import android.view.View;
|
|
4
|
+
import androidx.annotation.StringDef;
|
|
5
|
+
import com.facebook.react.bridge.Arguments;
|
|
6
|
+
import com.facebook.react.bridge.ReactContext;
|
|
7
|
+
import com.facebook.react.bridge.WritableMap;
|
|
8
|
+
import com.facebook.react.uimanager.events.RCTEventEmitter;
|
|
9
|
+
import java.lang.annotation.Retention;
|
|
10
|
+
import java.lang.annotation.RetentionPolicy;
|
|
11
|
+
|
|
12
|
+
class VideoEventEmitter {
|
|
13
|
+
|
|
14
|
+
private final RCTEventEmitter eventEmitter;
|
|
15
|
+
|
|
16
|
+
private int viewId = View.NO_ID;
|
|
17
|
+
|
|
18
|
+
VideoEventEmitter(ReactContext reactContext) {
|
|
19
|
+
this.eventEmitter = reactContext.getJSModule(RCTEventEmitter.class);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public static final String EVENT_LOAD_START = "onVideoLoadStart";
|
|
23
|
+
public static final String EVENT_ON_OPEN = "onVideoOpen";
|
|
24
|
+
public static final String EVENT_PROGRESS = "onVideoProgress";
|
|
25
|
+
public static final String EVENT_SEEK = "onVideoSeek";
|
|
26
|
+
public static final String EVENT_END = "onVideoEnd";
|
|
27
|
+
public static final String EVENT_ON_IS_PLAYING = "onVideoPlaying";
|
|
28
|
+
public static final String EVENT_ON_VIDEO_STATE_CHANGE = "onVideoStateChange";
|
|
29
|
+
public static final String EVENT_ON_VIDEO_STOPPED = "onVideoStopped";
|
|
30
|
+
public static final String EVENT_ON_ERROR = "onVideoError";
|
|
31
|
+
public static final String EVENT_ON_VIDEO_BUFFERING = "onVideoBuffering";
|
|
32
|
+
public static final String EVENT_ON_PAUSED = "onVideoPaused";
|
|
33
|
+
public static final String EVENT_ON_LOAD = "onVideoLoad";
|
|
34
|
+
public static final String EVENT_RECORDING_STATE = "onRecordingState";
|
|
35
|
+
public static final String EVENT_ON_SNAPSHOT = "onSnapshot";
|
|
36
|
+
|
|
37
|
+
static final String[] Events = {
|
|
38
|
+
EVENT_LOAD_START,
|
|
39
|
+
EVENT_PROGRESS,
|
|
40
|
+
EVENT_SEEK,
|
|
41
|
+
EVENT_END,
|
|
42
|
+
EVENT_ON_IS_PLAYING,
|
|
43
|
+
EVENT_ON_VIDEO_STATE_CHANGE,
|
|
44
|
+
EVENT_ON_OPEN,
|
|
45
|
+
EVENT_ON_PAUSED,
|
|
46
|
+
EVENT_ON_VIDEO_BUFFERING,
|
|
47
|
+
EVENT_ON_ERROR,
|
|
48
|
+
EVENT_ON_VIDEO_STOPPED,
|
|
49
|
+
EVENT_ON_LOAD,
|
|
50
|
+
EVENT_RECORDING_STATE,
|
|
51
|
+
EVENT_ON_SNAPSHOT
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
@Retention(RetentionPolicy.SOURCE)
|
|
55
|
+
@StringDef({
|
|
56
|
+
EVENT_LOAD_START,
|
|
57
|
+
EVENT_PROGRESS,
|
|
58
|
+
EVENT_SEEK,
|
|
59
|
+
EVENT_END,
|
|
60
|
+
EVENT_ON_IS_PLAYING,
|
|
61
|
+
EVENT_ON_VIDEO_STATE_CHANGE,
|
|
62
|
+
EVENT_ON_OPEN,
|
|
63
|
+
EVENT_ON_PAUSED,
|
|
64
|
+
EVENT_ON_VIDEO_BUFFERING,
|
|
65
|
+
EVENT_ON_ERROR,
|
|
66
|
+
EVENT_ON_VIDEO_STOPPED,
|
|
67
|
+
EVENT_ON_LOAD,
|
|
68
|
+
EVENT_RECORDING_STATE,
|
|
69
|
+
EVENT_ON_SNAPSHOT
|
|
70
|
+
})
|
|
71
|
+
@interface VideoEvents {}
|
|
72
|
+
|
|
73
|
+
private static final String EVENT_PROP_ERROR = "error";
|
|
74
|
+
private static final String EVENT_PROP_ERROR_STRING = "errorString";
|
|
75
|
+
private static final String EVENT_PROP_ERROR_EXCEPTION = "exception";
|
|
76
|
+
|
|
77
|
+
void setViewId(int viewId) {
|
|
78
|
+
this.viewId = viewId;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** MideaPlayer初始化完毕回调 */
|
|
82
|
+
void loadStart() {
|
|
83
|
+
WritableMap event = Arguments.createMap();
|
|
84
|
+
receiveEvent(EVENT_LOAD_START, event);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 视频进度改变回调
|
|
89
|
+
*
|
|
90
|
+
* @param currentPosition
|
|
91
|
+
* @param bufferedDuration
|
|
92
|
+
*/
|
|
93
|
+
void progressChanged(double currentPosition, double bufferedDuration) {
|
|
94
|
+
WritableMap event = Arguments.createMap();
|
|
95
|
+
event.putDouble("currentTime", currentPosition);
|
|
96
|
+
event.putDouble("duration", bufferedDuration);
|
|
97
|
+
receiveEvent(EVENT_PROGRESS, event);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
void error(String errorString, Exception exception) {
|
|
101
|
+
WritableMap error = Arguments.createMap();
|
|
102
|
+
error.putString(EVENT_PROP_ERROR_STRING, errorString);
|
|
103
|
+
error.putString(EVENT_PROP_ERROR_EXCEPTION, exception.getMessage());
|
|
104
|
+
WritableMap event = Arguments.createMap();
|
|
105
|
+
event.putMap(EVENT_PROP_ERROR, error);
|
|
106
|
+
receiveEvent(EVENT_ON_ERROR, event);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 是否播放回调
|
|
111
|
+
*
|
|
112
|
+
* @param isPlaying
|
|
113
|
+
*/
|
|
114
|
+
void isPlaying(boolean isPlaying) {
|
|
115
|
+
WritableMap map = Arguments.createMap();
|
|
116
|
+
map.putBoolean("isPlaying", isPlaying);
|
|
117
|
+
receiveEvent(EVENT_ON_IS_PLAYING, map);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 视频状态改变回调
|
|
122
|
+
*
|
|
123
|
+
* @param map
|
|
124
|
+
*/
|
|
125
|
+
void onVideoStateChange(WritableMap map) {
|
|
126
|
+
receiveEvent(EVENT_ON_VIDEO_STATE_CHANGE, map);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
void sendEvent(WritableMap map, String event) {
|
|
130
|
+
receiveEvent(event, map);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
private void receiveEvent(@VideoEvents String type, WritableMap event) {
|
|
134
|
+
eventEmitter.receiveEvent(viewId, type, event);
|
|
135
|
+
}
|
|
136
|
+
}
|
package/app.plugin.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./packages/react-native-vlc-media-player/expo/withVlcMediaPlayer.cjs');
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="940" height="240" viewBox="0 0 940 240" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">CineCrew</title>
|
|
3
|
+
<desc id="desc">The CineCrew app brand lockup from BrowseHeaderBar: TV play icon paired with clean natural CineCrew wordmark and coral accent line.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="screen" x1="0" y1="0" x2="1" y2="1">
|
|
6
|
+
<stop offset="0" stop-color="#10264d"/>
|
|
7
|
+
<stop offset="1" stop-color="#07142c"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<linearGradient id="play" x1="0" y1="0" x2="1" y2="1">
|
|
10
|
+
<stop offset="0" stop-color="#0cb9ed"/>
|
|
11
|
+
<stop offset="1" stop-color="#0868ef"/>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
</defs>
|
|
14
|
+
|
|
15
|
+
<!-- Left Icon Mark -->
|
|
16
|
+
<g transform="translate(10, 8) scale(0.43)">
|
|
17
|
+
<rect x="9" y="9" width="494" height="494" rx="112" fill="#07132e" stroke="#294777" stroke-width="12"/>
|
|
18
|
+
<path d="M207 88 252 37M305 88l45-51" fill="none" stroke="#1487ee" stroke-linecap="round" stroke-width="13"/>
|
|
19
|
+
<circle cx="253" cy="30" r="10" fill="#138cf3"/>
|
|
20
|
+
<circle cx="355" cy="30" r="10" fill="#138cf3"/>
|
|
21
|
+
<rect x="94" y="138" width="325" height="232" rx="47" fill="url(#screen)" stroke="#0782ee" stroke-width="19"/>
|
|
22
|
+
<path d="m218 193 112 61-112 66z" fill="url(#play)"/>
|
|
23
|
+
<path d="M114 401c71 59 219 58 285 0" fill="none" stroke="#0878e9" stroke-linecap="round" stroke-width="13"/>
|
|
24
|
+
<circle cx="54" cy="254" r="17" fill="#f8fbff"/>
|
|
25
|
+
<circle cx="458" cy="254" r="17" fill="#f8fbff"/>
|
|
26
|
+
<circle cx="256" cy="438" r="17" fill="#f8fbff"/>
|
|
27
|
+
<path d="m404 55 18 36 38 5-28 26 7 38-35-19-34 19 7-38-28-26 38-5z" fill="#ff654f"/>
|
|
28
|
+
<path d="M436 137c26 37 39 85 35 126" fill="none" stroke="#ff654f" stroke-linecap="round" stroke-width="14"/>
|
|
29
|
+
</g>
|
|
30
|
+
|
|
31
|
+
<!-- BrowseHeaderBar Brand Wordmark: natural single-word kerning, no collision -->
|
|
32
|
+
<text
|
|
33
|
+
x="248"
|
|
34
|
+
y="152"
|
|
35
|
+
font-family="Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"
|
|
36
|
+
font-size="112"
|
|
37
|
+
font-weight="900"
|
|
38
|
+
letter-spacing="-1.5"
|
|
39
|
+
fill="#397fda"
|
|
40
|
+
>Cine<tspan fill="#ff9a86">Crew</tspan></text>
|
|
41
|
+
|
|
42
|
+
<!-- Brand Accent Line (brandAccentLine) -->
|
|
43
|
+
<rect x="252" y="174" width="130" height="12" rx="6" fill="#ff9a86"/>
|
|
44
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cinecrew/cinecrew-player",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Customizable cross-platform live and on-demand video player for React and React Native.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Nahush Niraj Raichura",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/nahushr/cinecrew-player.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/nahushr/cinecrew-player#readme",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"expo": {
|
|
17
|
+
"plugin": "./app.plugin.cjs"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/nahushr/cinecrew-player/issues"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"react",
|
|
24
|
+
"react-native",
|
|
25
|
+
"video-player",
|
|
26
|
+
"live-streaming",
|
|
27
|
+
"mpeg-ts",
|
|
28
|
+
"mpegts",
|
|
29
|
+
"hls",
|
|
30
|
+
"vlc",
|
|
31
|
+
"iptv"
|
|
32
|
+
],
|
|
33
|
+
"main": "./src/web/index.js",
|
|
34
|
+
"module": "./src/web/index.js",
|
|
35
|
+
"browser": "./src/web/index.js",
|
|
36
|
+
"react-native": "./src/native/index.js",
|
|
37
|
+
"types": "./types/index.d.ts",
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./types/index.d.ts",
|
|
41
|
+
"react-native": "./src/native/index.js",
|
|
42
|
+
"browser": "./src/web/index.js",
|
|
43
|
+
"default": "./src/web/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./react": {
|
|
46
|
+
"types": "./types/index.d.ts",
|
|
47
|
+
"default": "./src/web/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./electron": {
|
|
50
|
+
"types": "./types/index.d.ts",
|
|
51
|
+
"default": "./src/web/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./react-native": {
|
|
54
|
+
"types": "./types/index.d.ts",
|
|
55
|
+
"react-native": "./src/native/index.js",
|
|
56
|
+
"default": "./src/native/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./react-native-web": {
|
|
59
|
+
"types": "./types/index.d.ts",
|
|
60
|
+
"default": "./src/web/index.js"
|
|
61
|
+
},
|
|
62
|
+
"./native": {
|
|
63
|
+
"types": "./types/index.d.ts",
|
|
64
|
+
"react-native": "./src/native/index.js",
|
|
65
|
+
"default": "./src/native/index.js"
|
|
66
|
+
},
|
|
67
|
+
"./web": {
|
|
68
|
+
"types": "./types/index.d.ts",
|
|
69
|
+
"default": "./src/web/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./styles.css": "./src/web/styles.css",
|
|
72
|
+
"./app.plugin": "./app.plugin.cjs",
|
|
73
|
+
"./package.json": "./package.json"
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"src/",
|
|
77
|
+
"types/",
|
|
78
|
+
"assets/",
|
|
79
|
+
"vendor/mpegts.js/",
|
|
80
|
+
"app.plugin.cjs",
|
|
81
|
+
"CineCrewPlayer.podspec",
|
|
82
|
+
"packages/react-native-vlc-media-player/VLCPlayer.js",
|
|
83
|
+
"packages/react-native-vlc-media-player/index.d.ts",
|
|
84
|
+
"android/",
|
|
85
|
+
"packages/react-native-vlc-media-player/ios/RCTVLCPlayer/",
|
|
86
|
+
"packages/react-native-vlc-media-player/expo/",
|
|
87
|
+
"packages/react-native-vlc-media-player/LICENSE",
|
|
88
|
+
"LICENSE",
|
|
89
|
+
"NOTICE",
|
|
90
|
+
"README.md"
|
|
91
|
+
],
|
|
92
|
+
"scripts": {
|
|
93
|
+
"test": "node --test",
|
|
94
|
+
"check:types": "tsc --noEmit --skipLibCheck --strict types/index.d.ts",
|
|
95
|
+
"prepack": "npm run check:types"
|
|
96
|
+
},
|
|
97
|
+
"devDependencies": {
|
|
98
|
+
"@expo/config-plugins": "^57.0.9",
|
|
99
|
+
"@types/react": "^19.2.4",
|
|
100
|
+
"typescript": "^6.0.3"
|
|
101
|
+
},
|
|
102
|
+
"overrides": {
|
|
103
|
+
"xcode": {
|
|
104
|
+
"uuid": "^11.1.1"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"@expo/vector-icons": "^15.1.1",
|
|
109
|
+
"@hiraku-ai/react-native-emoji-picker": "^1.2.4",
|
|
110
|
+
"@mediabunny/ac3": "^1.59.0",
|
|
111
|
+
"@react-native-community/slider": "^5.2.0",
|
|
112
|
+
"expo-video": "^57.0.2",
|
|
113
|
+
"hls.js": "^1.7.3",
|
|
114
|
+
"mediabunny": "^1.59.0",
|
|
115
|
+
"react-native-safe-area-context": "^5.7.0",
|
|
116
|
+
"react-native-svg": "^15.15.4",
|
|
117
|
+
"react-native-webview": "^13.16.1",
|
|
118
|
+
"prop-types": "^15.8.1"
|
|
119
|
+
},
|
|
120
|
+
"peerDependencies": {
|
|
121
|
+
"react": ">=18",
|
|
122
|
+
"react-native": ">=0.73"
|
|
123
|
+
},
|
|
124
|
+
"peerDependenciesMeta": {
|
|
125
|
+
"react-native": {
|
|
126
|
+
"optional": true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"engines": {
|
|
130
|
+
"node": ">=20"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Brent Vatne, Baris Sencan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|