mirror of
https://github.com/pion/mediadevices.git
synced 2025-10-16 05:31:06 +08:00
Add codec property
Add codec property, which stores general encoding parameters, to MediaTrackConstraints.
This commit is contained in:

committed by
Lukas Herman

parent
1e868fc3e3
commit
00bcadc238
@@ -52,6 +52,7 @@ func main() {
|
||||
Audio: func(c *mediadevices.MediaTrackConstraints) {
|
||||
c.Codec = webrtc.Opus
|
||||
c.Enabled = true
|
||||
c.BitRate = 32000 // 32kbps
|
||||
},
|
||||
Video: func(c *mediadevices.MediaTrackConstraints) {
|
||||
c.Codec = videoCodecName
|
||||
@@ -59,6 +60,7 @@ func main() {
|
||||
c.Enabled = true
|
||||
c.Width = 640
|
||||
c.Height = 480
|
||||
c.BitRate = 100000 // 100kbps
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user