File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ go get github.com/pion/example-webrtc-applications/gocv-receive
18
18
```
19
19
20
20
### Open gocv-receive example page
21
- [ jsfiddle.net] ( https://jsfiddle.net/Lsfkexmt / ) you should see your Webcam, two text-areas and a 'Start Session' button
21
+ [ jsfiddle.net] ( https://jsfiddle.net/nerhsvpg / ) you should see your Webcam, two text-areas and a 'Start Session' button
22
22
23
23
### Run gocv-receive with your browsers SessionDescription as stdin
24
24
In the jsfiddle the top textarea is your browser, copy that and:
Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ var log = msg => {
13
13
14
14
navigator . mediaDevices . getUserMedia ( { video : true , audio : false } )
15
15
. then ( stream => {
16
- pc . addStream ( document . getElementById ( 'video1' ) . srcObject = stream )
16
+
17
+ document . getElementById ( 'video1' ) . srcObject = stream
18
+
19
+ stream . getTracks ( ) . forEach ( function ( track ) {
20
+ pc . addTrack ( track , stream ) ;
21
+ } ) ;
22
+
17
23
pc . createOffer ( ) . then ( d => pc . setLocalDescription ( d ) ) . catch ( log )
18
24
} ) . catch ( log )
19
25
You can’t perform that action at this time.
0 commit comments