// // PBSDK.h // PBSDK // // Created by mbp on 2024/12/8. // #import #import "PBUserInfo.h" #define HXAppKey @"1104241202169398#live-video" #define RtcAppId @"f27f43da2ed24e68ac07e11124011d35" @import AgoraRtcKit; NS_ASSUME_NONNULL_BEGIN @protocol PBSDKDelegate - (void)pb_rtcEngineRequestToken:(AgoraRtcEngineKit *)engine; - (void)pb_rtcEngine:(AgoraRtcEngineKit *)engine didJoinedOfUid:(NSUInteger)uid elapsed:(NSInteger)elapsed; - (void)pb_rtcEngine:(AgoraRtcEngineKit *)engine didOfflineOfUid:(NSUInteger)uid reason:(AgoraUserOfflineReason)reason; - (void)pb_rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine remoteVideoStateChangedOfUid:(NSUInteger)uid state:(AgoraVideoRemoteState)state reason:(AgoraVideoRemoteReason)reason elapsed:(NSInteger)elapsed; @end @interface PBAgoraRtcEngineKitCfg: NSObject /// 声网 appId @property (nonatomic, copy) NSString *appId; @end @interface PBSDK : NSObject @property (nonatomic,assign) BOOL isUser;//是否是用户 不是则为主播 @property(nonatomic,copy) void (^moduleKeepAliveCallback)(id result, BOOL keepAlive); @property (nonatomic, weak ) id delegate; @property(nonatomic,copy) void (^navigateToVuePageBlock)(NSString *url); @property (nonatomic, copy ) NSString *accessToken; @property (nonatomic, copy ) NSNumber *expiresTime; @property (nonatomic, copy ) NSString *refreshToken; @property (nonatomic, strong) AgoraRtcEngineKit *agoraRtcEngineKit; + (PBSDK *)shared; + (void)initSDK; + (BOOL)isLogin; @property (nonatomic,strong) PBUserInfo *userinfo; - (void)loginUser; - (void)openLive; ///初始化环形 - (void)initiateIM; + (UIViewController *)yt_topmostViewController; + (UIViewController *)dc_findCurrentShowingViewController; @end NS_ASSUME_NONNULL_END