|
Agora RTC Objective-C API Reference
Refactor
|
Go to the documentation of this file.
8 #import <AudioToolbox/AudioToolbox.h>
9 #import <Foundation/Foundation.h>
10 #import <VideoToolbox/VideoToolbox.h>
12 #import <UIKit/UIKit.h>
15 #import <AppKit/AppKit.h>
18 NS_ASSUME_NONNULL_BEGIN
131 @class AgoraMediaPlayer;
133 @class AgoraMediaStreamInfo;
147 - (void)AgoraMediaPlayer:(AgoraMediaPlayer *_Nonnull)playerKit
160 - (void)AgoraMediaPlayer:(AgoraMediaPlayer *_Nonnull)playerKit
161 didChangedToPosition:(NSInteger)position;
169 - (void)AgoraMediaPlayer:(AgoraMediaPlayer *_Nonnull)playerKit
185 - (void)AgoraMediaPlayer:(AgoraMediaPlayer *_Nonnull)playerKit
187 didReceiveData:(NSString *)data
188 length:(NSInteger)length;
199 - (void)AgoraMediaPlayer:(AgoraMediaPlayer *_Nonnull)playerKit
200 didReceiveVideoFrame:(CVPixelBufferRef)pixelBuffer;
211 - (void)AgoraMediaPlayer:(AgoraMediaPlayer *_Nonnull)playerKit
212 didReceiveAudioFrame:(CMSampleBufferRef)audioFrame;
219 __attribute__((visibility(
"default")))
@interface AgoraMediaStreamInfo : NSObject
221 @property(nonatomic, assign) NSInteger streamIndex;
225 @property(nonatomic, copy) NSString *_Nonnull codecName;
227 @property(nonatomic, copy) NSString *_Nullable language;
229 @property(nonatomic, assign) NSInteger videoFrameRate;
231 @property(nonatomic, assign) NSInteger videoBitRate;
233 @property(nonatomic, assign) NSInteger videoWidth;
235 @property(nonatomic, assign) NSInteger videoHeight;
237 @property(nonatomic, assign) NSInteger audioSampleRate;
239 @property(nonatomic, assign) NSInteger audioChannels;
241 @property(nonatomic, assign) NSInteger duration;
243 @property(nonatomic, assign) NSInteger rotation;
248 __attribute__((visibility(
"default")))
@interface AgoraMediaPlayer : NSObject
254 @property(nonatomic, assign) BOOL mute;
256 @property(nonatomic, assign) NSInteger volume;
259 @property(nonatomic, weak) id<AgoraMediaPlayerDelegate> _Nullable delegate;
266 - (instancetype)initWithDelegate:(id<AgoraMediaPlayerDelegate>)delegate;
272 - (void)setView:(
View *_Nullable)view;
287 - (void)open:(NSString *)url startPos:(NSInteger)startPos;
313 - (void)seekToPosition:(NSInteger)position;
324 - (int)mute:(
bool)isMute;
340 - (int)adjustVolume:(
int)volume;
346 - (NSInteger)getPosition;
353 - (NSInteger)getDuration;
369 - (NSInteger)getStreamCount;
379 - (AgoraMediaStreamInfo *_Nullable)getStreamByIndex:(
int)index;
384 NS_ASSUME_NONNULL_END