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
40 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine rtmpStreamingChangedToState:(NSString * _Nonnull)url
41 state:(AgoraRtmpStreamingState)state
42 reason:(AgoraRtmpStreamingReason)reason NS_SWIFT_NAME(rtcEngine(_:rtmpStreamingChangedToState:state:reason:));
43
51 - (void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamPublishedWithUrl:(NSString *_Nonnull)url error:(AgoraErrorCode)error NS_SWIFT_NAME(publisher(_:streamPublishedWithUrl:error:));
52
59 - (void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamUnpublishedWithUrl:(NSString *_Nonnull)url NS_SWIFT_NAME(publisher(_:streamUnpublishedWithUrl:));
60
66 - (void)publisherTranscodingUpdated:(AgoraLivePublisher *_Nonnull)publisher NS_SWIFT_NAME(publisherTranscodingUpdated(_:));
67
76 - (void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamInjectedStatusOfUrl:(NSString *_Nonnull)url uid:(NSUInteger)uid status:(AgoraInjectStreamStatus)status NS_SWIFT_NAME(publisher(_:streamInjectedStatusOfUrl:uid:status:));
77 @end
78
79
84 __attribute__((visibility("default"))) @interface AgoraLivePublisher: NSObject
85
91 - (void)setDelegate:(_Nullable id<AgoraLivePublisherDelegate>)delegate NS_SWIFT_NAME(setDelegate(_:));
92
99 - (instancetype _Nonnull)initWithLiveKit:(AgoraLiveKit *_Nonnull)kit NS_SWIFT_NAME(initWithLiveKit(_:));
100
114 - (void)setVideoResolution:(CGSize)resolution andFrameRate:(NSInteger)frameRate bitrate:(NSInteger)bitrate NS_SWIFT_NAME(setVideoResolution(_:andFrameRate:bitrate:));
115
116
127 - (int)addVideoWatermark:(AgoraImage * _Nonnull)watermark NS_SWIFT_NAME(addVideoWatermark(_:));
128
132 - (void)clearVideoWatermarks NS_SWIFT_NAME(clearVideoWatermarks());
133
138 - (void)setMediaType:(AgoraMediaType)mediaType NS_SWIFT_NAME(setMediaType(_:));
139
150 - (void)addStreamUrl:(NSString *_Nullable)url transcodingEnabled:(BOOL)transcodingEnabled NS_SWIFT_NAME(addStreamUrl(_:transcodingEnabled:));
151
159 - (void)removeStreamUrl:(NSString *_Nullable)url NS_SWIFT_NAME(removeStreamUrl(_:));
160
163 - (void)publish NS_SWIFT_NAME(publish());
164
167 - (void)unpublish NS_SWIFT_NAME(unpublish());
168
169 #if TARGET_OS_IPHONE
170
173 - (void)switchCamera NS_SWIFT_NAME(switchCamera());
174 #endif
175
182 - (void)addInjectStreamUrl:(NSString *_Nonnull)url config:(AgoraLiveInjectStreamConfig * _Nonnull)config NS_SWIFT_NAME(addInjectStreamUrl(_:config:));
183
189 - (void)removeInjectStreamUrl:(NSString *_Nonnull)url NS_SWIFT_NAME(removeInjectStreamUrl(_:));
190
191 @end
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:48
-[AgoraLivePublisher publish]
void publish()
AgoraRtmpStreamingReason
AgoraRtmpStreamingReason
Reasons for changes in the status of RTMP or RTMPS streaming.
Definition: AgoraEnumerates.h:3493
AgoraLivePublisherDelegate-p
Definition: AgoraLivePublisher.h:22
AgoraLiveKit
Definition: AgoraLiveKit.h:135
AgoraLivePublisher
Definition: AgoraLivePublisher.h:85
-[AgoraLivePublisher unpublish]
void unpublish()
AgoraObjects.h
AgoraRtmpStreamingState
AgoraRtmpStreamingState
States of the Media Push.
Definition: AgoraEnumerates.h:3454
-[AgoraLivePublisher switchCamera]
void switchCamera()