123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- //
- // XYLiveRoomChatInfo.h
- // Starbuds
- //
- // Created by pajia on 2020/1/2.
- // Copyright © 2020 翟玉磊. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "AWRichText.h"
- #import "XYHeadlineInfo.h"
- NS_ASSUME_NONNULL_BEGIN
- typedef NS_ENUM(NSInteger, XYPkBattlingStatus) {
- XYPkBattlingStatusLeftDefault = -2,//表示显示左边头像
- XYPkBattlingStatusRightDefault = -1,//表示显示右边新增邀请按钮
- XYPkBattlingStatusWait = 1,//等待加入
- XYPkBattlingStatusBattling = 2,//PK 中
- XYPkBattlingStatusPunish = 3,//惩罚
- XYPkBattlingStatusOver = 4,//结束
- };
- @class XYGiftTrajectoryModel;
- @interface XYLiveRoomMessageInfo : NSObject
- + (XYLiveRoomMessageInfo *)creat:(NSDictionary *)dataDict;
- /// 消息中的完整字典数据
- @property (nonatomic, strong) NSDictionary *dataDict;
- @property (nonatomic, strong) NSDictionary *msgDict;
- /// 消息类型
- @property (nonatomic, strong) NSString *type;
- /// 消息时间戳
- @property (nonatomic, strong) NSString *timestamp;
- /// 用户配置信息字符串 通过截取字段
- @property (nonatomic, strong) NSString *profileString;
- /// 发送者用户id
- @property (nonatomic, strong) NSString *senderId;
- /// 发送者用户名
- @property (nonatomic, strong) NSString *senderNickname;
- /// 发送者头像url
- @property (nonatomic, strong) NSString *senderAvatarUrl;
- /// 接收者用户id
- @property (nonatomic, strong) NSString *reciveId;
- /// 接收者用户id
- @property (nonatomic, strong) NSString *reciveNickname;
- /// 接收者的头像url
- @property (nonatomic, strong) NSString *reciveAvatarUrl;
- /// 主播的用户id
- @property (nonatomic, strong) NSString *anchorUserId;
- /// 勋章点亮状态dict
- @property (nonatomic, strong) NSDictionary *medalShinyStatus;
- /// 用户等级
- @property (nonatomic, assign) NSInteger grageNum;
- /// 用户等级勋章点亮状态 0:置灰;1:点亮
- @property (nonatomic, assign) NSInteger grageMedalStatus;
- /// 主播等级
- @property (nonatomic, assign) NSInteger anchorGrageNum;
- /// 贵族等级
- @property (nonatomic, assign) NSInteger nobility;
- /// 官方
- @property (nonatomic, assign) NSInteger isOfficial;
- /// 房主
- @property (nonatomic, assign) NSInteger isHouseOwer;
- /// 房管
- @property (nonatomic, assign) NSInteger isHouseManager;
- /// 主持人
- @property (nonatomic, assign) NSInteger isHost;
- /// 性别 1男 2女
- @property (nonatomic, assign) NSInteger userSex;
- /// 年龄
- @property (nonatomic, assign) NSString *userAge;
- ///聊天用户标签(等级、靓号、官方等)+ 用户名字AWRichText
- @property (nonatomic, strong) AWRichText *userMarkRichText;
- ///聊天、礼物文字
- @property (nonatomic, strong) AWRichText *textRichText;
- ///飘屏通知AWRichText
- @property (nonatomic, strong) AWRichText *noticeRichText;
- /// 内容标识
- @property (nonatomic, strong) NSString *contentText1;
- @property (nonatomic, strong) NSString *contentText2;
- @property (nonatomic, strong) NSString *contentText3;
- ///聊天列表总高度
- @property (nonatomic, assign) float cellHeight;
- ///聊天列表需要显示的宽度
- @property (nonatomic, assign) float cellShadowWidth;
- ///聊天列表用户标签高度
- @property (nonatomic, assign) float cellUserMarkHeight;
- /// 礼物对应的动画资源id
- @property (nonatomic, strong) NSString *giftAnimationId;
- /// 是否为贴纸
- @property (nonatomic, strong) NSString *giftIsSticker;
- /// 贴纸名字
- @property (nonatomic, strong) NSString *giftStickerName;
- /// 贴纸路径url
- @property (nonatomic, strong) NSString *giftStickerPath;
- /// 贴纸显示时间
- @property (nonatomic, strong) NSString *giftStickerDuration;
- /// 礼物id
- @property (nonatomic, strong) NSString *giftId;
- /// 礼物数量
- @property (nonatomic, strong) NSString *giftQuantity;
- /// 礼物价格
- @property (nonatomic, strong) NSString *giftPrice;
- /// 1 - 购买的 2 - 从背包送的 3 - 百变礼盒开出
- @property (nonatomic, strong) NSString *giftSourceType;
- /// 礼物连击次数
- @property (nonatomic, strong) NSString *giftCombo;
- /// 礼物连击标识
- @property (nonatomic, strong) NSString *comboKeyHash;
- /// 礼物图片url
- @property (nonatomic, strong) NSString *giftImageUrl;
- /// 是否聊天列表显示
- @property (nonatomic, assign) BOOL showInComment;
- /// 是否弹幕显示 isComboTimeout = true 时 标识这是一条连击结束的消息,只在弹幕中构造
- @property (nonatomic, assign) BOOL isComboTimeout;
- /// 是否连击banner显示
- @property (nonatomic, assign) BOOL isCombo;
- /// 礼物连击等级
- @property (nonatomic, assign) NSInteger comboValueLevel;
- /// 礼物连击倒计时秒数
- @property (nonatomic, assign) NSInteger comboPeriodSec;
- /// 礼物连击banner背景动画id
- @property (nonatomic, strong) NSString *giftBannerAnimationId;
- /// 礼物连击动效等级
- @property (nonatomic, assign) NSInteger comboAnimationLevel;
- /// 礼物连击时全区通知的背景动画id
- @property (nonatomic, strong) NSString *floatScreenAnimationId;
- /// 礼物连击时全区通知的停留的时间
- @property (nonatomic, assign) float floatScreenStayTime;
- /// 头饰动效id
- @property (nonatomic, strong) NSString *headWearAnimationId;
- /// 汽泡动效id
- @property (nonatomic, strong) NSString *bubbleId;
- /// 礼物名字
- @property (nonatomic, strong) NSString *giftName;
- /// 中奖金额
- @property (nonatomic, assign) NSString *winAmount;
- /// 中奖倍数
- @property (nonatomic, assign) NSString *winMultiple;
- /// 中奖最大倍数
- @property (nonatomic, assign) NSString *winMultipleMax;
- /// 热度
- @property (nonatomic, strong) NSString *heatNum;
- /// 观看人数
- @property (nonatomic, strong) NSString *watchNum;
- /// 直播状态
- @property (nonatomic, strong) NSString *liveStatus;
- /// 直播流状态
- @property (nonatomic, strong) NSString *streamStatus;
- /// 推流地址
- @property (nonatomic, strong) NSString *pullUrl;
- /// 房管
- @property (nonatomic, assign) int userMasterAction;
- /// 神秘人
- @property (nonatomic, strong) NSString *anonymousGift;
- /// 目标类型
- @property (nonatomic, strong) NSString *targetType;
- /// 用户角色
- @property (nonatomic, strong) NSString *userRole;
- /// 主播收入改变
- @property (nonatomic, strong) NSString *scoreValue;
- /// 官方
- @property (nonatomic, strong) NSString *offical;
- /// 11weath财富 21charm魅力
- @property (nonatomic, strong) NSString *scoreType;
- /// 主播魅力值
- @property (nonatomic, strong) NSString *glamorousNum;
- /// 主播收入
- @property (nonatomic, strong) NSString *incomeAmount;
- /// 是否为活动消息(太空旅行、幸运礼物/等)一排
- @property (nonatomic, assign) BOOL isActivity;
- /// 是否为房间通知(进房,上下麦,房间上锁等)一排
- @property (nonatomic, assign) BOOL isAlert;
- /// 是否为礼物或者聊天文字消,两排
- @property (nonatomic, assign) BOOL isTextOrGift;
- /// 活动图片url
- @property (nonatomic, strong) NSString *activityIcon;
- /// 活动跳转链接
- @property (nonatomic, strong) NSString *activityUrl;
- /// 靓号
- @property (nonatomic, strong) NSString *niceNo;
- /// 靓号等级
- @property (nonatomic, assign) NSInteger niceLevel;
- /// 坐骑id
- @property (nonatomic, strong) NSString *mountsId;
- /// 坐骑名字
- @property (nonatomic, strong) NSString *mountsName;
- /// 坐骑动画id
- @property (nonatomic, strong) NSString *mountsAnimationId;
- /// 勋章显示时间
- @property (nonatomic, assign) int nobleTime;
- /// 勋章等级
- @property (nonatomic, strong) NSString *nobleValue;
- /// vip等级
- @property (nonatomic, strong) NSString *vipValue;
- /// 星耀等级
- @property (nonatomic, strong) NSString *starLevel;
- /// 勋章ID
- @property (nonatomic, strong) NSString *medalId;
- /// 活动勋章数组
- @property (nonatomic, strong) NSArray *activityMedals;
- //1v1视频剩余可用时间
- @property (nonatomic, readwrite, copy) NSString *minutesRemain;
- //通话计费时长
- @property (nonatomic, readwrite, copy) NSString *hisMinutes;
- //通话费用
- @property (nonatomic, readwrite, copy) NSString *hisAmount;
- //pk
- @property (nonatomic, strong) NSString *pkToken;
- @property (nonatomic, strong) NSString *pkBattleId;
- ////0拒绝 1同意
- @property (nonatomic, strong) NSString *pkDecision;
- @property (nonatomic, assign) NSInteger pkProceedTime;
- @property (nonatomic, assign) NSInteger pkPunishTime;
- @property (nonatomic, assign) NSInteger pkChangeValue;
- @property (nonatomic, strong) NSString *pkUserId;
- @property (nonatomic, strong) NSMutableArray *pkTopGivers;
- ///battlingStatus 1等待加入 2PK中 3惩罚 4结束
- @property (nonatomic, assign) XYPkBattlingStatus pkBattlingStatus;
- ///battleRole 1 红方 2 蓝方
- @property (nonatomic, assign) NSInteger pkRole;
- ///battleResult 0 打平 1 红方胜 2 蓝方胜
- @property (nonatomic, assign) NSInteger pkResult;
- @property (nonatomic, assign) NSInteger pkRankIndex;
- ///battleResult 0 打平 1胜 2败
- @property (nonatomic, assign) NSInteger pkRankResult;
- ///临时类型标识
- @property (nonatomic, assign) NSInteger tempType;
- /// noticeType : 0 无消息 , 1 聊天框显示 , 2顶部显示 , 3都显示
- @property (nonatomic, assign) NSInteger noticeType;
- /// 语音房消息
- /// 聊天室房间id
- @property (nonatomic, copy) NSString *roomId;
- /// 麦位
- @property (nonatomic, assign) NSInteger seatNo;
- /// 上麦下麦用户id
- @property (nonatomic, copy) NSString *userId;
- /// 表情id
- @property (nonatomic, copy) NSString *expId;
- /// 表情url
- @property (nonatomic, copy) NSString *expUrl;
- /// 表情播放时间
- @property (nonatomic, assign) NSInteger playTimes;
- /// 表情最后帧数
- @property (nonatomic, assign) NSInteger finalFrame;
- /// 通知类型
- @property (nonatomic, copy) NSString *noticestyle;
- /// 时间
- @property (nonatomic, assign) NSInteger countTime;
- @property (nonatomic, assign) NSInteger countTime1;
- /// 快照id
- @property (nonatomic, copy) NSString *snapId;
- @property (nonatomic, strong) NSAttributedString *contentAttributedString;
- @property (nonatomic, strong) NSAttributedString *nameContentAttributedString;
- + (AWRTTextComponent *)getTextComponent:(NSString *)content color:(UIColor *)color font:(UIFont *)font padding:(NSInteger )padding;
- + (void)handleInfo:(XYLiveRoomMessageInfo *)info;
- /// 设置勋章点亮状态
- - (void)setupMedalShinyStatus:(NSDictionary *)dict;
- /// 用户信息实体 (主要做解析附加信息)
- /// "profileString": "00100000000000000000",
- @property (nonatomic, strong) XYLiveUserModel *userInfo;
- /// 头条房间消息实体
- @property (nonatomic, strong) XYHeadlineInfo *headlineInfo;
- /// 聊天室礼物运行轨迹
- @property (nonatomic, strong) NSMutableArray <XYGiftTrajectoryModel *>*giftTrajectorys;
- @end
- ///礼物运行轨迹
- @interface XYGiftTrajectoryModel : NSObject
- @property (nonatomic, copy) NSString *sendUserId;
- @property (nonatomic, copy) NSString *targetUserId;
- @property (nonatomic, copy) NSString *giftId;
- ///轨迹点数组 获取点 CGPoint point = CGPointFromString([points objectAtIndex:0]);
- @property (nonatomic, strong) NSMutableArray *points;
- - (instancetype)initWithSendUserId:(NSString *)sendUserId targetUserId:(NSString *)targetUserId giftId:(NSString *)giftId;
- @end
- NS_ASSUME_NONNULL_END
|