Change from Media -> Track

We expect single tracks, so use proper terminology
This commit is contained in:
Sean DuBois
2018-06-12 23:59:56 -07:00
parent 3b5cdcf60d
commit c7ca757fa8
3 changed files with 21 additions and 21 deletions

View File

@@ -36,7 +36,7 @@ func main() {
// Set a handler for when a new remote track starts, this handler saves buffers to disk as
// an ivf file, since we could have multiple video tracks we provide a counter.
// In your application this is where you would handle/process video
peerConnection.Ontrack = func(mediaType webrtc.MediaType, packets <-chan *rtp.Packet) {
peerConnection.Ontrack = func(mediaType webrtc.TrackType, packets <-chan *rtp.Packet) {
go func() {
track := atomic.AddUint64(&trackCount, 1)
fmt.Printf("Track %d has started \n", track)