RTCMediaConstraints.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2015 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #import <Foundation/Foundation.h>
  11. #import <WebRTC/RTCMacros.h>
  12. NS_ASSUME_NONNULL_BEGIN
  13. /** Constraint keys for media sources. */
  14. /** The value for this key should be a base64 encoded string containing
  15. * the data from the serialized configuration proto.
  16. */
  17. RTC_EXTERN NSString *const kRTCMediaConstraintsAudioNetworkAdaptorConfig;
  18. /** Constraint keys for generating offers and answers. */
  19. RTC_EXTERN NSString *const kRTCMediaConstraintsIceRestart;
  20. RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveAudio;
  21. RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveVideo;
  22. RTC_EXTERN NSString *const kRTCMediaConstraintsVoiceActivityDetection;
  23. RTC_EXTERN NSString *const kRTCMediaConstraintsInitAudioRecordingOnSend;
  24. /** Constraint values for Boolean parameters. */
  25. RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue;
  26. RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse;
  27. RTC_OBJC_EXPORT
  28. @interface RTC_OBJC_TYPE (RTCMediaConstraints) : NSObject
  29. - (instancetype)init NS_UNAVAILABLE;
  30. /** Initialize with mandatory and/or optional constraints. */
  31. - (instancetype)
  32. initWithMandatoryConstraints:(nullable NSDictionary<NSString *, NSString *> *)mandatory
  33. optionalConstraints:(nullable NSDictionary<NSString *, NSString *> *)optional
  34. NS_DESIGNATED_INITIALIZER;
  35. @end
  36. NS_ASSUME_NONNULL_END