Skip to content

Commit d0b1286

Browse files
committed
export from index.js, add local build instructions
1 parent 0acfd25 commit d0b1286

File tree

5 files changed

+1263
-1109
lines changed

5 files changed

+1263
-1109
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
*shim*.tgz

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,17 @@ webRtcPeer.ontrack = async ({ track, streams }) => {
5353
}
5454
};
5555
```
56+
57+
### Contributing
58+
59+
#### Local Build
60+
61+
Due to [this React issue](https://github.com/facebook/react/issues/13991), it is not possible to use `npm link`. To run locally you will need to package the app and install the `.tgz` file in your React Native app:
62+
63+
```bash
64+
npm pack
65+
cd ../MyApp
66+
npm install ../react-native-webrtc-web-shim/react-native-webrtc-web-shim-*.tgz
67+
```
68+
69+
Please make sure to run `npm run prettier && npm run lint` before opening a pull request.

index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {
2+
RTCPeerConnection,
3+
RTCIceCandidate,
4+
RTCSessionDescription,
5+
MediaStream,
6+
MediaStreamTrack,
7+
mediaDevices,
8+
permissions,
9+
registerGlobals,
10+
RTCView
11+
} from './src/react-native-webrtc-web-shim';
12+
13+
export {
14+
RTCPeerConnection,
15+
RTCIceCandidate,
16+
RTCSessionDescription,
17+
MediaStream,
18+
MediaStreamTrack,
19+
mediaDevices,
20+
permissions,
21+
registerGlobals,
22+
RTCView,
23+
};

0 commit comments

Comments
 (0)