mirror of
https://github.com/pion/mediadevices.git
synced 2025-10-05 08:36:55 +08:00
Fix included unsupported formats
This commit is contained in:
@@ -185,11 +185,16 @@ func (c *camera) Properties() []prop.Media {
|
||||
properties := make([]prop.Media, 0)
|
||||
for format := range c.cam.GetSupportedFormats() {
|
||||
for _, frameSize := range c.cam.GetSupportedFrameSizes(format) {
|
||||
supportedFormat, ok := c.formats[format]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
properties = append(properties, prop.Media{
|
||||
Video: prop.Video{
|
||||
Width: int(frameSize.MaxWidth),
|
||||
Height: int(frameSize.MaxHeight),
|
||||
FrameFormat: c.formats[format],
|
||||
FrameFormat: supportedFormat,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user