123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- //
- // MyAgoraRtcEngineKit.m
- // RCTAgora
- //
- // Created by 邓博 on 2017/6/30.
- // Copyright © 2017年 Syan. All rights reserved.
- //
-
- #import "AgoraConst.h"
-
- @implementation AgoraConst
-
- static AgoraConst *_person;
- + (instancetype)allocWithZone:(struct _NSZone *)zone{
- static dispatch_once_t predicate;
- dispatch_once(&predicate, ^{
- _person = [super allocWithZone:zone];
- });
- return _person;
- }
-
- + (instancetype)share {
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- _person = [[self alloc]init];
- });
- return _person;
- }
-
- + (NSArray<NSString*>*) supportEvents {
- NSArray<NSString*>* array = @[AGWarning,
- AGError,
- AGApiCallExecute,
- AGJoinChannelSuccess,
- AGRejoinChannelSuccess,
- AGLeaveChannel,
- AGClientRoleChanged,
- AGLocalUserRegistered,
- AGUserInfoUpdated,
- AGUserJoined,
- AGUserOffline,
- AGConnectionStateChanged,
- AGConnectionLost,
- AGTokenPrivilegeWillExpire,
- AGRequestToken,
-
- AGAudioVolumeIndication,
- AGActiveSpeaker,
- AGFirstLocalAudioFrame,
- AGFirstRemoteAudioFrame,
- AGFirstRemoteAudioDecoded,
- AGFirstLocalVideoFrame,
- AGFirstRemoteVideoFrame,
- AGUserMuteAudio,
- AGVideoSizeChanged,
- AGRemoteVideoStateChanged,
- AGLocalPublishFallbackToAudioOnly,
- AGRemoteSubscribeFallbackToAudioOnly,
-
- AGAudioRouteChanged,
- AGCameraFocusAreaChanged,
- AGCameraExposureAreaChanged,
-
- AGRtcStats,
- AGLastmileQuality,
- AGNetworkQuality,
- AGLocalVideoStats,
- AGRemoteVideoStats,
- AGRemoteAudioStats,
- AGLocalAudioStateChanged,
- AGRemoteAudioStateChanged,
- AGLocalAudioStats,
- AGMediaRelayStateChanged,
- AGReceivedChannelMediaRelay,
-
- AGAudioMixingStateChanged,
- AGRemoteAudioMixingStart,
- AGRemoteAudioMixingFinish,
- AGAudioEffectFinish,
-
- AGStreamPublished,
- AGStreamUnpublish,
- AGTranscodingUpdate,
-
- AGStreamInjectedStatus,
-
- AGReceiveStreamMessage,
- AGOccurStreamMessageError,
-
- AGMediaEngineLoaded,
- AGMediaEngineStartCall,
- AGIntervalTest,
- AGLastmileProbeTestResult,
- AGRtmpStreamingStateChanged,
- AGLocalVideoChanged,
- AGNetworkTypeChanged,
- AGFirstRemoteAudioFrame,
- AGMediaMetaDataReceived];
-
- NSMutableArray<NSString *> *eventList = [NSMutableArray arrayWithCapacity:[array count]];
- [array enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
- id mapObj = [NSString stringWithFormat:@"%@%@", AG_PREFIX, obj];
- [eventList addObject:mapObj];
- }];
- return eventList;
- }
-
- - (id)copyWithZone:(NSZone *)zone {
- return _person;
- }
-
- @end
|