vdocipher-rn-bridge 1.12.1 → 1.12.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.
@@ -1,28 +0,0 @@
1
- import { NativeEventEmitter } from 'react-native';
2
-
3
- const eventEmitter = new NativeEventEmitter();
4
-
5
- const nativeEvents = ['onQueued', 'onChanged', 'onCompleted', 'onFailed', 'onDeleted'];
6
-
7
- nativeEvents.forEach((name) => {
8
- eventEmitter.addListener(name, (event) => {
9
- _emitEvent(name, event.mediaId, event.downloadStatus);
10
- });
11
- });
12
-
13
- var _eventListeners = {};
14
-
15
- var _emitEvent = (eventName, mediaId, downloadStatus) => {
16
- if (!_eventListeners[eventName]) {
17
- return;
18
- }
19
- _eventListeners[eventName].forEach((fn) => fn(mediaId, downloadStatus));
20
- };
21
-
22
- var addEventListener = (eventName, fn) => {
23
- const list = _eventListeners[eventName] = _eventListeners[eventName] || [];
24
- list.push(fn);
25
- return () => list.splice(list.findIndex((f) => f === fn), 1);
26
- };
27
-
28
- export default addEventListener;
package/index.ios.js DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * The native VdoCipher player module exposes a function 'startVideoScreen'
3
- * which takes the following parameters:
4
- *
5
- * 1. String params = json_stringify({
6
- * embedInfo: {
7
- * otp: string,
8
- * playbackInfo: string
9
- * }
10
- * })
11
- */
12
- import { NativeModules } from 'react-native';
13
- import VdoPlayerView from './VdoPlayerView';
14
-
15
- const { VdocipherRnBridge } = NativeModules;
16
-
17
- const startVideoScreen = (params) => {
18
- VdocipherRnBridge.startVideoScreen(params);
19
- }
20
-
21
- export {
22
- startVideoScreen,
23
- VdoPlayerView
24
- }