RTCMediaConstraints.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 "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. /** Constraint values for Boolean parameters. */
  24. RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue;
  25. RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse;
  26. RTC_OBJC_EXPORT
  27. @interface RTC_OBJC_TYPE (RTCMediaConstraints) : NSObject
  28. - (instancetype)init NS_UNAVAILABLE;
  29. /** Initialize with mandatory and/or optional constraints. */
  30. - (instancetype)
  31. initWithMandatoryConstraints:(nullable NSDictionary<NSString *, NSString *> *)mandatory
  32. optionalConstraints:(nullable NSDictionary<NSString *, NSString *> *)optional
  33. NS_DESIGNATED_INITIALIZER;
  34. @end
  35. NS_ASSUME_NONNULL_END