Skip to content

Commit

Permalink
Merge branch 'rc/3.0.1' into jira/MS-16519
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/src/RtcRenderView.native.tsx
  • Loading branch information
TingChen2020 committed Aug 25, 2020
2 parents f6c3e60 + 2f503f5 commit fab89ad
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/RtcLocalView.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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.
*/
class SurfaceView extends Component<RtcSurfaceViewProps, {}> {
class SurfaceView extends Component<ViewProps & RtcSurfaceViewProps, {}> {
render() {
return (
<RtcSurfaceView
Expand All @@ -21,7 +21,7 @@ class SurfaceView extends Component<RtcSurfaceViewProps, {}> {
* Use TextureView in Android.
* Not support for iOS.
*/
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 Down
6 changes: 3 additions & 3 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 @@ -13,7 +13,7 @@ import {
* Use SurfaceView in Android.
* Use UIView in iOS.
*/
class SurfaceView extends Component<RtcSurfaceViewProps & RtcUidProps, {}> {
class SurfaceView extends Component<ViewProps & RtcSurfaceViewProps & RtcUidProps, {}> {
render() {
return (
<RtcSurfaceView {...this.props}/>
Expand All @@ -25,7 +25,7 @@ class SurfaceView extends Component<RtcSurfaceViewProps & RtcUidProps, {}> {
* Use TextureView in Android.
* Not support for iOS.
*/
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 Down
32 changes: 30 additions & 2 deletions src/src/RtcRenderView.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,35 @@ export interface RtcUidProps {
uid: number;
}

<<<<<<< HEAD
export interface RtcSurfaceViewProps extends ViewProps {
/**
* Controls whether the surface view's surface is placed on top of another regular surface
* view in the window (but still behind the window itself).
*/
=======
/**
* Properties of the SurfaceView.
* @property zOrderMediaOverlay: boolean | Control whether the surface view's surface is placed on top of another regular surface view in the window (but still behind the window itself).
* @property zOrderOnTop: boolean | Control whether the surface view's surface is placed on top of its window.
* @property renderMode: number | The rendering mode of the video view.
* @see VideoRenderMode
* @property channelId: string | The unique channel name for the AgoraRTC session in the string format. The string length must be less than 64 bytes. Supported character scopes are:
* - All lowercase English letters: a to z.
* - All uppercase English letters: A to Z.
* - All numeric characters: 0 to 9.
* - The space character.
* - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
* Note
* - The default value is the empty string "". Use the default value if the user joins the channel using the joinChannel method in the RtcEngine class.
* @see RtcEngine.joinChannel
* - If the user joins the channel using the joinChannel method in the RtcChannel class, set this parameter as the channelId of the RtcChannel object.
* @see RtcChannel.joinChannel
* @property mirrorMode: number | The video mirror mode.
* @see VideoMirrorMode
*/
export interface RtcSurfaceViewProps {
>>>>>>> rc/3.0.1
zOrderMediaOverlay?: boolean;
/**
* Controls whether the surface view's surface is placed on top of its window.
Expand Down Expand Up @@ -46,6 +70,7 @@ export interface RtcSurfaceViewProps extends ViewProps {
/**
* Properties of the TextureView.
*/
<<<<<<< HEAD
export interface RtcTextureViewProps extends ViewProps {
/**
* The unique channel name for the AgoraRTC session in the string format.
Expand All @@ -60,6 +85,9 @@ export interface RtcTextureViewProps extends ViewProps {
* - The default value is the empty string "". Use the default value if the user joins the channel using the [`joinChannel`]{@link RtcChannel.joinChannel} method in the RtcEngine class.
* - If the user joins the channel using the [`joinChannel`]{@link RtcChannel.joinChannel} method in the `RtcChannel` class, set this parameter as the `channelId` of the `RtcChannel object.
*/
=======
export interface RtcTextureViewProps {
>>>>>>> rc/3.0.1
channelId?: string;
/** The video mirror. */
mirror?: boolean;
Expand All @@ -73,7 +101,7 @@ const RCTRtcSurfaceView = requireNativeComponent('RCTAgoraRtcSurfaceView');
/**
* @ignore
*/
export class RtcSurfaceView extends Component<RtcSurfaceViewProps & RtcUidProps, {}> {
export class RtcSurfaceView extends Component<ViewProps & RtcSurfaceViewProps & RtcUidProps, {}> {
render() {
const {channelId = null, uid, ...others} = this.props
return (
Expand All @@ -93,7 +121,7 @@ const RCTRtcTextureView = requireNativeComponent('RCTAgoraRtcTextureView');
/**
* @ignore
*/
export class RtcTextureView extends Component<RtcTextureViewProps & RtcUidProps, {}> {
export class RtcTextureView extends Component<ViewProps & RtcTextureViewProps & RtcUidProps, {}> {
render() {
const {channelId = null, uid, ...others} = this.props
return (
Expand Down

0 comments on commit fab89ad

Please sign in to comment.