mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-26 20:41:46 +08:00

Changelog: * Better support for non-webrtc use cases * Enable multiple readers * Enhance codec selectors * Update APIs to reflect on the new v3 webrtc design * Cleaner APIs
20 lines
412 B
Go
20 lines
412 B
Go
package mediadevices
|
|
|
|
import (
|
|
"github.com/pion/mediadevices/pkg/prop"
|
|
)
|
|
|
|
type MediaStreamConstraints struct {
|
|
Audio MediaOption
|
|
Video MediaOption
|
|
Codec *CodecSelector
|
|
}
|
|
|
|
// MediaTrackConstraints represents https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraints
|
|
type MediaTrackConstraints struct {
|
|
prop.MediaConstraints
|
|
selectedMedia prop.Media
|
|
}
|
|
|
|
type MediaOption func(*MediaTrackConstraints)
|