RTCMediaStreamTrack.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. /**
  13. * Represents the state of the track. This exposes the same states in C++.
  14. */
  15. typedef NS_ENUM(NSInteger, RTCMediaStreamTrackState) {
  16. RTCMediaStreamTrackStateLive,
  17. RTCMediaStreamTrackStateEnded
  18. };
  19. NS_ASSUME_NONNULL_BEGIN
  20. RTC_EXTERN NSString *const kRTCMediaStreamTrackKindAudio;
  21. RTC_EXTERN NSString *const kRTCMediaStreamTrackKindVideo;
  22. RTC_OBJC_EXPORT
  23. @interface RTC_OBJC_TYPE (RTCMediaStreamTrack) : NSObject
  24. /**
  25. * The kind of track. For example, "audio" if this track represents an audio
  26. * track and "video" if this track represents a video track.
  27. */
  28. @property(nonatomic, readonly) NSString *kind;
  29. /** An identifier string. */
  30. @property(nonatomic, readonly) NSString *trackId;
  31. /** The enabled state of the track. */
  32. @property(nonatomic, assign) BOOL isEnabled;
  33. /** The state of the track. */
  34. @property(nonatomic, readonly) RTCMediaStreamTrackState readyState;
  35. - (instancetype)init NS_UNAVAILABLE;
  36. @end
  37. NS_ASSUME_NONNULL_END