Skip to content

Commit

Permalink
Merge pull request #264 from AgoraIO-Community/rc/3.0.1
Browse files Browse the repository at this point in the history
Rc/3.0.1
  • Loading branch information
LichKing-2234 authored Sep 4, 2020
2 parents e3e7aa2 + 66b8a0a commit 0b2aa65
Show file tree
Hide file tree
Showing 9 changed files with 3,546 additions and 1,847 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0",
"typescript": "^3.7.3"
"typedoc-plugin-no-inherit": "^1.1.10",
"typescript": "^4.0.2"
},
"jest": {
"preset": "react-native",
Expand Down
25 changes: 17 additions & 8 deletions src/RtcLocalView.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import React, {Component} from "react";
import {Platform} from "react-native";
import {Platform, ViewProps} from "react-native";

import {RtcSurfaceView, RtcSurfaceViewProps, RtcTextureView, RtcTextureViewProps} from "./src/RtcRenderView.native";

/**
* Use SurfaceView in Android.
* Use UIView in iOS.
* The SurfaceView class.
*
* **Note**
*
* SurfaceView is supported on Android only. Use UIView on iOS.
*
* @noInheritDoc
*/
class SurfaceView extends Component<RtcSurfaceViewProps, {}> {
class SurfaceView extends Component<ViewProps & RtcSurfaceViewProps, {}> {
render() {
return (
<RtcSurfaceView
Expand All @@ -18,10 +23,14 @@ class SurfaceView extends Component<RtcSurfaceViewProps, {}> {
}

/**
* Use TextureView in Android.
* Not support for iOS.
* The TextureView class.
*
* **Note**
*
* TextureView is supported on Android only. iOS does not support TextureView.
* @noInheritDoc
*/
class TextureView extends Component<RtcTextureViewProps, {}> {
class TextureView extends Component<ViewProps & RtcTextureViewProps, {}> {
render() {
if (Platform.OS === 'ios')
throw new Error('TextureView not support for iOS')
Expand All @@ -34,7 +43,7 @@ class TextureView extends Component<RtcTextureViewProps, {}> {
}

/**
* View for preview local video.
* View for previewing local video.
*/
export default {
SurfaceView,
Expand Down
25 changes: 17 additions & 8 deletions src/RtcRemoteView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {Component} from "react";
import {Platform} from "react-native";
import {Platform, ViewProps} from "react-native";

import {
RtcSurfaceView,
Expand All @@ -10,10 +10,15 @@ import {
} from "./src/RtcRenderView.native";

/**
* Use SurfaceView in Android.
* Use UIView in iOS.
* The SurfaceView class.
*
* **Note**
*
* SurfaceView is supported on Android only. Use UIView on iOS.
*
* @noInheritDoc
*/
class SurfaceView extends Component<RtcSurfaceViewProps & RtcUidProps, {}> {
class SurfaceView extends Component<ViewProps & RtcSurfaceViewProps & RtcUidProps, {}> {
render() {
return (
<RtcSurfaceView {...this.props}/>
Expand All @@ -22,10 +27,14 @@ class SurfaceView extends Component<RtcSurfaceViewProps & RtcUidProps, {}> {
}

/**
* Use TextureView in Android.
* Not support for iOS.
* The TextureView class.
*
* **Note**
*
* TextureView is supported on Android only. iOS does not support TextureView.
* @noInheritDoc
*/
class TextureView extends Component<RtcTextureViewProps & RtcUidProps, {}> {
class TextureView extends Component<ViewProps & RtcTextureViewProps & RtcUidProps, {}> {
render() {
if (Platform.OS === 'ios')
throw new Error('TextureView not support for iOS')
Expand All @@ -36,7 +45,7 @@ class TextureView extends Component<RtcTextureViewProps & RtcUidProps, {}> {
}

/**
* View for render remote video.
* View for rendering remote video.
*/
export default {
SurfaceView,
Expand Down
Loading

0 comments on commit 0b2aa65

Please sign in to comment.