@100mslive/react-native-video-plugin 0.1.2
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/LICENSE +20 -0
- package/README.md +179 -0
- package/android/build.gradle +103 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/hms/reactnativevideoplugin/ReactNativeVideoPluginModule.kt +203 -0
- package/android/src/main/java/com/hms/reactnativevideoplugin/ReactNativeVideoPluginPackage.kt +16 -0
- package/lib/commonjs/HMSVideoFilterPlugin.js +47 -0
- package/lib/commonjs/HMSVideoFilterPlugin.js.map +1 -0
- package/lib/commonjs/HMSVideoPlugin.js +56 -0
- package/lib/commonjs/HMSVideoPlugin.js.map +1 -0
- package/lib/commonjs/HMSVirtualBackgroundPlugin.js +63 -0
- package/lib/commonjs/HMSVirtualBackgroundPlugin.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/modules/ReactNativeVideoPluginModule.js +25 -0
- package/lib/commonjs/modules/ReactNativeVideoPluginModule.js.map +1 -0
- package/lib/module/HMSVideoFilterPlugin.js +40 -0
- package/lib/module/HMSVideoFilterPlugin.js.map +1 -0
- package/lib/module/HMSVideoPlugin.js +49 -0
- package/lib/module/HMSVideoPlugin.js.map +1 -0
- package/lib/module/HMSVirtualBackgroundPlugin.js +56 -0
- package/lib/module/HMSVirtualBackgroundPlugin.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/ReactNativeVideoPluginModule.js +19 -0
- package/lib/module/modules/ReactNativeVideoPluginModule.js.map +1 -0
- package/lib/typescript/HMSVideoFilterPlugin.d.ts +15 -0
- package/lib/typescript/HMSVideoFilterPlugin.d.ts.map +1 -0
- package/lib/typescript/HMSVideoPlugin.d.ts +16 -0
- package/lib/typescript/HMSVideoPlugin.d.ts.map +1 -0
- package/lib/typescript/HMSVirtualBackgroundPlugin.d.ts +30 -0
- package/lib/typescript/HMSVirtualBackgroundPlugin.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/modules/ReactNativeVideoPluginModule.d.ts +4 -0
- package/lib/typescript/modules/ReactNativeVideoPluginModule.d.ts.map +1 -0
- package/package.json +235 -0
- package/sdk-versions.json +3 -0
- package/src/HMSVideoFilterPlugin.ts +52 -0
- package/src/HMSVideoPlugin.ts +63 -0
- package/src/HMSVirtualBackgroundPlugin.ts +66 -0
- package/src/index.ts +2 -0
- package/src/modules/ReactNativeVideoPluginModule.ts +33 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HMSVirtualBackgroundPlugin = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _HMSVideoPlugin = require("./HMSVideoPlugin");
|
|
9
|
+
class HMSVirtualBackgroundPlugin extends _HMSVideoPlugin.HMSVideoPlugin {
|
|
10
|
+
static NAME = 'HMSVirtualBackgroundPlugin';
|
|
11
|
+
constructor() {
|
|
12
|
+
super(HMSVirtualBackgroundPlugin.NAME);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Sets Blur as background
|
|
17
|
+
* @returns {Promise<boolean>} A promise that resolves to true when blur effect has been applied as background, otherwise, rejected promise is returned
|
|
18
|
+
*/
|
|
19
|
+
setBlur(blurRadius) {
|
|
20
|
+
const data = {
|
|
21
|
+
id: '12345',
|
|
22
|
+
background: {
|
|
23
|
+
type: 'blur',
|
|
24
|
+
blurRadius
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return this.nativeModule.changeVirtualBackground(data);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Sets provided image as background
|
|
32
|
+
* @param backgroundImage An image to apply as background on
|
|
33
|
+
* @returns {Promise<boolean>} A promise that resolves to true when provided background image has been applied as background, otherwise, rejected promise is returned
|
|
34
|
+
*
|
|
35
|
+
* Example Usage:
|
|
36
|
+
* ```
|
|
37
|
+
* // Create instance of `HMSVirtualBackgroundPlugin` class
|
|
38
|
+
* const hmsVirtualBackgroundPlugin = HMSVirtualBackgroundPlugin();
|
|
39
|
+
* ...
|
|
40
|
+
* // In ON_PREVIEW or ON_JOIN event callback method
|
|
41
|
+
* const image = require('path to image file');
|
|
42
|
+
* hmsVirtualBackgroundPlugin.setBackground(image);
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
setBackground(backgroundImage) {
|
|
48
|
+
const background = resolveBackground(backgroundImage);
|
|
49
|
+
const data = {
|
|
50
|
+
id: '12345',
|
|
51
|
+
background
|
|
52
|
+
};
|
|
53
|
+
return this.nativeModule.changeVirtualBackground(data);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.HMSVirtualBackgroundPlugin = HMSVirtualBackgroundPlugin;
|
|
57
|
+
function resolveBackground(background) {
|
|
58
|
+
return {
|
|
59
|
+
type: 'image',
|
|
60
|
+
source: _reactNative.Image.resolveAssetSource(background)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=HMSVirtualBackgroundPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_HMSVideoPlugin","HMSVirtualBackgroundPlugin","HMSVideoPlugin","NAME","constructor","setBlur","blurRadius","data","id","background","type","nativeModule","changeVirtualBackground","setBackground","backgroundImage","resolveBackground","exports","source","Image","resolveAssetSource"],"sourceRoot":"../../src","sources":["HMSVirtualBackgroundPlugin.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,eAAA,GAAAD,OAAA;AAEO,MAAME,0BAA0B,SAASC,8BAAc,CAAC;EAC7D,OAAOC,IAAI,GAAG,4BAA4B;EAE1CC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAACH,0BAA0B,CAACE,IAAI,CAAC;EACxC;;EAEA;AACF;AACA;AACA;EACEE,OAAOA,CAACC,UAAkB,EAAoB;IAC5C,MAAMC,IAAI,GAAG;MACXC,EAAE,EAAE,OAAO;MACXC,UAAU,EAAE;QAAEC,IAAI,EAAE,MAAM;QAAEJ;MAAW;IACzC,CAAC;IACD,OAAO,IAAI,CAACK,YAAY,CAACC,uBAAuB,CAACL,IAAI,CAAC;EACxD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEM,aAAaA,CACXC,eAAoD,EAClC;IAClB,MAAML,UAAU,GAAGM,iBAAiB,CAACD,eAAe,CAAC;IACrD,MAAMP,IAAI,GAAG;MACXC,EAAE,EAAE,OAAO;MACXC;IACF,CAAC;IACD,OAAO,IAAI,CAACE,YAAY,CAACC,uBAAuB,CAACL,IAAI,CAAC;EACxD;AACF;AAACS,OAAA,CAAAf,0BAAA,GAAAA,0BAAA;AAED,SAASc,iBAAiBA,CAACN,UAA+C,EAGxE;EACA,OAAO;IACLC,IAAI,EAAE,OAAO;IACbO,MAAM,EAAEC,kBAAK,CAACC,kBAAkB,CAACV,UAAU;EAC7C,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _HMSVirtualBackgroundPlugin = require("./HMSVirtualBackgroundPlugin");
|
|
7
|
+
Object.keys(_HMSVirtualBackgroundPlugin).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _HMSVirtualBackgroundPlugin[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _HMSVirtualBackgroundPlugin[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _ReactNativeVideoPluginModule = require("./modules/ReactNativeVideoPluginModule");
|
|
18
|
+
Object.keys(_ReactNativeVideoPluginModule).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _ReactNativeVideoPluginModule[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _ReactNativeVideoPluginModule[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_HMSVirtualBackgroundPlugin","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_ReactNativeVideoPluginModule"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,2BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,2BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,2BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,6BAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,6BAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,6BAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,6BAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ReactNativeVideoPlugin = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
const LINKING_ERROR = `The package '@100mslive/react-native-video-plugin' doesn't seem to be linked. Make sure: \n\n` +
|
|
9
|
+
// Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
10
|
+
'- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
11
|
+
const IOS_PLATFORM_ERROR = 'ReactNativeVideoPlugin native module is not available on iOS. Please add a `Platform.OS` check like: \n\n' + '```\n' + 'Platform.OS === "android" ? ReactNativeVideoPlugin.nativeModule : null\n' + '```';
|
|
12
|
+
const ReactNativeVideoPluginModule = _reactNative.NativeModules.ReactNativeVideoPlugin;
|
|
13
|
+
const ReactNativeVideoPlugin = exports.ReactNativeVideoPlugin = {
|
|
14
|
+
get nativeModule() {
|
|
15
|
+
if (ReactNativeVideoPluginModule) {
|
|
16
|
+
return ReactNativeVideoPluginModule;
|
|
17
|
+
}
|
|
18
|
+
return new Proxy({}, {
|
|
19
|
+
get() {
|
|
20
|
+
throw new Error(_reactNative.Platform.OS === 'android' ? LINKING_ERROR : IOS_PLATFORM_ERROR);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=ReactNativeVideoPluginModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","LINKING_ERROR","IOS_PLATFORM_ERROR","ReactNativeVideoPluginModule","NativeModules","ReactNativeVideoPlugin","exports","nativeModule","Proxy","get","Error","Platform","OS"],"sourceRoot":"../../../src","sources":["modules/ReactNativeVideoPluginModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,aAAa,GACjB,+FAA+F;AAC/F;AACA,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,kBAAkB,GACtB,2GAA2G,GAC3G,OAAO,GACP,0EAA0E,GAC1E,KAAK;AAEP,MAAMC,4BAA4B,GAAGC,0BAAa,CAACC,sBAAsB;AAElE,MAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG;EACpC,IAAIE,YAAYA,CAAA,EAAG;IACjB,IAAIJ,4BAA4B,EAAE;MAChC,OAAOA,4BAA4B;IACrC;IACA,OAAO,IAAIK,KAAK,CACd,CAAC,CAAC,EACF;MACEC,GAAGA,CAAA,EAAG;QACJ,MAAM,IAAIC,KAAK,CACbC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAGX,aAAa,GAAGC,kBAC9C,CAAC;MACH;IACF,CACF,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { HMSVideoPlugin } from './HMSVideoPlugin';
|
|
2
|
+
export class HMSVideoFilterPlugin extends HMSVideoPlugin {
|
|
3
|
+
static NAME = 'HMSVideoFilterPlugin';
|
|
4
|
+
constructor() {
|
|
5
|
+
super(HMSVideoFilterPlugin.NAME);
|
|
6
|
+
}
|
|
7
|
+
setHue(val) {
|
|
8
|
+
return this.setFilter('hue', val);
|
|
9
|
+
}
|
|
10
|
+
setSaturation(val) {
|
|
11
|
+
return this.setFilter('saturation', val);
|
|
12
|
+
}
|
|
13
|
+
setBrightness(val) {
|
|
14
|
+
return this.setFilter('brightness', val);
|
|
15
|
+
}
|
|
16
|
+
setContrast(val) {
|
|
17
|
+
return this.setFilter('contrast', val);
|
|
18
|
+
}
|
|
19
|
+
setSmoothness(val) {
|
|
20
|
+
return this.setFilter('smoothness', val);
|
|
21
|
+
}
|
|
22
|
+
setRedness(val) {
|
|
23
|
+
return this.setFilter('redness', val);
|
|
24
|
+
}
|
|
25
|
+
setSharpness(val) {
|
|
26
|
+
return this.setFilter('sharpness', val);
|
|
27
|
+
}
|
|
28
|
+
setExposure(val) {
|
|
29
|
+
return this.setFilter('exposure', val);
|
|
30
|
+
}
|
|
31
|
+
setFilter(filter, value) {
|
|
32
|
+
const data = {
|
|
33
|
+
id: '12345',
|
|
34
|
+
filter,
|
|
35
|
+
value
|
|
36
|
+
};
|
|
37
|
+
return this.nativeModule.setVideoFilterParameter(data);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=HMSVideoFilterPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HMSVideoPlugin","HMSVideoFilterPlugin","NAME","constructor","setHue","val","setFilter","setSaturation","setBrightness","setContrast","setSmoothness","setRedness","setSharpness","setExposure","filter","value","data","id","nativeModule","setVideoFilterParameter"],"sourceRoot":"../../src","sources":["HMSVideoFilterPlugin.ts"],"mappings":"AAAA,SAASA,cAAc,QAAQ,kBAAkB;AAYjD,OAAO,MAAMC,oBAAoB,SAASD,cAAc,CAAC;EACvD,OAAOE,IAAI,GAAG,sBAAsB;EAEpCC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAACF,oBAAoB,CAACC,IAAI,CAAC;EAClC;EAEAE,MAAMA,CAACC,GAAW,EAAE;IAClB,OAAO,IAAI,CAACC,SAAS,CAAC,KAAK,EAAED,GAAG,CAAC;EACnC;EACAE,aAAaA,CAACF,GAAW,EAAE;IACzB,OAAO,IAAI,CAACC,SAAS,CAAC,YAAY,EAAED,GAAG,CAAC;EAC1C;EACAG,aAAaA,CAACH,GAAW,EAAE;IACzB,OAAO,IAAI,CAACC,SAAS,CAAC,YAAY,EAAED,GAAG,CAAC;EAC1C;EACAI,WAAWA,CAACJ,GAAW,EAAE;IACvB,OAAO,IAAI,CAACC,SAAS,CAAC,UAAU,EAAED,GAAG,CAAC;EACxC;EACAK,aAAaA,CAACL,GAAW,EAAE;IACzB,OAAO,IAAI,CAACC,SAAS,CAAC,YAAY,EAAED,GAAG,CAAC;EAC1C;EACAM,UAAUA,CAACN,GAAW,EAAE;IACtB,OAAO,IAAI,CAACC,SAAS,CAAC,SAAS,EAAED,GAAG,CAAC;EACvC;EACAO,YAAYA,CAACP,GAAW,EAAE;IACxB,OAAO,IAAI,CAACC,SAAS,CAAC,WAAW,EAAED,GAAG,CAAC;EACzC;EACAQ,WAAWA,CAACR,GAAW,EAAE;IACvB,OAAO,IAAI,CAACC,SAAS,CAAC,UAAU,EAAED,GAAG,CAAC;EACxC;EACQC,SAASA,CAACQ,MAAwB,EAAEC,KAAa,EAAoB;IAC3E,MAAMC,IAAI,GAAG;MACXC,EAAE,EAAE,OAAO;MACXH,MAAM;MACNC;IACF,CAAC;IACD,OAAO,IAAI,CAACG,YAAY,CAACC,uBAAuB,CAACH,IAAI,CAAC;EACxD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { HMSManagerModule } from '@100mslive/react-native-hms';
|
|
3
|
+
import { ReactNativeVideoPlugin } from './modules/ReactNativeVideoPluginModule';
|
|
4
|
+
const _nativeModule = Platform.OS === 'android' ? ReactNativeVideoPlugin.nativeModule : HMSManagerModule;
|
|
5
|
+
export class HMSVideoPlugin {
|
|
6
|
+
constructor(pluginType) {
|
|
7
|
+
this.type = pluginType;
|
|
8
|
+
}
|
|
9
|
+
get nativeModule() {
|
|
10
|
+
return _nativeModule;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Enables video plugin.
|
|
15
|
+
* @returns {Promise<boolean>} A promise that resolves to true when video plugin is enabled, otherwise, rejected promise is returned
|
|
16
|
+
*/
|
|
17
|
+
async enable() {
|
|
18
|
+
const data = {
|
|
19
|
+
id: '12345',
|
|
20
|
+
type: this.type
|
|
21
|
+
};
|
|
22
|
+
if (__DEV__) console.log('#Function HMSVirtualBackgroundPlugin#enable', data);
|
|
23
|
+
try {
|
|
24
|
+
return this.nativeModule.enableVideoPlugin(data);
|
|
25
|
+
} catch (e) {
|
|
26
|
+
if (__DEV__) console.warn('#Error in #Function HMSVirtualBackgroundPlugin#enable ', e);
|
|
27
|
+
return Promise.reject(e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Disable video plugin.
|
|
33
|
+
* @returns {Promise<boolean>} A promise that resolves to true when video plugin is disabled, otherwise, rejected promise is returned
|
|
34
|
+
*/
|
|
35
|
+
async disable() {
|
|
36
|
+
const data = {
|
|
37
|
+
id: '12345',
|
|
38
|
+
type: this.type
|
|
39
|
+
};
|
|
40
|
+
if (__DEV__) console.log('#Function HMSVirtualBackgroundPlugin#disable', data);
|
|
41
|
+
try {
|
|
42
|
+
return this.nativeModule.disableVideoPlugin(data);
|
|
43
|
+
} catch (e) {
|
|
44
|
+
if (__DEV__) console.warn('#Error in #Function HMSVirtualBackgroundPlugin#disable ', e);
|
|
45
|
+
return Promise.reject(e);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=HMSVideoPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","HMSManagerModule","ReactNativeVideoPlugin","_nativeModule","OS","nativeModule","HMSVideoPlugin","constructor","pluginType","type","enable","data","id","__DEV__","console","log","enableVideoPlugin","e","warn","Promise","reject","disable","disableVideoPlugin"],"sourceRoot":"../../src","sources":["HMSVideoPlugin.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,gBAAgB,QAAQ,6BAA6B;AAE9D,SAASC,sBAAsB,QAAQ,wCAAwC;AAE/E,MAAMC,aAAa,GACjBH,QAAQ,CAACI,EAAE,KAAK,SAAS,GACrBF,sBAAsB,CAACG,YAAY,GACnCJ,gBAAgB;AAEtB,OAAO,MAAMK,cAAc,CAAC;EAG1BC,WAAWA,CAACC,UAAkB,EAAE;IAC9B,IAAI,CAACC,IAAI,GAAGD,UAAU;EACxB;EAEA,IAAcH,YAAYA,CAAA,EAAG;IAC3B,OAAOF,aAAa;EACtB;;EAEA;AACF;AACA;AACA;EACE,MAAMO,MAAMA,CAAA,EAAqB;IAC/B,MAAMC,IAAI,GAAG;MAAEC,EAAE,EAAE,OAAO;MAAEH,IAAI,EAAE,IAAI,CAACA;IAAK,CAAC;IAC7C,IAAII,OAAO,EACTC,OAAO,CAACC,GAAG,CAAC,6CAA6C,EAAEJ,IAAI,CAAC;IAElE,IAAI;MACF,OAAO,IAAI,CAACN,YAAY,CAACW,iBAAiB,CAACL,IAAI,CAAC;IAClD,CAAC,CAAC,OAAOM,CAAC,EAAE;MACV,IAAIJ,OAAO,EACTC,OAAO,CAACI,IAAI,CACV,wDAAwD,EACxDD,CACF,CAAC;MACH,OAAOE,OAAO,CAACC,MAAM,CAACH,CAAC,CAAC;IAC1B;EACF;;EAEA;AACF;AACA;AACA;EACE,MAAMI,OAAOA,CAAA,EAAqB;IAChC,MAAMV,IAAI,GAAG;MAAEC,EAAE,EAAE,OAAO;MAAEH,IAAI,EAAE,IAAI,CAACA;IAAK,CAAC;IAC7C,IAAII,OAAO,EACTC,OAAO,CAACC,GAAG,CAAC,8CAA8C,EAAEJ,IAAI,CAAC;IAEnE,IAAI;MACF,OAAO,IAAI,CAACN,YAAY,CAACiB,kBAAkB,CAACX,IAAI,CAAC;IACnD,CAAC,CAAC,OAAOM,CAAC,EAAE;MACV,IAAIJ,OAAO,EACTC,OAAO,CAACI,IAAI,CACV,yDAAyD,EACzDD,CACF,CAAC;MACH,OAAOE,OAAO,CAACC,MAAM,CAACH,CAAC,CAAC;IAC1B;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Image } from 'react-native';
|
|
2
|
+
import { HMSVideoPlugin } from './HMSVideoPlugin';
|
|
3
|
+
export class HMSVirtualBackgroundPlugin extends HMSVideoPlugin {
|
|
4
|
+
static NAME = 'HMSVirtualBackgroundPlugin';
|
|
5
|
+
constructor() {
|
|
6
|
+
super(HMSVirtualBackgroundPlugin.NAME);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Sets Blur as background
|
|
11
|
+
* @returns {Promise<boolean>} A promise that resolves to true when blur effect has been applied as background, otherwise, rejected promise is returned
|
|
12
|
+
*/
|
|
13
|
+
setBlur(blurRadius) {
|
|
14
|
+
const data = {
|
|
15
|
+
id: '12345',
|
|
16
|
+
background: {
|
|
17
|
+
type: 'blur',
|
|
18
|
+
blurRadius
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return this.nativeModule.changeVirtualBackground(data);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Sets provided image as background
|
|
26
|
+
* @param backgroundImage An image to apply as background on
|
|
27
|
+
* @returns {Promise<boolean>} A promise that resolves to true when provided background image has been applied as background, otherwise, rejected promise is returned
|
|
28
|
+
*
|
|
29
|
+
* Example Usage:
|
|
30
|
+
* ```
|
|
31
|
+
* // Create instance of `HMSVirtualBackgroundPlugin` class
|
|
32
|
+
* const hmsVirtualBackgroundPlugin = HMSVirtualBackgroundPlugin();
|
|
33
|
+
* ...
|
|
34
|
+
* // In ON_PREVIEW or ON_JOIN event callback method
|
|
35
|
+
* const image = require('path to image file');
|
|
36
|
+
* hmsVirtualBackgroundPlugin.setBackground(image);
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
setBackground(backgroundImage) {
|
|
42
|
+
const background = resolveBackground(backgroundImage);
|
|
43
|
+
const data = {
|
|
44
|
+
id: '12345',
|
|
45
|
+
background
|
|
46
|
+
};
|
|
47
|
+
return this.nativeModule.changeVirtualBackground(data);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function resolveBackground(background) {
|
|
51
|
+
return {
|
|
52
|
+
type: 'image',
|
|
53
|
+
source: Image.resolveAssetSource(background)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=HMSVirtualBackgroundPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Image","HMSVideoPlugin","HMSVirtualBackgroundPlugin","NAME","constructor","setBlur","blurRadius","data","id","background","type","nativeModule","changeVirtualBackground","setBackground","backgroundImage","resolveBackground","source","resolveAssetSource"],"sourceRoot":"../../src","sources":["HMSVirtualBackgroundPlugin.ts"],"mappings":"AAAA,SAASA,KAAK,QAAQ,cAAc;AAOpC,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,0BAA0B,SAASD,cAAc,CAAC;EAC7D,OAAOE,IAAI,GAAG,4BAA4B;EAE1CC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAACF,0BAA0B,CAACC,IAAI,CAAC;EACxC;;EAEA;AACF;AACA;AACA;EACEE,OAAOA,CAACC,UAAkB,EAAoB;IAC5C,MAAMC,IAAI,GAAG;MACXC,EAAE,EAAE,OAAO;MACXC,UAAU,EAAE;QAAEC,IAAI,EAAE,MAAM;QAAEJ;MAAW;IACzC,CAAC;IACD,OAAO,IAAI,CAACK,YAAY,CAACC,uBAAuB,CAACL,IAAI,CAAC;EACxD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEM,aAAaA,CACXC,eAAoD,EAClC;IAClB,MAAML,UAAU,GAAGM,iBAAiB,CAACD,eAAe,CAAC;IACrD,MAAMP,IAAI,GAAG;MACXC,EAAE,EAAE,OAAO;MACXC;IACF,CAAC;IACD,OAAO,IAAI,CAACE,YAAY,CAACC,uBAAuB,CAACL,IAAI,CAAC;EACxD;AACF;AAEA,SAASQ,iBAAiBA,CAACN,UAA+C,EAGxE;EACA,OAAO;IACLC,IAAI,EAAE,OAAO;IACbM,MAAM,EAAEhB,KAAK,CAACiB,kBAAkB,CAACR,UAAU;EAC7C,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,cAAc,8BAA8B;AAC5C,cAAc,wCAAwC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NativeModules, Platform } from 'react-native';
|
|
2
|
+
const LINKING_ERROR = `The package '@100mslive/react-native-video-plugin' doesn't seem to be linked. Make sure: \n\n` +
|
|
3
|
+
// Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
4
|
+
'- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
5
|
+
const IOS_PLATFORM_ERROR = 'ReactNativeVideoPlugin native module is not available on iOS. Please add a `Platform.OS` check like: \n\n' + '```\n' + 'Platform.OS === "android" ? ReactNativeVideoPlugin.nativeModule : null\n' + '```';
|
|
6
|
+
const ReactNativeVideoPluginModule = NativeModules.ReactNativeVideoPlugin;
|
|
7
|
+
export const ReactNativeVideoPlugin = {
|
|
8
|
+
get nativeModule() {
|
|
9
|
+
if (ReactNativeVideoPluginModule) {
|
|
10
|
+
return ReactNativeVideoPluginModule;
|
|
11
|
+
}
|
|
12
|
+
return new Proxy({}, {
|
|
13
|
+
get() {
|
|
14
|
+
throw new Error(Platform.OS === 'android' ? LINKING_ERROR : IOS_PLATFORM_ERROR);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=ReactNativeVideoPluginModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","IOS_PLATFORM_ERROR","ReactNativeVideoPluginModule","ReactNativeVideoPlugin","nativeModule","Proxy","get","Error","OS"],"sourceRoot":"../../../src","sources":["modules/ReactNativeVideoPluginModule.ts"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GACjB,+FAA+F;AAC/F;AACA,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,kBAAkB,GACtB,2GAA2G,GAC3G,OAAO,GACP,0EAA0E,GAC1E,KAAK;AAEP,MAAMC,4BAA4B,GAAGJ,aAAa,CAACK,sBAAsB;AAEzE,OAAO,MAAMA,sBAAsB,GAAG;EACpC,IAAIC,YAAYA,CAAA,EAAG;IACjB,IAAIF,4BAA4B,EAAE;MAChC,OAAOA,4BAA4B;IACrC;IACA,OAAO,IAAIG,KAAK,CACd,CAAC,CAAC,EACF;MACEC,GAAGA,CAAA,EAAG;QACJ,MAAM,IAAIC,KAAK,CACbR,QAAQ,CAACS,EAAE,KAAK,SAAS,GAAGR,aAAa,GAAGC,kBAC9C,CAAC;MACH;IACF,CACF,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HMSVideoPlugin } from './HMSVideoPlugin';
|
|
2
|
+
export declare class HMSVideoFilterPlugin extends HMSVideoPlugin {
|
|
3
|
+
static NAME: string;
|
|
4
|
+
constructor();
|
|
5
|
+
setHue(val: number): Promise<boolean>;
|
|
6
|
+
setSaturation(val: number): Promise<boolean>;
|
|
7
|
+
setBrightness(val: number): Promise<boolean>;
|
|
8
|
+
setContrast(val: number): Promise<boolean>;
|
|
9
|
+
setSmoothness(val: number): Promise<boolean>;
|
|
10
|
+
setRedness(val: number): Promise<boolean>;
|
|
11
|
+
setSharpness(val: number): Promise<boolean>;
|
|
12
|
+
setExposure(val: number): Promise<boolean>;
|
|
13
|
+
private setFilter;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=HMSVideoFilterPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HMSVideoFilterPlugin.d.ts","sourceRoot":"","sources":["../../src/HMSVideoFilterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAYlD,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,MAAM,CAAC,IAAI,SAA0B;;IAMrC,MAAM,CAAC,GAAG,EAAE,MAAM;IAGlB,aAAa,CAAC,GAAG,EAAE,MAAM;IAGzB,aAAa,CAAC,GAAG,EAAE,MAAM;IAGzB,WAAW,CAAC,GAAG,EAAE,MAAM;IAGvB,aAAa,CAAC,GAAG,EAAE,MAAM;IAGzB,UAAU,CAAC,GAAG,EAAE,MAAM;IAGtB,YAAY,CAAC,GAAG,EAAE,MAAM;IAGxB,WAAW,CAAC,GAAG,EAAE,MAAM;IAGvB,OAAO,CAAC,SAAS;CAQlB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class HMSVideoPlugin {
|
|
2
|
+
protected type: string;
|
|
3
|
+
constructor(pluginType: string);
|
|
4
|
+
protected get nativeModule(): any;
|
|
5
|
+
/**
|
|
6
|
+
* Enables video plugin.
|
|
7
|
+
* @returns {Promise<boolean>} A promise that resolves to true when video plugin is enabled, otherwise, rejected promise is returned
|
|
8
|
+
*/
|
|
9
|
+
enable(): Promise<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Disable video plugin.
|
|
12
|
+
* @returns {Promise<boolean>} A promise that resolves to true when video plugin is disabled, otherwise, rejected promise is returned
|
|
13
|
+
*/
|
|
14
|
+
disable(): Promise<boolean>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=HMSVideoPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HMSVideoPlugin.d.ts","sourceRoot":"","sources":["../../src/HMSVideoPlugin.ts"],"names":[],"mappings":"AAUA,qBAAa,cAAc;IACzB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEX,UAAU,EAAE,MAAM;IAI9B,SAAS,KAAK,YAAY,QAEzB;IAED;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAiBhC;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;CAgBlC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ImageRequireSource, ImageURISource } from 'react-native';
|
|
2
|
+
import { HMSVideoPlugin } from './HMSVideoPlugin';
|
|
3
|
+
export declare class HMSVirtualBackgroundPlugin extends HMSVideoPlugin {
|
|
4
|
+
static NAME: string;
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Sets Blur as background
|
|
8
|
+
* @returns {Promise<boolean>} A promise that resolves to true when blur effect has been applied as background, otherwise, rejected promise is returned
|
|
9
|
+
*/
|
|
10
|
+
setBlur(blurRadius: number): Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Sets provided image as background
|
|
13
|
+
* @param backgroundImage An image to apply as background on
|
|
14
|
+
* @returns {Promise<boolean>} A promise that resolves to true when provided background image has been applied as background, otherwise, rejected promise is returned
|
|
15
|
+
*
|
|
16
|
+
* Example Usage:
|
|
17
|
+
* ```
|
|
18
|
+
* // Create instance of `HMSVirtualBackgroundPlugin` class
|
|
19
|
+
* const hmsVirtualBackgroundPlugin = HMSVirtualBackgroundPlugin();
|
|
20
|
+
* ...
|
|
21
|
+
* // In ON_PREVIEW or ON_JOIN event callback method
|
|
22
|
+
* const image = require('path to image file');
|
|
23
|
+
* hmsVirtualBackgroundPlugin.setBackground(image);
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
setBackground(backgroundImage: ImageURISource | ImageRequireSource): Promise<boolean>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=HMSVirtualBackgroundPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HMSVirtualBackgroundPlugin.d.ts","sourceRoot":"","sources":["../../src/HMSVirtualBackgroundPlugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAElB,cAAc,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D,MAAM,CAAC,IAAI,SAAgC;;IAM3C;;;OAGG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ7C;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CACX,eAAe,EAAE,cAAc,GAAG,kBAAkB,GACnD,OAAO,CAAC,OAAO,CAAC;CAQpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactNativeVideoPluginModule.d.ts","sourceRoot":"","sources":["../../../src/modules/ReactNativeVideoPluginModule.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,sBAAsB;;CAgBlC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@100mslive/react-native-video-plugin",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "HMSSDK now provides support for Virtual Background using @100mslive/react-native-video-plugin. It allows users to change their background during a call. Users can choose from a variety of backgrounds or upload their own custom background. It also provides a feature to blur the background.",
|
|
5
|
+
"main": "lib/commonjs/index",
|
|
6
|
+
"module": "lib/module/index",
|
|
7
|
+
"types": "lib/typescript/index.d.ts",
|
|
8
|
+
"react-native": "src/index",
|
|
9
|
+
"source": "src/index",
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"lib",
|
|
13
|
+
"android",
|
|
14
|
+
"ios",
|
|
15
|
+
"cpp",
|
|
16
|
+
"sdk-versions.json",
|
|
17
|
+
"*.podspec",
|
|
18
|
+
"!ios/build",
|
|
19
|
+
"!android/build",
|
|
20
|
+
"!android/gradle",
|
|
21
|
+
"!android/gradlew",
|
|
22
|
+
"!android/gradlew.bat",
|
|
23
|
+
"!android/local.properties",
|
|
24
|
+
"!**/__tests__",
|
|
25
|
+
"!**/__fixtures__",
|
|
26
|
+
"!**/__mocks__",
|
|
27
|
+
"!**/.*"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"example": "yarn workspace @100mslive/react-native-video-plugin-example",
|
|
31
|
+
"test": "jest",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
34
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
35
|
+
"prepack": "bob build",
|
|
36
|
+
"release": "release-it"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"react-native",
|
|
40
|
+
"ios",
|
|
41
|
+
"android",
|
|
42
|
+
"video",
|
|
43
|
+
"live",
|
|
44
|
+
"stream",
|
|
45
|
+
"100ms",
|
|
46
|
+
"audio",
|
|
47
|
+
"webinar",
|
|
48
|
+
"classroom",
|
|
49
|
+
"event",
|
|
50
|
+
"virtual",
|
|
51
|
+
"yoga",
|
|
52
|
+
"studio",
|
|
53
|
+
"room",
|
|
54
|
+
"telehealth",
|
|
55
|
+
"meetup",
|
|
56
|
+
"game",
|
|
57
|
+
"recording",
|
|
58
|
+
"waiting",
|
|
59
|
+
"music",
|
|
60
|
+
"rtmp",
|
|
61
|
+
"broadcast",
|
|
62
|
+
"chat",
|
|
63
|
+
"native",
|
|
64
|
+
"screen",
|
|
65
|
+
"share",
|
|
66
|
+
"track",
|
|
67
|
+
"camera",
|
|
68
|
+
"microphone",
|
|
69
|
+
"speaker",
|
|
70
|
+
"enterprise",
|
|
71
|
+
"ios",
|
|
72
|
+
"android",
|
|
73
|
+
"web",
|
|
74
|
+
"interactive",
|
|
75
|
+
"hls",
|
|
76
|
+
"rtmp",
|
|
77
|
+
"pip",
|
|
78
|
+
"voip",
|
|
79
|
+
"player",
|
|
80
|
+
"webrtc",
|
|
81
|
+
"stream",
|
|
82
|
+
"communication",
|
|
83
|
+
"conference",
|
|
84
|
+
"whiteboard",
|
|
85
|
+
"session",
|
|
86
|
+
"polls",
|
|
87
|
+
"quiz",
|
|
88
|
+
"call",
|
|
89
|
+
"callkit",
|
|
90
|
+
"connection",
|
|
91
|
+
"service",
|
|
92
|
+
"telecom",
|
|
93
|
+
"reaction",
|
|
94
|
+
"cpaas",
|
|
95
|
+
"polls",
|
|
96
|
+
"quiz",
|
|
97
|
+
"leaderboard",
|
|
98
|
+
"virtual",
|
|
99
|
+
"background",
|
|
100
|
+
"blur",
|
|
101
|
+
"plugin",
|
|
102
|
+
"filters",
|
|
103
|
+
"beautify",
|
|
104
|
+
"beauty",
|
|
105
|
+
"enhance",
|
|
106
|
+
"enhancement",
|
|
107
|
+
"snapchat",
|
|
108
|
+
"zoom",
|
|
109
|
+
"teams",
|
|
110
|
+
"ai",
|
|
111
|
+
"noise",
|
|
112
|
+
"cancellation"
|
|
113
|
+
],
|
|
114
|
+
"repository": {
|
|
115
|
+
"type": "git",
|
|
116
|
+
"url": "git+https://github.com/100mslive/react-native-video-plugin.git"
|
|
117
|
+
},
|
|
118
|
+
"author": "Jatin Nagar <jatin.nagar@100ms.live> (https://www.100ms.live/), Yogesh <yogesh@100ms.live> (https://www.100ms.live/)",
|
|
119
|
+
"license": "MIT",
|
|
120
|
+
"bugs": {
|
|
121
|
+
"url": "https://github.com/100mslive/react-native-video-plugin/issues"
|
|
122
|
+
},
|
|
123
|
+
"homepage": "https://github.com/100mslive/react-native-video-plugin#readme",
|
|
124
|
+
"publishConfig": {
|
|
125
|
+
"registry": "https://registry.npmjs.org/"
|
|
126
|
+
},
|
|
127
|
+
"devDependencies": {
|
|
128
|
+
"@100mslive/react-native-hms": "^1.10.6",
|
|
129
|
+
"@commitlint/config-conventional": "^17.0.2",
|
|
130
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
131
|
+
"@react-native/babel-preset": "^0.73.1",
|
|
132
|
+
"@react-native/eslint-config": "^0.73.1",
|
|
133
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
134
|
+
"@types/jest": "^29.5.5",
|
|
135
|
+
"@types/react": "^18.2.44",
|
|
136
|
+
"commitlint": "^17.0.2",
|
|
137
|
+
"del-cli": "^5.1.0",
|
|
138
|
+
"eslint": "^8.51.0",
|
|
139
|
+
"eslint-config-prettier": "^9.0.0",
|
|
140
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
141
|
+
"jest": "^29.7.0",
|
|
142
|
+
"prettier": "^3.0.3",
|
|
143
|
+
"react": "18.2.0",
|
|
144
|
+
"react-native": "0.71.19",
|
|
145
|
+
"react-native-builder-bob": "^0.20.0",
|
|
146
|
+
"release-it": "^15.0.0",
|
|
147
|
+
"turbo": "^1.10.7",
|
|
148
|
+
"typescript": "^5.2.2"
|
|
149
|
+
},
|
|
150
|
+
"resolutions": {
|
|
151
|
+
"@types/react": "^18.2.44"
|
|
152
|
+
},
|
|
153
|
+
"peerDependencies": {
|
|
154
|
+
"@100mslive/react-native-hms": "^1.10.6",
|
|
155
|
+
"react": "*",
|
|
156
|
+
"react-native": "*"
|
|
157
|
+
},
|
|
158
|
+
"workspaces": [
|
|
159
|
+
"example"
|
|
160
|
+
],
|
|
161
|
+
"packageManager": "yarn@3.6.1",
|
|
162
|
+
"jest": {
|
|
163
|
+
"preset": "react-native",
|
|
164
|
+
"modulePathIgnorePatterns": [
|
|
165
|
+
"<rootDir>/example/node_modules",
|
|
166
|
+
"<rootDir>/lib/"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"commitlint": {
|
|
170
|
+
"extends": [
|
|
171
|
+
"@commitlint/config-conventional"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"release-it": {
|
|
175
|
+
"git": {
|
|
176
|
+
"commitMessage": "chore: release ${version}",
|
|
177
|
+
"tagName": "v${version}"
|
|
178
|
+
},
|
|
179
|
+
"npm": {
|
|
180
|
+
"publish": true
|
|
181
|
+
},
|
|
182
|
+
"github": {
|
|
183
|
+
"release": true
|
|
184
|
+
},
|
|
185
|
+
"plugins": {
|
|
186
|
+
"@release-it/conventional-changelog": {
|
|
187
|
+
"preset": "angular"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"eslintConfig": {
|
|
192
|
+
"root": true,
|
|
193
|
+
"extends": [
|
|
194
|
+
"@react-native",
|
|
195
|
+
"prettier"
|
|
196
|
+
],
|
|
197
|
+
"rules": {
|
|
198
|
+
"prettier/prettier": [
|
|
199
|
+
"error",
|
|
200
|
+
{
|
|
201
|
+
"quoteProps": "consistent",
|
|
202
|
+
"singleQuote": true,
|
|
203
|
+
"tabWidth": 2,
|
|
204
|
+
"trailingComma": "es5",
|
|
205
|
+
"useTabs": false
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"eslintIgnore": [
|
|
211
|
+
"node_modules/",
|
|
212
|
+
"lib/"
|
|
213
|
+
],
|
|
214
|
+
"prettier": {
|
|
215
|
+
"quoteProps": "consistent",
|
|
216
|
+
"singleQuote": true,
|
|
217
|
+
"tabWidth": 2,
|
|
218
|
+
"trailingComma": "es5",
|
|
219
|
+
"useTabs": false
|
|
220
|
+
},
|
|
221
|
+
"react-native-builder-bob": {
|
|
222
|
+
"source": "src",
|
|
223
|
+
"output": "lib",
|
|
224
|
+
"targets": [
|
|
225
|
+
"commonjs",
|
|
226
|
+
"module",
|
|
227
|
+
[
|
|
228
|
+
"typescript",
|
|
229
|
+
{
|
|
230
|
+
"project": "tsconfig.build.json"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
}
|