Browse Source

Merge branch 'master' into fix/rn-compatible

matrixbirds 5 years ago
parent
commit
3c4b6f84a9
No account linked to committer's email address

+ 1
- 0
.gitignore View File

@@ -75,3 +75,4 @@ samples/**/package-lock.json
75 75
 android/bin
76 76
 yarn.lock
77 77
 package-lock.json
78
+lib

+ 0
- 1
.npmignore View File

@@ -3,7 +3,6 @@
3 3
 *.md
4 4
 *.MD
5 5
 .DS_Store
6
-tsconfig.json
7 6
 samples
8 7
 __tests__
9 8
 docs

+ 0
- 42
lib/AgoraView.native.js View File

@@ -1,42 +0,0 @@
1
-"use strict";
2
-Object.defineProperty(exports, "__esModule", { value: true });
3
-const tslib_1 = require("tslib");
4
-const react_1 = tslib_1.__importDefault(require("react"));
5
-const react_native_1 = require("react-native");
6
-/**
7
- * Import RCTAgoraView from native binding.
8
- *
9
- * This @object is used to bridge native layer between react layer.
10
- */
11
-const RCTAgoraView = react_native_1.requireNativeComponent("RCTAgoraView");
12
-/**
13
- * AgoraView is the render layer for rendering video stream
14
- *
15
- * This class is used to rendering native sdk stream
16
- *
17
- * @props {@link AgoraViewProps}
18
- */
19
-class AgoraView extends react_1.default.Component {
20
-    /**
21
-     * render
22
-     *
23
-     * It would render view for VideoStream
24
-     */
25
-    render() {
26
-        return (react_1.default.createElement(RCTAgoraView, Object.assign({}, this.getHTMLProps())));
27
-    }
28
-    /**
29
-     * getHTMLProps
30
-     *
31
-     * get agora view props
32
-     */
33
-    getHTMLProps() {
34
-        let htmlProps = {};
35
-        for (let key in this.props) {
36
-            htmlProps[key] = this.props[key];
37
-        }
38
-        return htmlProps;
39
-    }
40
-}
41
-exports.default = AgoraView;
42
-//# sourceMappingURL=AgoraView.native.js.map

+ 0
- 1
lib/AgoraView.native.js.map View File

@@ -1 +0,0 @@
1
-{"version":3,"file":"AgoraView.native.js","sourceRoot":"","sources":["../src/AgoraView.native.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,+CAEqB;AAMrB;;;;GAIG;AAEH,MAAM,YAAY,GAAG,qCAAsB,CAAC,cAAc,CAAC,CAAC;AAE5D;;;;;;GAMG;AACH,MAAqB,SAAU,SAAQ,eAAK,CAAC,SAAyB;IAClE;;;;OAIG;IACI,MAAM;QACT,OAAO,CACH,8BAAC,YAAY,oBAAM,IAAI,CAAC,YAAY,EAAE,EAAK,CAC9C,CAAA;IACL,CAAC;IAED;;;;OAIG;IACK,YAAY;QAChB,IAAI,SAAS,GAAG,EAAoB,CAAC;QACrC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,EAAE;YACxB,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACpC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ;AAxBD,4BAwBC"}

+ 0
- 1216
lib/RtcEngine.native.js
File diff suppressed because it is too large
View File


+ 0
- 1
lib/RtcEngine.native.js.map
File diff suppressed because it is too large
View File


+ 0
- 7
lib/index.js View File

@@ -1,7 +0,0 @@
1
-"use strict";
2
-Object.defineProperty(exports, "__esModule", { value: true });
3
-var AgoraView_native_1 = require("./AgoraView.native");
4
-exports.AgoraView = AgoraView_native_1.default;
5
-var RtcEngine_native_1 = require("./RtcEngine.native");
6
-exports.RtcEngine = RtcEngine_native_1.default;
7
-//# sourceMappingURL=index.js.map

+ 0
- 1
lib/index.js.map View File

@@ -1 +0,0 @@
1
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,uDAAwD;AAAhD,uCAAA,OAAO,CAAa;AAC5B,uDAAwD;AAAhD,uCAAA,OAAO,CAAa"}

+ 0
- 3
package.json View File

@@ -52,9 +52,6 @@
52 52
     "typedoc": "^0.14.2",
53 53
     "typescript": "^3.2.4"
54 54
   },
