Files
mediadevices/examples/webrtc
Lukas Herman d84d0a3b0c Upgrade pion/webrtc from v2 to v3
With webrtc v3, users no longer need to bind or unbind manually anymore.

Changes:
  * Switch from webrtc.RTPCodec to webrtc.RTPCodecParameters
  * Fix broken examples after the upgrade
  * NewRTPReader now accepts ssrc as a parameter
  * Track interface now fulfills webrtc.TrackLocal requirements
2020-12-18 14:33:42 -05:00
..
2020-12-18 14:33:42 -05:00
2020-12-18 14:33:42 -05:00
2020-11-08 14:16:26 -08:00

Instructions

Install required codecs

In this example, we'll be using x264 and opus as our video and audio codecs. Therefore, we need to make sure that these codecs are installed within our system.

Installation steps:

Download webrtc example

git clone https://github.com/pion/mediadevices.git

Compile webrtc example

cd mediadevices/examples/webrtc && go build

Open example page

jsfiddle.net you should see two text-areas and a 'Start Session' button

Run the webrtc example with your browsers SessionDescription as stdin

In the jsfiddle the top textarea is your browser, copy that, and store the session description in an environment variable, export SDP=<put_the_sdp_here>

Run echo $SDP | ./webrtc

Input webrtc's SessionDescription into your browser

Copy the text that ./webrtc just emitted and copy into second text area

Hit 'Start Session' in jsfiddle, enjoy your video!

A video should start playing in your browser above the input boxes, and will continue playing until you close the application.

Congrats, you have used pion-MediaDevices! Now start building something cool