Agora RTC Objective-C API Reference  Refactor
AgoraLivePublisher.h
Go to the documentation of this file.
1 //
2 // AgoraLivePublisher.h
3 // AgoraLiveKit
4 //
5 // Created by Sting Feng on 2015-8-11.
6 // Copyright (c) 2015 Agora. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "AgoraObjects.h"
11 
14 @class AgoraLiveKit;
15 
18 @class AgoraLivePublisher;
19 
22 @protocol AgoraLivePublisherDelegate <NSObject>
23 @optional
24 
32 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine rtmpStreamingChangedToState:(NSString * _Nonnull)url
33  state:(AgoraRtmpStreamingState)state
34  errCode:(AgoraRtmpStreamingErrorCode)errCode;
35 
43 -(void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamPublishedWithUrl:(NSString *_Nonnull)url error:(AgoraErrorCode)error;
44 
51 -(void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamUnpublishedWithUrl:(NSString *_Nonnull)url;
52 
58 -(void)publisherTranscodingUpdated: (AgoraLivePublisher *_Nonnull)publisher;
59 
68 -(void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamInjectedStatusOfUrl:(NSString *_Nonnull)url uid:(NSUInteger)uid status:(AgoraInjectStreamStatus)status;
69 @end
70 
71 
76 __attribute__((visibility("default"))) @interface AgoraLivePublisher: NSObject
77 
83 -(void)setDelegate:(_Nullable id<AgoraLivePublisherDelegate>)delegate;
84 
91 -(instancetype _Nonnull)initWithLiveKit:(AgoraLiveKit *_Nonnull)kit;
92 
106 - (void)setVideoResolution:(CGSize)resolution andFrameRate:(NSInteger)frameRate bitrate:(NSInteger)bitrate;
107 
115 -(void)setLiveTranscoding:(AgoraLiveTranscoding *_Nullable)transcoding;
116 
117 
128 -(int)addVideoWatermark:(AgoraImage * _Nonnull)watermark NS_SWIFT_NAME(addVideoWatermark(_:));
129 
133 -(void)clearVideoWatermarks;
134 
139 -(void)setMediaType:(AgoraMediaType)mediaType;
140 
151 -(void)addStreamUrl:(NSString *_Nullable)url transcodingEnabled:(BOOL)transcodingEnabled;
152 
160 -(void)removeStreamUrl:(NSString *_Nullable)url;
161 
164 -(void)publish;
165 
168 -(void)unpublish;
169 
170 #if TARGET_OS_IPHONE
171 
174 -(void)switchCamera;
175 #endif
176 
183 - (void)addInjectStreamUrl:(NSString *_Nonnull)url config:(AgoraLiveInjectStreamConfig * _Nonnull)config;
184 
190 - (void)removeInjectStreamUrl:(NSString *_Nonnull)url;
191 
192 @end
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:1642
-[AgoraLivePublisher publish]
void publish()
AgoraLivePublisherDelegate-p
Definition: AgoraLivePublisher.h:22
AgoraRtmpStreamingErrorCode
AgoraRtmpStreamingErrorCode
Definition: AgoraEnumerates.h:1918
AgoraLiveKit
Definition: AgoraLiveKit.h:144
AgoraLivePublisher
Definition: AgoraLivePublisher.h:77
-[AgoraLivePublisher unpublish]
void unpublish()
AgoraObjects.h
AgoraRtmpStreamingState
AgoraRtmpStreamingState
Definition: AgoraEnumerates.h:1900
-[AgoraLivePublisher switchCamera]
void switchCamera()