55
-  "types": [
56
-    "./types.d.ts"
57
-  ],
58 55
   "jest": {
59 56
     "preset": "react-native",
60 57
     "moduleFileExtensions": [

+ 6
- 6
src/AgoraView.native.tsx View File

@@ -5,11 +5,11 @@ import {
5 5
 
6 6
 import {
7 7
     AgoraViewProps
8
-} from "./types.d";
8
+} from "./types";
9 9
 
10 10
 /**
11 11
  * Import RCTAgoraView from native binding.
12
- * 
12
+ *
13 13
  * This @object is used to bridge native layer between react layer.
14 14
  */
15 15
 
@@ -17,15 +17,15 @@ const RCTAgoraView = requireNativeComponent("RCTAgoraView");
17 17
 
18 18
 /**
19 19
  * AgoraView is the render layer for rendering video stream
20
- * 
20
+ *
21 21
  * This class is used to rendering native sdk stream
22
- * 
22
+ *
23 23
  * @props {@link AgoraViewProps}
24 24
  */
25 25
 export default class AgoraView extends React.Component<AgoraViewProps> {
26 26
     /**
27 27
      * render
28
-     * 
28
+     *
29 29
      * It would render view for VideoStream
30 30
      */
31 31
     public render(): JSX.Element {
@@ -36,7 +36,7 @@ export default class AgoraView extends React.Component<AgoraViewProps> {
36 36
 
37 37
     /**
38 38
      * getHTMLProps
39
-     * 
39
+     *
40 40
      * get agora view props
41 41
      */
42 42
     private getHTMLProps(): AgoraViewProps {

+ 198
- 198
src/RtcEngine.native.ts
File diff suppressed because it is too large
View File


src/types.d.ts → src/types.ts View File

@@ -1,6 +1,5 @@
1 1
 import { View, ViewProps } from 'react-native';
2 2
 
3
-declare module "IAgora"
4 3
 
5 4
 /**
6 5
  * VideoEncoderConfig details
@@ -45,8 +44,8 @@ export interface Option {
45 44
 
46 45
 /**
47 46
  * VoiceDecorator is decorate local audio voice
48
- * 
49
- * @property type: string | the range values ['changer' | 'reverbPreset'] This property is the identifier for audio voice decorator 
47
+ *
48
+ * @property type: string | the range values ['changer' | 'reverbPreset'] This property is the identifier for audio voice decorator
50 49
  * @property value: number | the value for voice parameter option.
51 50
  * type 'reverbPreset' range values: [0 is "off", 1 is "popular", 2 is "rnb", 3 is "rock", 4 is "hiphop", 5 is "vocal concert", 6 is "KTV", 7 is "studio"]
52 51
  * type 'changer' range values: [0 is "off", 1 is "old man", 2 is "baby boy", 3 is "baby girl", 4 is "zhubajie", 5 is "ethereal", 6 is "hulk"]
@@ -267,4 +266,4 @@ export interface LastmileProbeConfig {
267 266
  */
268 267
 export interface CameraCapturerConfiguration {
269 268
   preference: number
270
-}
269
+}

+ 1
- 0
tsconfig.json View File

@@ -14,6 +14,7 @@
14 14
     "outDir": "./lib",
15 15
     "module": "commonjs",
16 16
     "strict": true,
17
+    "declaration": true,
17 18
     "allowSyntheticDefaultImports": true,
18 19
     "esModuleInterop": true,
19 20
     "lib": ["es2015"]