Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 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 | |
| 11 | #import <Foundation/Foundation.h> |
| 12 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 13 | #import <WebRTC/RTCMacros.h> |
tkchin | 8b577ed | 2016-04-19 10:04:41 -0700 | [diff] [blame] | 14 | |
Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 15 | /** |
perkj | c8f952d | 2016-03-23 00:33:56 -0700 | [diff] [blame] | 16 | * Represents the state of the track. This exposes the same states in C++. |
Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 17 | */ |
| 18 | typedef NS_ENUM(NSInteger, RTCMediaStreamTrackState) { |
Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 19 | RTCMediaStreamTrackStateLive, |
perkj | c8f952d | 2016-03-23 00:33:56 -0700 | [diff] [blame] | 20 | RTCMediaStreamTrackStateEnded |
Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | NS_ASSUME_NONNULL_BEGIN |
| 24 | |
skvlad | f3569c8 | 2016-04-29 15:30:16 -0700 | [diff] [blame] | 25 | RTC_EXTERN NSString * const kRTCMediaStreamTrackKindAudio; |
| 26 | RTC_EXTERN NSString * const kRTCMediaStreamTrackKindVideo; |
| 27 | |
tkchin | 8b577ed | 2016-04-19 10:04:41 -0700 | [diff] [blame] | 28 | RTC_EXPORT |
Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 29 | @interface RTCMediaStreamTrack : NSObject |
| 30 | |
| 31 | /** |
| 32 | * The kind of track. For example, "audio" if this track represents an audio |
| 33 | * track and "video" if this track represents a video track. |
| 34 | */ |
| 35 | @property(nonatomic, readonly) NSString *kind; |
| 36 | |
| 37 | /** An identifier string. */ |
| 38 | @property(nonatomic, readonly) NSString *trackId; |
| 39 | |
| 40 | /** The enabled state of the track. */ |
hjon | a2f7798 | 2016-03-04 07:09:09 -0800 | [diff] [blame] | 41 | @property(nonatomic, assign) BOOL isEnabled; |
Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 42 | |
| 43 | /** The state of the track. */ |
| 44 | @property(nonatomic, readonly) RTCMediaStreamTrackState readyState; |
| 45 | |
| 46 | - (instancetype)init NS_UNAVAILABLE; |
| 47 | |
| 48 | @end |
| 49 | |
| 50 | NS_ASSUME_NONNULL_END |