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 NS_SWIFT_NAME(rtcEngine(_:rtmpStreamingChangedToState:state:errCode:));
35
43 - (void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamPublishedWithUrl:(NSString *_Nonnull)url error:(AgoraErrorCode)error NS_SWIFT_NAME(publisher(_:streamPublishedWithUrl:error:));
44
51 - (void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamUnpublishedWithUrl:(NSString *_Nonnull)url NS_SWIFT_NAME(publisher(_:streamUnpublishedWithUrl:));
52
58 - (void)publisherTranscodingUpdated:(AgoraLivePublisher *_Nonnull)publisher NS_SWIFT_NAME(publisherTranscodingUpdated(_:));
59
68 - (void)publisher:(AgoraLivePublisher *_Nonnull)publisher streamInjectedStatusOfUrl:(NSString *_Nonnull)url uid:(NSUInteger)uid status:(AgoraInjectStreamStatus)status NS_SWIFT_NAME(publisher(_:streamInjectedStatusOfUrl:uid:status:));
69 @end
70
71
76 __attribute__((visibility("default"))) @interface AgoraLivePublisher: NSObject
77
83 - (void)setDelegate:(_Nullable id<AgoraLivePublisherDelegate>)delegate NS_SWIFT_NAME(setDelegate(_:));
84
91 - (instancetype _Nonnull)initWithLiveKit:(AgoraLiveKit *_Nonnull)kit NS_SWIFT_NAME(initWithLiveKit(_:));
92
106 - (void)setVideoResolution:(CGSize)resolution andFrameRate:(NSInteger)frameRate bitrate:(NSInteger)bitrate NS_SWIFT_NAME(setVideoResolution(_:andFrameRate:bitrate:));
107
108
119 - (int)addVideoWatermark:(AgoraImage * _Nonnull)watermark NS_SWIFT_NAME(addVideoWatermark(_:));
120
124 - (void)clearVideoWatermarks NS_SWIFT_NAME(clearVideoWatermarks());
125
130 - (void)setMediaType:(AgoraMediaType)mediaType NS_SWIFT_NAME(setMediaType(_:));
131
142 - (void)addStreamUrl:(NSString *_Nullable)url transcodingEnabled:(BOOL)transcodingEnabled NS_SWIFT_NAME(addStreamUrl(_:transcodingEnabled:));
143
151 - (void)removeStreamUrl:(NSString *_Nullable)url NS_SWIFT_NAME(removeStreamUrl(_:));
152
155 - (void)publish NS_SWIFT_NAME(publish());
156
159 - (void)unpublish NS_SWIFT_NAME(unpublish());
160
161 #if TARGET_OS_IPHONE
162
165 - (void)switchCamera NS_SWIFT_NAME(switchCamera());
166 #endif
167
174 - (void)addInjectStreamUrl:(NSString *_Nonnull)url config:(AgoraLiveInjectStreamConfig * _Nonnull)config NS_SWIFT_NAME(addInjectStreamUrl(_:config:));
175
181 - (void)removeInjectStreamUrl:(NSString *_Nonnull)url NS_SWIFT_NAME(removeInjectStreamUrl(_:));
182
183 @end
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:1813
-[AgoraLivePublisher publish]
void publish()
AgoraLivePublisherDelegate-p
Definition: AgoraLivePublisher.h:22
AgoraRtmpStreamingErrorCode
AgoraRtmpStreamingErrorCode
Definition: AgoraEnumerates.h:2286
AgoraLiveKit
Definition: AgoraLiveKit.h:135
AgoraLivePublisher
Definition: AgoraLivePublisher.h:77
-[AgoraLivePublisher unpublish]
void unpublish()
AgoraObjects.h
AgoraRtmpStreamingState
AgoraRtmpStreamingState
Definition: AgoraEnumerates.h:2268
-[AgoraLivePublisher switchCamera]
void switchCamera()