Skip to content

Commit

Permalink
sdk(react-native-sdk): react native sdk updates (#13482)
Browse files Browse the repository at this point in the history
* sdk(react-native-sdk): minor updates
  • Loading branch information
Calinteodor authored Jun 27, 2023
1 parent ba26407 commit 00092b7
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 254 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ tsconfig.json

# React Native SDK
#
react-native-sdk/*.tgz
react-native-sdk/android/src
react-native-sdk/images
react-native-sdk/ios
Expand Down
7 changes: 0 additions & 7 deletions react-native-sdk/constants.ts

This file was deleted.

8 changes: 0 additions & 8 deletions react-native-sdk/functions.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ import 'react-native-gesture-handler';
// Apply all necessary polyfills as early as possible
// to make sure anything imported henceforth sees them.
import 'react-native-get-random-values';
import '../react/features/mobile/polyfills';
import './react/features/mobile/polyfills';

// @ts-ignore
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
import { View } from 'react-native';

import { convertPropsToURL } from '../functions';
import { appNavigate } from '../react/features/app/actions.native';
import { App } from '../react/features/app/components/App.native';
import { setAudioMuted, setVideoMuted } from '../react/features/base/media/actions';
import { appNavigate } from './react/features/app/actions.native';
import { App } from './react/features/app/components/App.native';
import { setAudioMuted, setVideoMuted } from './react/features/base/media/actions';
// @ts-ignore
import JitsiThemePaperProvider from '../react/features/base/ui/components/JitsiThemeProvider';
import JitsiThemePaperProvider from './react/features/base/ui/components/JitsiThemeProvider.native';


interface IAppProps {
Expand All @@ -40,7 +39,7 @@ interface IAppProps {
/**
* Main React Native SDK component that displays a Jitsi Meet conference and gets all required params as props
*/
const JitsiMeet = forwardRef(({ flags, meetingOptions, style }: IAppProps, ref) => {
export const JitsiMeeting = forwardRef(({ flags, meetingOptions, style }: IAppProps, ref) => {
const [ appProps, setAppProps ] = useState({});
const app = useRef(null);

Expand All @@ -65,7 +64,7 @@ const JitsiMeet = forwardRef(({ flags, meetingOptions, style }: IAppProps, ref)

useEffect(
() => {
const url = convertPropsToURL(meetingOptions.domain, meetingOptions.roomName);
const url = `${meetingOptions.domain}/${meetingOptions.roomName}`;

setAppProps({
'url': {
Expand Down Expand Up @@ -95,5 +94,3 @@ const JitsiMeet = forwardRef(({ flags, meetingOptions, style }: IAppProps, ref)
</View>
);
});

export default JitsiMeet;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = package['name']
s.name = 'jitsi-meet-rnsdk'
s.version = package['version']
s.summary = package['description']
s.description = package['description']
Expand Down
413 changes: 193 additions & 220 deletions react-native-sdk/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions react-native-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "@jitsi/react-native-sdk",
"version": "0.1.0",
"description": "React Native SDK for Jitsi Meet.",
"main": "index.js",
"main": "index.tsx",
"license": "Apache-2.0",
"author": "",
"homepage": "https://jitsi.org",
"repository": {
"type": "git",
"url": "git://github.com/jitsi/jitsi-meet.git"
"url": "git+https://github.com/jitsi/jitsi-meet.git"
},
"dependencies": {
"@amplitude/react-native": "2.7.0",
Expand Down
11 changes: 5 additions & 6 deletions react-native-sdk/prepare_sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ const path = require('path');

const packageJSON = require('../package.json');

const {
androidSourcePath,
androidTargetPath,
iosDestPath,
iosSrcPath
} = require('./constants.ts');
const SDKPackageJSON = require('./package.json');

const androidSourcePath = '../android/sdk/src/main/java/org/jitsi/meet/sdk';
const androidTargetPath = './android/src/main/java/org/jitsi/meet/sdk';
const iosSrcPath = '../ios/sdk/src';
const iosDestPath = './ios/src';


/**
* Copies a specified file in a way that recursive copy is possible.
Expand Down

0 comments on commit 00092b7

Please sign in to comment.