Change audio sample rate for apple watch homekit camera (#37637)

* Update type_cameras.py

* Apply suggestions from code review

Support both 24kHz and 16kHz sample rate

Co-authored-by: J. Nick Koston <nick@koston.org>

* Adjust formatting

* Reformat

Co-authored-by: J. Nick Koston <nick@koston.org>
pull/37686/head
Harryjholmes 2020-07-09 16:19:49 +01:00 committed by GitHub
parent bcd604eec2
commit 511da9557b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,12 @@ class Camera(HomeAccessory, PyhapCamera):
},
"resolutions": resolutions,
}
audio_options = {"codecs": [{"type": "OPUS", "samplerate": 24}]}
audio_options = {
"codecs": [
{"type": "OPUS", "samplerate": 24},
{"type": "OPUS", "samplerate": 16},
]
}
stream_address = config.get(CONF_STREAM_ADDRESS, get_local_ip())