github.com/pion/webrtc/v3@v3.2.24/examples/swap-tracks/README.md (about)

     1  # swap-tracks
     2  swap-tracks demonstrates how to swap multiple incoming tracks on a single outgoing track.
     3  
     4  ## Instructions
     5  ### Download swap-tracks
     6  ```
     7  export GO111MODULE=on
     8  go get github.com/pion/webrtc/v3/examples/swap-tracks
     9  ```
    10  
    11  ### Open swap-tracks example page
    12  [jsfiddle.net](https://jsfiddle.net/1rx5on86/) you should see two text-areas and two buttons: `Copy browser SDP to clipboard`, `Start Session`.
    13  
    14  ### Run swap-tracks, with your browsers SessionDescription as stdin
    15  In the jsfiddle the top textarea is your browser's Session Description. Press `Copy browser SDP to clipboard` or copy the base64 string manually.
    16  We will use this value in the next step.
    17  
    18  #### Linux/macOS
    19  Run `echo $BROWSER_SDP | swap-tracks`
    20  #### Windows
    21  1. Paste the SessionDescription into a file.
    22  1. Run `swap-tracks < my_file`
    23  
    24  ### Input swap-tracks's SessionDescription into your browser
    25  Copy the text that `swap-tracks` just emitted and copy into second text area
    26  
    27  ### Hit 'Start Session' in jsfiddle, enjoy your video!
    28  Your browser should send streams to Pion, and then a stream will be relayed back, changing every 5 seconds.
    29  
    30  Congrats, you have used Pion WebRTC! Now start building something cool