File tree Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
68
68
* [Alexey Kravtsov](https://github.com/alexey-kravtsov) - * GStreamer encoder tune*
69
69
* [Tarrence van As](https://github.com/tarrencev) - * Webm saver fix*
70
70
* [Cameron Elliott](https://github.com/cameronelliott) - * Small race bug fix*
71
+ * [Jamie Good](https://github.com/jamiegood) - * Bug fix in jsfiddle example*
71
72
72
73
# ## License
73
74
MIT License - see [LICENSE](LICENSE) for full text
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ go get github.com/pion/example-webrtc-applications/gstreamer-receive
17
17
```
18
18
19
19
### Open gstreamer-receive example page
20
- [ jsfiddle.net] ( https://jsfiddle.net/8t2g5Lar / ) you should see your Webcam, two text-areas and a 'Start Session' button
20
+ [ jsfiddle.net] ( https://jsfiddle.net/cqavdpj8/1 / ) you should see your Webcam, two text-areas and a 'Start Session' button
21
21
22
22
### Run gstreamer-receive with your browsers SessionDescription as stdin
23
23
In the jsfiddle the top textarea is your browser, copy that and:
Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ let displayVideo = video => {
24
24
25
25
navigator . mediaDevices . getUserMedia ( { video : true , audio : true } )
26
26
. then ( stream => {
27
- pc . addStream ( displayVideo ( stream ) )
27
+
28
+ stream . getTracks ( ) . forEach ( function ( track ) {
29
+ pc . addTrack ( track , stream ) ;
30
+ } ) ;
31
+
32
+ displayVideo ( stream )
28
33
pc . createOffer ( ) . then ( d => pc . setLocalDescription ( d ) ) . catch ( log )
29
34
} ) . catch ( log )
30
35
@@ -51,7 +56,11 @@ window.startSession = () => {
51
56
window . addDisplayCapture = ( ) => {
52
57
navigator . mediaDevices . getDisplayMedia ( ) . then ( stream => {
53
58
document . getElementById ( 'displayCapture' ) . disabled = true
54
- pc . addStream ( displayVideo ( stream ) )
59
+
60
+ stream . getTracks ( ) . forEach ( function ( track ) {
61
+ pc . addTrack ( track , displayVideo ( stream ) ) ;
62
+ } ) ;
63
+
55
64
pc . createOffer ( ) . then ( d => pc . setLocalDescription ( d ) ) . catch ( log )
56
65
} )
57
66
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ go get github.com/pion/example-webrtc-applications/twitch
17
17
```
18
18
19
19
### Open twitch example page
20
- [ jsfiddle.net] ( https://jsfiddle.net/8t2g5Lar / ) you should see your Webcam, two text-areas and a 'Start Session' button
20
+ [ jsfiddle.net] ( https://jsfiddle.net/cqavdpj8/1 / ) you should see your Webcam, two text-areas and a 'Start Session' button
21
21
22
22
### Run twitch with your browsers SessionDescription as stdin and stream-key as an argument
23
23
In the jsfiddle the top textarea is your browser, copy that and:
You can’t perform that action at this time.
0 commit comments