iOS/macOS(Objective-C)[v1.7.5.0]
PanoRtcEngineKit.h
浏览该文件的文档.
1
2//
3// PanoRtcEngineKit.h
4// PanoRtc
5//
6// Copyright © 2019 Pano. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "PanoEnumerates.h"
12#import "PanoObjects.h"
13#import "PanoRtcAnnotation.h"
14#import "PanoRtcWhiteboard.h"
17#import "PanoRtcRecording.h"
18
19NS_ASSUME_NONNULL_BEGIN
20
21#pragma mark - PanoRtcEngineDelegate
22
31@protocol PanoRtcEngineDelegate <NSObject>
32@optional
33
34#pragma mark Delegate Methods
35
36#pragma mark Core Delegate Methods
37
46- (void)onChannelJoinConfirm:(PanoResult)result;
55- (void)onChannelLeaveIndication:(PanoResult)result;
64- (void)onChannelFailover:(PanoFailoverState)state;
73- (void)onChannelCountDown:(UInt32)remain;
74
85- (void)onUserJoinIndication:(UInt64)userId
86 withName:(NSString * _Nullable)userName;
97- (void)onUserLeaveIndication:(UInt64)userId
98 withReason:(PanoUserLeaveReason)reason;
99
108- (void)onUserAudioStart:(UInt64)userId;
117- (void)onUserAudioStop:(UInt64)userId;
118
129- (void)onUserVideoStart:(UInt64)userId
130 withMaxProfile:(PanoVideoProfileType)maxProfile;
139- (void)onUserVideoStop:(UInt64)userId;
140
149- (void)onUserScreenStart:(UInt64)userId;
158- (void)onUserScreenStop:(UInt64)userId;
159
170- (void)onUserAudioSubscribe:(UInt64)userId
171 withResult:(PanoSubscribeResult)result;
172
183- (void)onUserVideoSubscribe:(UInt64)userId
184 withResult:(PanoSubscribeResult)result;
185
196- (void)onUserScreenSubscribe:(UInt64)userId
197 withResult:(PanoSubscribeResult)result;
198
207- (void)onUserAudioMute:(UInt64)userId;
216- (void)onUserAudioUnmute:(UInt64)userId;
217
226- (void)onUserVideoMute:(UInt64)userId;
235- (void)onUserVideoUnmute:(UInt64)userId;
236
245- (void)onUserScreenMute:(UInt64)userId;
254- (void)onUserScreenUnmute:(UInt64)userId;
255
264- (void)onActiveSpeakerListUpdated:(NSArray<NSNumber *> * _Nullable)userIds;
265
266#pragma mark User Audio Control Message
277- (void)onUserAudioControlMessageReceived:(UInt64)userId
278 data:(NSData *)data;
279
280#pragma mark Observer Delegate Methods
281
290- (void)onFirstAudioDataReceived:(UInt64)userId;
291
300- (void)onFirstVideoDataReceived:(UInt64)userId;
301
310- (void)onFirstScreenDataReceived:(UInt64)userId;
311
320- (void)onFirstVideoFrameRendered:(UInt64)userId;
321
330- (void)onFirstScreenFrameRendered:(UInt64)userId;
331
332#pragma mark Statistics Delegate Methods
333
342- (void)onAudioSendStats:(PanoRtcAudioSendStats * _Nonnull)stats;
351- (void)onAudioRecvStats:(PanoRtcAudioRecvStats * _Nonnull)stats;
352
361- (void)onVideoSendStats:(PanoRtcVideoSendStats * _Nonnull)stats;
370- (void)onVideoRecvStats:(PanoRtcVideoRecvStats * _Nonnull)stats;
371
380- (void)onScreenSendStats:(PanoRtcScreenSendStats * _Nonnull)stats;
389- (void)onScreenRecvStats:(PanoRtcScreenRecvStats * _Nonnull)stats;
390
401- (void)onVideoSendBweStats:(PanoRtcVideoSendBweStats * _Nonnull)stats;
412- (void)onVideoRecvBweStats:(PanoRtcVideoRecvBweStats * _Nonnull)stats;
413
422- (void)onSystemStats:(PanoRtcSystemStats * _Nonnull)stats;
423
424#pragma mark Network Delegate Methods
425
436- (void)onNetworkQuality:(PanoQualityRating)quality
437 withUser:(UInt64)userId;
438
439#pragma mark User Audio indication Methods
440
449- (void)onUserAudioLevel:(PanoRtcAudioLevel * _Nonnull)level;
450
459- (void)onEchoDelayChanged:(UInt32) newDelay;
460
461#if TARGET_OS_OSX
462
463#pragma mark Device Delegate Methods (macOS)
464
477- (void)onDeviceStateChange:(PanoDeviceState)state
478 withDevice:(NSString * _Nonnull)deviceId
479 type:(PanoDeviceType)type;
480
493- (void)onDefaultDeviceChange:(NSString * _Nonnull)deviceId
494 withType:(PanoDeviceType)type;
495
496#endif
497
498#pragma mark Video Capture Delegate Methods
499
510 - (void)onVideoCaptureStateChange:(PanoVideoCaptureState)state
511 withDevice:(NSString * _Nonnull)deviceId;
512
513#pragma mark Whiteboard Delegate Methods
514
529
536- (void)onWhiteboardStart;
543- (void)onWhiteboardStop;
552- (void)onWhiteboardStart:(NSString * _Nonnull)whiteboardId;
561- (void)onWhiteboardStop:(NSString * _Nonnull)whiteboardId;
562
563#pragma mark - Audio Mixing Delegate Methods
564
575- (void)onAudioMixingStateChanged:(SInt64)taskId
576 withState:(PanoAudioMixingState)state;
577
578#pragma mark - Video Snapshot Delegate Methods
579
592- (void)onVideoSnapshotCompleted:(BOOL)succeed
593 userId:(UInt64)userId
594 filename:(NSString * _Nonnull)filename;
595
604- (void)onAudioStartResult:(PanoResult)result;
605
614- (void)onVideoStartResult:(PanoResult)result;
615
624- (void)onScreenStartResult:(PanoResult)result;
635- (void)onScreenCaptureStateChanged:(PanoScreenCaptureState)state reason:(PanoResult)reason;
644- (void)onSoundCardShareStartResult:(PanoResult)result;
653- (void)onSoundCardMonitorStartResult:(PanoResult)result;
664- (void)onUserAudioCallTypeChanged:(uint64_t)userId type:(PanoAudioCallType)type;
675- (void)onCalloutResult:(NSString * _Nonnull)phoneNo result:(PanoResult)result;
676
677@end
678
679
680#pragma mark - PanoRtcRenderDelegate
681
690@protocol PanoRtcRenderDelegate <NSObject>
691@optional
692
693#pragma mark Delegate Methods
694
715- (PanoResult)onRenderVideoData:(void * _Nonnull)buffer
716 withLength:(SInt32)length
717 format:(PanoRtcVideoFormat * _Nonnull)format
718 timestamp:(UInt64)timestamp;
719
740- (PanoResult)onRenderAudioData:(void * _Nonnull)buffer
741 withLength:(SInt32)length
742 format:(PanoRtcAudioFormat * _Nonnull)format
743 timestamp:(UInt64)timestamp;
744@end
745
746
747#pragma mark - PanoRtcVideoFilterDelegate
748
757@protocol PanoRtcVideoFilterDelegate <NSObject>
758@optional
759
760#pragma mark Delegate Methods
761
772- (void)onNativeVideoFrame:(CVPixelBufferRef _Nonnull)frame
773 withRotation:(PanoVideoRotation)rotation;
774
785- (void)onVideoFrame:(void * _Nonnull)buffer
786 withLength:(SInt32)length
787 withFormat:(PanoRtcVideoFormat * _Nonnull)format;
788
789@end
790
791
792#pragma mark - PanoRtcAudioDataExProcessorDelegate
793
803@optional
804
805#pragma mark Delegate Methods
806
821- (void)onAudioFrame:(void * _Nonnull)buffer
822 withLength:(SInt32)length
823 withMaxLength:(SInt32)maxBufferByteLens
824 withFormat:(PanoRtcAudioFormat * _Nonnull)format;
825
826@end
827
828
829#pragma mark - PanoRtcNetworkTestDelegate
830
839@protocol PanoRtcNetworkTestDelegate <NSObject>
840@optional
841
842#pragma mark Delegate Methods
843
852- (void)onNetworkTestComplete:(PanoRtcNetworkQuality * _Nonnull)quality;
853
854@end
855
856
857#pragma mark - PanoRtcExternalAudioRecorder
858
868
869
870#pragma mark - PanoRtcExternalAudioPlayer
871
881
882
883#pragma mark - PanoRtcEngineKit
884
886@class PanoRtcMessage;
889
899__attribute__((visibility("default"))) @interface PanoRtcEngineKit : NSObject
900
902+ (instancetype)new NS_UNAVAILABLE;
903
905- (instancetype)init NS_UNAVAILABLE;
906
918@property (readonly, nonatomic) PanoRtcVideoStreamManager *videoStreamManager;
927@property (readonly, nonatomic) PanoRtcAnnotationManager *annotationManager;
936@property (readonly, nonatomic) PanoRtcMessage *messageService;
945@property (readonly, nonatomic) PanoRtcRemoteController *remoteController;
954@property (readonly, nonatomic) PanoRtcGroupManager *groupManager;
963@property (readonly, nonatomic) PanoRtcVideoRenderManager *videoRenderManager;
972@property (readonly, nonatomic) PanoRtcRecording *recordingService;
973
974#pragma mark Core Service
975
990+ (instancetype _Nonnull)engineWithConfig:(PanoRtcEngineConfig * _Nonnull)config
991 delegate:(id<PanoRtcEngineDelegate> _Nonnull)delegate;
992
1009- (PanoResult)updateConfig:(PanoRtcEngineConfig * _Nonnull)config;
1010
1019- (void)destroy;
1020
1057- (PanoResult)joinChannelWithToken:(NSString * _Nonnull)token
1058 channelId:(NSString * _Nonnull)channelId
1059 userId:(UInt64)userId
1060 config:(PanoRtcChannelConfig * _Nullable)config;
1067- (void)leaveChannel;
1068
1097
1126
1143- (PanoResult)startSoundCardMonitor:(id<PanoRtcRenderDelegate> _Nonnull)delegate;
1157
1178- (PanoResult)startVideoWithView:(PanoView * _Nullable)view
1179 config:(PanoRtcVideoConfig * _Nullable)config;
1198- (PanoResult)startVideoWithDelegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
1199 profile:(PanoVideoProfileType)profile;
1200
1219- (PanoResult)startVideoWithDelegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
1220 config:(PanoRtcVideoSourceConfig * _Nullable)config;
1221
1235
1236#if TARGET_OS_OSX
1237
1253
1254#endif
1255
1256#if TARGET_OS_IPHONE
1257
1277- (PanoResult)startScreenWithAppGroupId:(NSString *)appGroupId API_AVAILABLE(ios(11.0));
1278
1279#endif
1293
1310- (PanoResult)subscribeAudio:(UInt64)userId;
1327- (PanoResult)unsubscribeAudio:(UInt64)userId;
1328
1351- (PanoResult)subscribeVideo:(UInt64)userId
1352 withView:(PanoView * _Nullable)view
1353 config:(PanoRtcVideoConfig * _Nullable)config;
1374- (PanoResult)subscribeVideo:(UInt64)userId
1375 withDelegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
1376 profile:(PanoVideoProfileType)profile;
1393- (PanoResult)unsubscribeVideo:(UInt64)userId;
1394
1415- (PanoResult)subscribeScreen:(UInt64)userId
1416 withView:(PanoView * _Nonnull)view;
1435- (PanoResult)subscribeScreen:(UInt64)userId
1436 withDelegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate;
1454- (PanoResult)unsubscribeScreen:(UInt64)userId;
1455
1472- (PanoResult)callout:(NSString * _Nonnull)phoneNo bindToUser:(BOOL)bindToUser;
1487- (PanoResult)dropCall:(NSString *)phoneNo;
1488
1507- (PanoResult)updateScreenScaling:(UInt64)userId
1508 withRatio:(PanoScreenScalingRatio)ratio;
1529- (PanoResult)updateScreenScaling:(UInt64)userId
1530 withRatio:(CGFloat)ratio
1531 focus:(CGPoint)focus;
1550- (PanoResult)updateScreenMoving:(UInt64)userId
1551 withDistance:(CGPoint)distance;
1552
1583
1614
1661- (PanoResult)setAudioIndication:(BOOL)enable
1662 intervalMs:(UInt32)intervalMs;
1663
1664
1665#pragma mark Device Manager
1666
1681- (PanoResult)setMicrophoneMuteStatus:(BOOL)muted;
1682
1699- (PanoResult)setAudioDeviceVolume:(UInt32)volume
1700 withType:(PanoDeviceType)type;
1711- (UInt32)getAudioDeviceVolume:(PanoDeviceType)type;
1712
1721- (SInt16)getRecordingLevel;
1722
1731- (SInt16)getPlayoutLevel;
1732
1745- (PanoRtcCameraController *)getCameraController:(NSString * _Nonnull)deviceId;
1746
1793- (PanoResult) setPlayoutDataMuteStatus:(BOOL)muted;
1794
1795#if TARGET_OS_IPHONE
1796
1797#pragma mark Device Manager (iOS)
1798
1813- (PanoResult)setLoudspeakerStatus:(BOOL)enable;
1822- (BOOL)isEnabledLoudspeaker;
1823
1845- (BOOL)isFrontCamera;
1846
1857- (NSString * _Nullable)getCameraDeviceId:(BOOL)frontCamera;
1858
1877- (PanoResult)startPreviewWithView:(PanoView * _Nonnull)view
1878 config:(PanoRtcVideoConfig * _Nullable)config;
1895- (PanoResult)startPreviewWithDelegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
1896 profile:(PanoVideoProfileType)profile;
1910
1924
1925#endif
1926
1927#if TARGET_OS_OSX
1928
1929#pragma mark Device Manager (macOS)
1930
1941- (NSArray<PanoRtcDeviceInfo *> * _Nullable)enumerateDevices:(PanoDeviceType)type;
1942
1959- (PanoResult)setDevice:(NSString * _Nonnull)deviceId
1960 withType:(PanoDeviceType)type;
1977- (PanoResult)setDefaultDeviceWithType:(PanoDeviceType)type;
1990- (BOOL)isDefaultDeviceWithType:(PanoDeviceType)type;
2001- (NSString * _Nullable)getDevice:(PanoDeviceType)type;
2002
2023- (PanoResult)startPreview:(NSString * _Nonnull)deviceId
2024 withView:(PanoView * _Nonnull)view
2025 config:(PanoRtcVideoConfig * _Nullable)config;
2044- (PanoResult)startPreview:(NSString * _Nonnull)deviceId
2045 withDelegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
2046 profile:(PanoVideoProfileType)profile;
2061- (PanoResult)stopPreview:(NSString * _Nonnull)deviceId;
2062
2079- (PanoResult)startAudioDeviceTestWithRecord:(NSString * _Nonnull)recordDeviceId
2080 playout:(NSString * _Nonnull)playoutDeviceId;
2081
2095
2110- (PanoResult)startRecordDeviceTest:(NSString * _Nonnull)recordDeviceId;
2111
2125
2142- (PanoResult)startPlayoutDeviceTest:(NSString * _Nonnull)playoutDeviceId
2143 filename:(NSString * _Nonnull)filename;
2144
2158
2167- (SInt16)getTestRecordingLevel;
2168
2177- (SInt16)getTestPlayoutLevel;
2178
2179#pragma mark Screen Source Manager (macOS)
2180
2191- (NSArray<PanoRtcScreenSourceInfo *> * _Nullable)enumerateScreenSources:(PanoScreenSourceType)type;
2192
2209- (PanoResult)setScreenSource:(PanoScreenSourceID)id
2210 withType:(PanoScreenSourceType)type;
2211
2228- (PanoResult)enableSreenFilterSelfApp:(BOOL)enable;
2229
2244- (PanoResult)setScreenOptimization:(BOOL)motion;
2245
2246// Use beginConfiguration and commitConfiguration to batch multiple configuration
2247// operations on a running capture engine into an atomic update.
2263- (PanoResult)beginScreenConfiguration:(BOOL)resetConfig;
2292- (PanoResult)selectSharedScreen:(PanoScreenSourceID)id;
2310- (PanoResult)addSharedScreenSource:(PanoScreenSourceID)id
2311 withType:(PanoScreenSourceType)type;
2329- (PanoResult)removeSharedScreenSource:(PanoScreenSourceID)id
2330 withType:(PanoScreenSourceType)type;
2348- (PanoResult)addUnsharedScreenSource:(PanoScreenSourceID)id
2349 withType:(PanoScreenSourceType)type;
2367- (PanoResult)removeUnsharedScreenSource:(PanoScreenSourceID)id
2368 withType:(PanoScreenSourceType)type;
2369
2370#endif
2371
2372#pragma mark External Device Manager
2373
2383
2393
2394
2395#pragma mark Audio Mixing Manager
2396
2414- (PanoResult)createAudioMixingTask:(SInt64)taskId
2415 filename:(NSString * _Nonnull)filename;
2416
2432- (PanoResult)destroyAudioMixingTask:(SInt64)taskId;
2433
2453- (PanoResult)startAudioMixingTask:(SInt64)taskId
2454 withConfig:(PanoRtcAudioMixingConfig * _Nonnull)config;
2455
2473- (PanoResult)updateAudioMixingTask:(SInt64)taskId
2474 withConfig:(PanoRtcAudioMixingConfig * _Nonnull)config;
2475
2491- (PanoResult)stopAudioMixingTask:(SInt64)taskId;
2492
2508- (PanoResult)resumeAudioMixing:(SInt64)taskId;
2509
2525- (PanoResult)pauseAudioMixing:(SInt64)taskId;
2526
2541- (SInt64)getAudioMixingDuration:(SInt64)taskId;
2542
2554- (SInt64)getAudioMixingCurrentTimestamp:(SInt64)taskId;
2555
2573- (PanoResult)seekAudioMixing:(SInt64)taskId
2574 timestamp:(SInt64)timestampMs;
2575
2576#pragma mark Snapshot Methods
2577
2595- (PanoResult)snapshotVideo:(NSString * _Nonnull)outputDir
2596 userId:(UInt64)userId
2597 option:(PanoRtcSnapshotVideoOption * _Nullable)option;
2598
2599#pragma mark Whiteboard Methods
2600
2610
2637- (PanoResult)switchWhiteboardEngine:(NSString * _Nonnull)whiteboardId;
2638
2639#pragma mark Troubleshoot Methods
2640
2649+ (void)setLogLevel:(PanoLogLevel)level;
2650
2659+ (NSString * _Nonnull)getSdkVersion;
2660
2673- (void * _Nullable)getNativeHandle;
2674
2691- (PanoResult)startAudioDumpWithFilePath:(NSString * _Nonnull)filePath
2692 maxFileSize:(SInt64)maxFileSize;
2706
2721- (PanoResult)sendFeedback:(PanoFeedbackInfo * _Nonnull)info;
2722
2734
2754- (PanoResult)startNetworkTestWithToken:(NSString * _Nonnull)token
2755 delegate:(id<PanoRtcNetworkTestDelegate> _Nonnull)delegate;
2769
2770#pragma mark Option Methods
2771
2788- (PanoResult)setOption:(NSObject * _Nullable)option
2789 forType:(PanoOptionType)type;
2790
2811- (PanoResult)setDeviceBoundOption:(NSObject * _Nullable)option
2812 forType:(PanoOptionType)type
2813 forDevice:(NSString * _Nonnull)deviceId;
2814
2815#pragma mark Customized Methods
2816
2833- (PanoResult)setParameters:(NSString * _Nonnull)param;
2834
2835
2856- (PanoResult)setMediaProcessor:(PanoMediaProcessorType)type
2857 processor:(NSObject* _Nullable)processor
2858 param:(void* _Nullable)param;
2859
2882- (PanoResult)setDeviceBoundMediaProcessor:(PanoMediaProcessorType)type
2883 processor:(NSObject* _Nullable)processor
2884 param:(void* _Nullable)param
2885 forDevice:(NSString* _Nonnull)deviceId;
2886
2904- (PanoResult)sendAudioControlMessage:(NSData *) data;
2905
2906@end
2907
2908
2909#pragma mark - PanoRtcVideoStreamDelegate
2910
2919@protocol PanoRtcVideoStreamDelegate <NSObject>
2920@optional
2921
2934- (void)onUserVideoStart:(UInt64)userId
2935 stream:(SInt32)streamId
2936 maxProfile:(PanoVideoProfileType)maxProfile;
2947- (void)onUserVideoStop:(UInt64)userId
2948 stream:(SInt32)streamId;
2949
2962- (void)onUserVideoSubscribe:(UInt64)userId
2963 stream:(SInt32)streamId
2964 result:(PanoSubscribeResult)result;
2965
2976- (void)onUserVideoMute:(UInt64)userId
2977 stream:(SInt32)streamId;
2988- (void)onUserVideoUnmute:(UInt64)userId
2989 stream:(SInt32)streamId;
2990
3001- (void)onFirstVideoDataReceived:(UInt64)userId
3002 stream:(SInt32)streamId;
3003
3014- (void)onFirstVideoFrameRendered:(UInt64)userId
3015 stream:(SInt32)streamId;
3016
3031- (void)onVideoSnapshotCompleted:(UInt64)userId
3032 stream:(SInt32)streamId
3033 succeed:(BOOL)succeed
3034 filename:(NSString * _Nonnull)filename;
3035
3048 - (void)onVideoCaptureStateChange:(PanoVideoCaptureState)state
3049 stream:(SInt32)streamId
3050 device:(NSString * _Nonnull)deviceId;
3051
3052@end
3053
3054
3055#pragma mark - PanoRtcVideoStreamManager
3056
3068__attribute__((visibility("default"))) @interface PanoRtcVideoStreamManager : NSObject
3069
3071+ (instancetype)new NS_UNAVAILABLE;
3072
3074- (instancetype)init NS_UNAVAILABLE;
3075
3076#pragma mark Video Stream Methods
3077
3092- (PanoResult)setDelegate:(id<PanoRtcVideoStreamDelegate> _Nullable)delegate;
3093
3108- (SInt32)createVideoStream:(NSString * _Nonnull)deviceId;
3123- (PanoResult)destroyVideoStream:(SInt32)streamId;
3124
3142- (PanoResult)setCaptureDevice:(NSString * _Nonnull)deviceId
3143 stream:(SInt32)streamId;
3154- (NSString * _Nullable)getCaptureDevice:(SInt32)streamId;
3155
3178- (PanoResult)startVideo:(SInt32)streamId
3179 view:(PanoView * _Nullable)view
3180 config:(PanoRtcVideoConfig * _Nullable)config;
3201- (PanoResult)startVideo:(SInt32)streamId
3202 delegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
3203 profile:(PanoVideoProfileType)profile;
3224- (PanoResult)startVideo:(SInt32)streamId
3225 delegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
3226 config:(PanoRtcVideoSourceConfig * _Nullable)config;
3241- (PanoResult)stopVideo:(SInt32)streamId;
3242
3267- (PanoResult)subscribeVideo:(UInt64)userId
3268 stream:(SInt32)streamId
3269 view:(PanoView * _Nullable)view
3270 config:(PanoRtcVideoConfig * _Nullable)config;
3293- (PanoResult)subscribeVideo:(UInt64)userId
3294 stream:(SInt32)streamId
3295 delegate:(id<PanoRtcRenderDelegate> _Nonnull)delegate
3296 profile:(PanoVideoProfileType)profile;
3316- (PanoResult)unsubscribeVideo:(UInt64)userId
3317 stream:(SInt32)streamId;
3318
3335- (PanoResult)muteVideo:(SInt32)streamId;
3352- (PanoResult)unmuteVideo:(SInt32)streamId;
3353
3370- (PanoResult)setVideoFilter:(id<PanoRtcVideoFilterDelegate> _Nullable)filter
3371 stream:(SInt32)streamId;
3372
3392- (PanoResult)snapshotVideo:(UInt64)userId
3393 stream:(SInt32)streamId
3394 outputDir:(NSString * _Nonnull)outputDir
3395 option:(PanoRtcSnapshotVideoOption * _Nullable)option;
3396
3397@end
3398
3399#pragma mark - PanoRtcMessageDelegate
3400
3407@protocol PanoRtcMessageDelegate <NSObject>
3408@optional
3409
3429- (void)onServiceStateChanged:(PanoMessageServiceState)state reason:(PanoResult)reason;
3430
3441- (void)onUserMessage:(UInt64)userId data:(NSData *)data;
3442
3453- (void)onSubscribeTopic:(NSString *)topic result:(PanoResult)result;
3454
3469- (void)onTopicMessage:(NSString *)topic
3470 userId:(UInt64)userId
3471 data:(NSData *)data
3472 timestamp:(NSTimeInterval)timestamp;
3473
3488- (void)onTopicMessage:(NSString *)topic
3489 userId:(UInt64)userId
3490 data:(NSData *)data;
3491
3506- (void)onPublishTopicMessageFailed:(NSString *)topic
3507 userId:(UInt64)userId
3508 requestId:(UInt32)requestId
3509 reason:(PanoResult)reason;
3510
3521- (void)onPropertyChanged:(NSArray<PanoPropertyAction *> *)props;
3522
3523@end
3524
3525#pragma mark - PanoRtcMessage
3526
3533__attribute__((visibility("default"))) @interface PanoRtcMessage : NSObject
3534
3536+ (instancetype)new NS_UNAVAILABLE;
3537
3539- (instancetype)init NS_UNAVAILABLE;
3540
3547@property (weak, nonatomic) id<PanoRtcMessageDelegate> delegate;
3548
3569- (PanoResult)sendMessageToUser:(UInt64)userId
3570 data:(NSData *)data;
3571
3592- (PanoResult)broadcastMessage:(NSData *)data
3593 sendBack:(BOOL)sendBack;
3594
3617- (PanoResult)publishTopic:(NSString *)topic
3618 data:(NSData *)data
3619 requestId:(UInt32)requestId;
3620
3635- (PanoResult)subscribe:(NSString *)topic;
3636
3651- (PanoResult)unsubscribe:(NSString *)topic;
3652
3669- (PanoResult)setProperty:(NSString *)name
3670 value:(NSData *)value;
3671
3672@end
3673
3674
3675#pragma mark - PanoRtcRemoteControllerDelegate
3676
3684@optional
3685
3696- (void)onRemoteControlRequest:(UInt64)userId needElevation:(BOOL)needElevation;
3697
3708- (void)onRemoteControlResponse:(UInt64)userId result:(PanoResult)result;
3709
3720- (void)onRemoteControlCancelled:(UInt64)userId reason:(PanoResult)reason;
3721
3722@end
3723
3724#pragma mark - PanoRtcRemoteController
3725
3732__attribute__((visibility("default"))) @interface PanoRtcRemoteController : NSObject
3733
3735+ (instancetype)new NS_UNAVAILABLE;
3736
3738- (instancetype)init NS_UNAVAILABLE;
3739
3746@property (weak, nonatomic) id<PanoRtcRemoteControllerDelegate> delegate;
3747
3765- (PanoResult)requestRemoteControl:(UInt64)userId needElevation:(BOOL)needElevation;
3766
3783- (PanoResult)acceptRemoteControl:(UInt64)userId;
3784
3799- (PanoResult)rejectRemoteControl:(UInt64)userId;
3800
3815- (PanoResult)cancelRemoteControl:(UInt64)userId;
3816
3837- (PanoResult)setModifierFlags:(UInt64)userId flags:(PanoModifierFlag)flags;
3838
3859- (PanoResult)sendKeyboardEvent:(UInt64)userId event:(PanoKeyboardEvent *)event;
3860
3861@end
3862
3863#pragma mark - PanoRtcCameraController
3864
3871__attribute__((visibility("default"))) @interface PanoRtcCameraController : NSObject
3872
3874+ (instancetype)new NS_UNAVAILABLE;
3875
3877- (instancetype)init NS_UNAVAILABLE;
3878
3888
3905- (PanoResult)setCameraFocusPointInPreview:(CGPoint)point;
3906
3916
3931- (PanoResult)setCameraExposurePointInPreview:(CGPoint)point;
3932
3933@end
3934
3935NS_ASSUME_NONNULL_END
PanoDeviceRating
设备评分分值
Definition: PanoEnumerates.h:895
PanoModifierFlag
修饰键类型
Definition: PanoEnumerates.h:991
PanoQualityRating
质量评分分值。
Definition: PanoEnumerates.h:879
PanoScreenScalingRatio
屏幕缩放比例类型。
Definition: PanoEnumerates.h:268
PanoScreenSourceType
屏幕源类型。
Definition: PanoEnumerates.h:258
PanoSubscribeResult
用户媒体订阅结果。
Definition: PanoEnumerates.h:142
PanoMediaProcessorType
媒体处理类型。
Definition: PanoEnumerates.h:911
PanoOptionType
可选项类型。
Definition: PanoEnumerates.h:531
PanoMessageServiceState
消息服务状态。
Definition: PanoEnumerates.h:961
PanoUserLeaveReason
用户离开原因。
Definition: PanoEnumerates.h:128
PanoLogLevel
日志输出级别。
Definition: PanoEnumerates.h:689
PanoVideoProfileType
视频设定类型。
Definition: PanoEnumerates.h:154
PanoVideoRotation
视频旋转值。
Definition: PanoEnumerates.h:202
PanoAudioCallType
音频接入类型。
Definition: PanoEnumerates.h:867
PanoAudioMixingState
混音状态。
Definition: PanoEnumerates.h:725
PanoResult
返回。
Definition: PanoEnumerates.h:19
PanoFailoverState
故障转移状态。
Definition: PanoEnumerates.h:88
PanoScreenCaptureState
屏幕采集状态。
Definition: PanoEnumerates.h:248
PanoDeviceType
设备类型。
Definition: PanoEnumerates.h:214
PanoVideoCaptureState
视频采集状态。
Definition: PanoEnumerates.h:238
PanoDeviceState
设备状态。
Definition: PanoEnumerates.h:226
UIView PanoView
PANO视图类。
Definition: PanoObjects.h:22
UInt32 PanoScreenSourceID
屏幕源标识类。
Definition: PanoObjects.h:43
PanoExternalAudioPlayer PanoRtcExternalAudioPlayer
PanoRtcExternalAudioPlayer 接口类提供了所有的外置音频播放相关方法。
Definition: PanoRtcEngineKit.h:880
PanoExternalAudioRecorder PanoRtcExternalAudioRecorder
PanoRtcExternalAudioRecorder 接口类提供了所有的外置音频录制相关方法。
Definition: PanoRtcEngineKit.h:867
PanoExternalAudioPlayer 接口类提供了所有的外置音频播放相关方法。
Definition: PanoExternalObjects.h:90
PanoExternalAudioRecorder 接口类提供了所有的外置音频录制相关方法。
Definition: PanoExternalObjects.h:24
用户反馈信息类,用于发送用户反馈。
Definition: PanoObjects.h:746
键盘事件。
Definition: PanoObjects.h:832
Definition: PanoObjects.h:823
PanoRtcAnnotationManager 接口类对应用程序提供了所有的标注对象管理相关方法。
Definition: PanoRtcAnnotation.h:573
音频格式类。
Definition: PanoObjects.h:147
音频接收统计类。
Definition: PanoObjects.h:195
音频混音配置类。
Definition: PanoObjects.h:768
音频接收统计类。
Definition: PanoObjects.h:273
音频发送统计类。
Definition: PanoObjects.h:229
CameraController,相机控制器接口。
Definition: PanoRtcEngineKit.h:3872
BOOL isCameraFocusSupported()
检测设备是否支持手动对焦,该方法需要在相机启动预览后调用。
BOOL isCameraExposureSupported()
检测设备是否支持设置曝光区域,该方法需要在相机启动预览后调用。
instancetype init()
此方法不可用。
instancetype new()
此方法不可用。
用于加入频道的配置类。
Definition: PanoObjects.h:68
设备信息类。
Definition: PanoObjects.h:516
PanoRtcEngineKit 对象的配置类。
Definition: PanoObjects.h:48
PanoRtcEngineKit 接口类提供了应用程序调用所需的所有方法。
Definition: PanoRtcEngineKit.h:900
PanoResult unmuteVideo()
恢复视频。
PanoRtcMessage * messageService
获取消息服务的接口指针
Definition: PanoRtcEngineKit.h:936
PanoRtcVideoRenderManager * videoRenderManager
获取视频渲染管理器
Definition: PanoRtcEngineKit.h:963
PanoResult stopSoundCardMonitor()
停止声卡数据监控器。(仅限macOS)
NSString *_Nonnull getSdkVersion()
返回 PANO SDK 的版本信息
SInt16 getRecordingLevel()
获取音频采集强度值。
instancetype new()
此方法不可用。
PanoResult unmuteScreen()
恢复屏幕共享。
void leaveChannel()
离开频道。
void destroy()
销毁 PanoRtcEngineKit 对象。
PanoResult muteAudio()
静音。
PanoResult startAudioPlayback()
开始音频设备播放(建议配合外部采集播放时的一些特殊需求使用)
SInt16 getPlayoutLevel()
获取音频播放强度值。
PanoResult stopAudioPlayback()
关闭音频设备播放(建议配合外部采集播放时的一些特殊需求使用)
PanoResult stopScreen()
停止屏幕共享。
PanoResult stopSoundCardShare()
停止声卡音频共享。(仅限macOS)
PanoResult commitScreenConfiguration()
提交一组配置更改。(仅限macOS)
PanoResult startAudioRecording()
开始音频设备录音(建议配合外部采集播放时的一些特殊需求使用)
PanoResult switchCamera()
切换前后置摄像头。(仅限iOS)
PanoRtcRecording * recordingService
获取录制服务接口
Definition: PanoRtcEngineKit.h:972
PanoResult stopRecordDeviceTest()
停止音频采集设备测试。(仅限macOS)
PanoResult stopPreview()
停止当前摄像头预览。(仅限iOS)
PanoResult stopAudioDump()
停止音频转储。
PanoResult stopPlayoutDeviceTest()
停止音频播放设备测试。(仅限macOS)
SInt16 getTestRecordingLevel()
获取录制设备测试时的音频采集强度值。(仅限macOS)
BOOL isFrontCamera()
获取当前摄像头类型。(仅限iOS)
PanoResult muteScreen()
暂停屏幕共享。
PanoResult muteVideo()
暂停视频。
PanoRtcVideoStreamManager * videoStreamManager
获取视频流管理器对象。
Definition: PanoRtcEngineKit.h:918
PanoRtcExternalAudioPlayer *_Nonnull externalAudioPlayer()
获取外接音频播放设备。
BOOL isMultiCameraCaptureSupported()
指示此设备是否支持多摄像头采集。(仅限iOS)
PanoRtcRemoteController * remoteController
获取远程控制服务的接口指针
Definition: PanoRtcEngineKit.h:945
PanoResult stopAudioRecording()
关闭音频设备录音(建议配合外部采集播放时的一些特殊需求使用)
PanoResult stopVideo()
停止视频。
PanoResult startSoundCardShare()
开启声卡音频共享。(仅限macOS)
PanoRtcGroupManager * groupManager
获取分组管理器的接口指针
Definition: PanoRtcEngineKit.h:954
PanoResult startAudio()
开启音频。
PanoRtcExternalAudioRecorder *_Nonnull externalAudioRecorder()
获取外接音频录制设备。
PanoRtcAnnotationManager * annotationManager
获取标注管理器对象。
Definition: PanoRtcEngineKit.h:927
PanoResult unmuteAudio()
取消静音。
PanoResult stopAudio()
停止音频。
PanoRtcWhiteboard *_Nonnull whiteboardEngine()
获取白板控制对象。
PanoResult startScreen()
开启屏幕共享。
void *_Nullable getNativeHandle()
返回原生 PANO RtcEngine 句柄。
BOOL isEnabledLoudspeaker()
获取扬声器启用状态。(仅限iOS)
PanoResult stopNetworkTest()
停止网络测试。
PanoResult stopAudioDeviceTest()
停止音频设备测试。(仅限macOS)
instancetype init()
此方法不可用。
SInt16 getTestPlayoutLevel()
获取播放设备测试时的音频播放强度值。(仅限macOS)
PanoDeviceRating queryDeviceRating()
查询当前设备的评分值。
RtcGroupManager, 分组服务核心接口
Definition: PanoRtcGroupManager.h:128
RtcMessage, 消息服务核心接口
Definition: PanoRtcEngineKit.h:3534
id< PanoRtcMessageDelegate > delegate
设置消息服务的回调。
Definition: PanoRtcEngineKit.h:3547
instancetype init()
此方法不可用。
instancetype new()
此方法不可用。
网络质量报告。
Definition: PanoObjects.h:808
PanoRtcRecording, 录制服务核心接口
Definition: PanoRtcRecording.h:44
RemoteController, 远程控制服务核心接口
Definition: PanoRtcEngineKit.h:3733
instancetype init()
此方法不可用。
instancetype new()
此方法不可用。
id< PanoRtcRemoteControllerDelegate > delegate
设置远程控制服务的回调。
Definition: PanoRtcEngineKit.h:3746
屏幕源信息类。
Definition: PanoObjects.h:524
视频快照选项类。
Definition: PanoObjects.h:798
系统信息统计类。
Definition: PanoObjects.h:500
视频配置类。
Definition: PanoObjects.h:111
视频格式类。
Definition: PanoObjects.h:163
视频接收带宽评估统计类。
Definition: PanoObjects.h:486
视频接收统计类。
Definition: PanoObjects.h:389
视频渲染管理器
Definition: PanoRtcRenderManager.h:20
视频发送带宽评估统计类。
Definition: PanoObjects.h:461
视频发送统计类。
Definition: PanoObjects.h:332
视频源配置类。
Definition: PanoObjects.h:128
PanoRtcVideoStreamManager 接口类提供了应用程序调用所需的所有视频流相关方法。
Definition: PanoRtcEngineKit.h:3069
instancetype init()
此方法不可用。
instancetype new()
此方法不可用。
PanoRtcWhiteboard 接口类对应用程序提供了所有的白板相关方法。
Definition: PanoRtcWhiteboard.h:356
PanoRtcAudioDataExProcessorDelegate 协议启用音频数据的回调。
Definition: PanoRtcEngineKit.h:802
PanoRtcEngineDelegate 协议启用对应用程序的回调。
Definition: PanoRtcEngineKit.h:31
void onWhiteboardStop()
回调默认白板停止的事件。
void onWhiteboardUnavailable()
回调白板不可用的事件。
void onWhiteboardStart()
回调默认白板开启的事件。
void onWhiteboardAvailable()
回调白板可用的事件。
RtcMessage的回调函数,在使用RtcMessage之前必须要设置回调以获取事件通知。
Definition: PanoRtcEngineKit.h:3407
PanoRtcNetworkTestDelegate 协议启用网络测试的回调。
Definition: PanoRtcEngineKit.h:839
RemoteController的回调函数,在使用RemoteController之前必须要设置回调以获取事件通知。
Definition: PanoRtcEngineKit.h:3683
PanoRtcRenderDelegate 协议启用对外置渲染器的回调。
Definition: PanoRtcEngineKit.h:690
PanoRtcVideoFilterDelegate 协议启用视频数据的回调。
Definition: PanoRtcEngineKit.h:757
PanoRtcVideoStreamDelegate 协议启用对应用程序的视频流相关回调。
Definition: PanoRtcEngineKit.h:2919