Skip to content

Commit

Permalink
move demo app to root
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddell committed Feb 8, 2021
1 parent dbdd7ae commit 874669a
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ignore kite files
test/kite/
test/demo

demo
3 changes: 2 additions & 1 deletion test/demo/App.js → demo/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ class App extends React.Component {
await this.addVideo(this.state.wsSessionId, stream);
} catch (err) {
console.log('Error getting media permissions');
console.error(err);
console.warn(err);
this.setState({ alertText: `${err}` });
}
};

Expand Down
File renamed without changes.
35 changes: 35 additions & 0 deletions demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Demo App

## Setup

Generate a new Expo app with the following command:

```
expo-cli init --npm -t expo-template-blank --non-interactive WebRtcDemo
# add webrtc dependencies
npx add-dependencies react-native-webrtc react-native-webrtc-web-shim webrtc-adapter
# eject to allow custom native libraries (react-native-webrtc)
expo eject --npm
# copy these demo files to your app
mkdir web
wget -O App.js https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/App.js
wget -O AppStyles.js https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/AppStyles.js
wget -O RoundedButton.js https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/RoundedButton.js
wget -O web/index.html https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/web/index.html
```

## Running

```
# start the browser version of the demo
npm run web
# start the iOS version of the demo
npm run ios
# start the Android version of the demo
npm run android
```
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/scripts/generate-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npx add-dependencies react-native-webrtc webrtc-adapter
npm install
npm link react-native-webrtc-web-shim

cp $GITHUB_WORKSPACE/test/demo/* ./
cp $GITHUB_WORKSPACE/demo/* ./

expo build:web

Expand Down

0 comments on commit 874669a

Please sign in to comment.