Skip to content

Commit 874669a

Browse files
committed
move demo app to root
1 parent dbdd7ae commit 874669a

File tree

7 files changed

+40
-3
lines changed

7 files changed

+40
-3
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# ignore kite files
22
test/kite/
3-
test/demo
3+
4+
demo

test/demo/App.js renamed to demo/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ class App extends React.Component {
305305
await this.addVideo(this.state.wsSessionId, stream);
306306
} catch (err) {
307307
console.log('Error getting media permissions');
308-
console.error(err);
308+
console.warn(err);
309+
this.setState({ alertText: `${err}` });
309310
}
310311
};
311312

File renamed without changes.

demo/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Demo App
2+
3+
## Setup
4+
5+
Generate a new Expo app with the following command:
6+
7+
```
8+
expo-cli init --npm -t expo-template-blank --non-interactive WebRtcDemo
9+
10+
# add webrtc dependencies
11+
npx add-dependencies react-native-webrtc react-native-webrtc-web-shim webrtc-adapter
12+
13+
# eject to allow custom native libraries (react-native-webrtc)
14+
expo eject --npm
15+
16+
# copy these demo files to your app
17+
mkdir web
18+
wget -O App.js https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/App.js
19+
wget -O AppStyles.js https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/AppStyles.js
20+
wget -O RoundedButton.js https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/RoundedButton.js
21+
wget -O web/index.html https://raw.githubusercontent.com/ruddell/react-native-webrtc-web-shim/main/test/demo/web/index.html
22+
```
23+
24+
## Running
25+
26+
```
27+
# start the browser version of the demo
28+
npm run web
29+
30+
# start the iOS version of the demo
31+
npm run ios
32+
33+
# start the Android version of the demo
34+
npm run android
35+
```
File renamed without changes.
File renamed without changes.

test/scripts/generate-app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npx add-dependencies react-native-webrtc webrtc-adapter
1515
npm install
1616
npm link react-native-webrtc-web-shim
1717

18-
cp $GITHUB_WORKSPACE/test/demo/* ./
18+
cp $GITHUB_WORKSPACE/demo/* ./
1919

2020
expo build:web
2121

0 commit comments

Comments
 (0)