Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
62fb3e9e
authored
Jun 25, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交打包
parent
6711239e
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
175 additions
and
131 deletions
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.m
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/Contents.json
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/fus_home_broadcastAlert_logo_icon@2x.png
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/fus_home_broadcastAlert_logo_icon@3x.png
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/logo@2x.png
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/logo@3x.png
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_bg_img.imageset/Contents.json
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_bg_img.imageset/live_pic_in_pic_bg_img.png
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_pk_bg_img.imageset/Contents.json
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_pk_bg_img.imageset/live_pic_in_pic_pk_bg_img.png
FuSiLive/Classes/NewLive/Main/Other/FormatContent/FUSFormatContentHelper.m
FuSiLive/Classes/NewLive/Main/Other/FunctionViewHelper/FUSLiveChatDataSourceHelper.h
FuSiLive/Classes/NewLive/Main/Other/FunctionViewHelper/FUSLiveChatDataSourceHelper.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftCollectionViewCell.m
FuSiLive/Classes/NewLive/Main/View/MinimizeView/FUSLiveMinimizeView.m
FuSiLive/FUSAPPConfigs/FUSFuSiConfigs.m
FuSiLive/FUSAPPConfigs/FUSFuSiWebViewEventHelper.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.m
View file @
62fb3e9e
...
@@ -119,6 +119,7 @@
...
@@ -119,6 +119,7 @@
if
(
!
_webEventHelper
)
{
if
(
!
_webEventHelper
)
{
_webEventHelper
=
[
FUSConfig
.
sharedInstanced
.
webConfig
getNewWebViewEventHelper
];
_webEventHelper
=
[
FUSConfig
.
sharedInstanced
.
webConfig
getNewWebViewEventHelper
];
_webEventHelper
.
webview
=
self
;
}
}
}
}
...
...
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/Contents.json
View file @
62fb3e9e
...
@@ -5,18 +5,18 @@
...
@@ -5,18 +5,18 @@
"scale"
:
"1x"
"scale"
:
"1x"
},
},
{
{
"filename"
:
"fus_home_broadcastAlert_logo_icon@2x.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"filename"
:
"logo@2x.png"
,
"scale"
:
"2x"
"scale"
:
"2x"
},
},
{
{
"filename"
:
"fus_home_broadcastAlert_logo_icon@3x.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"filename"
:
"logo@3x.png"
,
"scale"
:
"3x"
"scale"
:
"3x"
}
}
],
],
"info"
:
{
"info"
:
{
"
version"
:
1
,
"
author"
:
"xcode"
,
"
author"
:
"xcode"
"
version"
:
1
}
}
}
}
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/fus_home_broadcastAlert_logo_icon@2x.png
0 → 100644
View file @
62fb3e9e
12.4 KB
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/fus_home_broadcastAlert_logo_icon@3x.png
0 → 100644
View file @
62fb3e9e
27.6 KB
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/logo@2x.png
deleted
100644 → 0
View file @
6711239e
7.23 KB
FuSiLive/Assets.xcassets/Common/icon_logo.imageset/logo@3x.png
deleted
100644 → 0
View file @
6711239e
12.2 KB
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_bg_img.imageset/Contents.json
deleted
100644 → 0
View file @
6711239e
{
"images"
:
[
{
"filename"
:
"live_pic_in_pic_bg_img.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_bg_img.imageset/live_pic_in_pic_bg_img.png
deleted
100644 → 0
View file @
6711239e
25.6 KB
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_pk_bg_img.imageset/Contents.json
deleted
100644 → 0
View file @
6711239e
{
"images"
:
[
{
"filename"
:
"live_pic_in_pic_pk_bg_img.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
FuSiLive/Assets.xcassets/Live/live_pic_in_pic_pk_bg_img.imageset/live_pic_in_pic_pk_bg_img.png
deleted
100644 → 0
View file @
6711239e
30.5 KB
FuSiLive/Classes/NewLive/Main/Other/FormatContent/FUSFormatContentHelper.m
View file @
62fb3e9e
...
@@ -349,7 +349,9 @@
...
@@ -349,7 +349,9 @@
if
(
!
[
content
containsString
:
@"<img src=https://big.bgp.ourpow.com/comm/userlevel/v3"
]
if
(
!
[
content
containsString
:
@"<img src=https://big.bgp.ourpow.com/comm/userlevel/v3"
]
&&
!
[
content
containsString
:
@"<fusi_img src=fusi://fusi.com?level="
]
&&
!
[
content
containsString
:
@"<fusi_img src=fusi://fusi.com?level="
]
&&
!
[
content
containsString
:
@"fusi_font"
]
&&
!
[
content
containsString
:
@"fusi_font"
]
&&
!
[
content
containsString
:
@"fusi_del"
])
{
&&
!
[
content
containsString
:
@"fusi_del"
]
&&
!
[
content
containsString
:
@"<fusi_img src=fusi://fusi.com?timeLevel="
]
)
{
return
content
;
return
content
;
}
}
...
@@ -357,6 +359,7 @@
...
@@ -357,6 +359,7 @@
content
=
[
content
stringByReplacingOccurrencesOfString
:
@"<img src=https://big.bgp.ourpow.com/comm/userlevel/v3"
withString
:
@"<fusi_img src=fusi://hideImg"
];
content
=
[
content
stringByReplacingOccurrencesOfString
:
@"<img src=https://big.bgp.ourpow.com/comm/userlevel/v3"
withString
:
@"<fusi_img src=fusi://hideImg"
];
/// VIP等级替换
if
([
content
containsString
:
@"<fusi_img src=fusi://fusi.com?level="
])
{
if
([
content
containsString
:
@"<fusi_img src=fusi://fusi.com?level="
])
{
NSString
*
regularStr
=
@"<fusi_img src=fusi://fusi
\\
.com
\\
?level=([0-9]+) />"
;
NSString
*
regularStr
=
@"<fusi_img src=fusi://fusi
\\
.com
\\
?level=([0-9]+) />"
;
...
@@ -387,6 +390,72 @@
...
@@ -387,6 +390,72 @@
}
}
}
}
/// 在线等级替换
if
([
content
containsString
:
@"<fusi_img src=fusi://fusi.com?timeLevel="
])
{
NSString
*
regularStr
=
@"<fusi_img src=fusi://fusi
\\
.com
\\
?timeLevel=([0-9]+) />"
;
NSError
*
error
;
// 正则搜索
NSRegularExpression
*
regularExpression
=
[
NSRegularExpression
regularExpressionWithPattern
:
regularStr
options
:
NSRegularExpressionCaseInsensitive
error:
&
error
];
// 获取搜索结果数组
NSArray
*
matchArr
=
[
regularExpression
matchesInString
:
content
options
:
NSMatchingReportProgress
range
:
NSMakeRange
(
0
,
content
.
length
)];
for
(
NSTextCheckingResult
*
result
in
matchArr
)
{
NSInteger
level
=
0
;
if
(
result
.
numberOfRanges
>=
2
)
{
NSRange
levelRange
=
[
result
rangeAtIndex
:
1
];
NSString
*
levelStr
=
[
content
substringWithRange
:
levelRange
];
level
=
levelStr
.
integerValue
;
}
if
(
level
<=
0
)
{
continue
;
}
else
{
NSString
*
path
=
[
NSString
stringWithFormat
:
@"<img src=https://big.bgp.ourpow.com/comm/userlevel/fusi/TimeLevels/fus_time_level_%zd.png />"
,
level
];
content
=
[
content
stringByReplacingCharactersInRange
:
result
.
range
withString
:
path
];
// NSString *document = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingString:@"/ATest"];
// [FUSFileHelper createDirectoryAtPath:document];
//
// for (NSInteger i = 1; i <= 99;i++) {
// NSString *filePath = [document stringByAppendingPathComponent:[NSString stringWithFormat:@"fus_time_level_%zd.png",i]];
//
// if (![FUSFileHelper fus_isExistFileAtPath:filePath]) {
// CGFloat width = 14;
// if (i >= 10) {
// width = 20;
// }
// /// 生成等级图片。保存在本地,然后再将路径加入HTML里面
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, width, 14)];
// timeLabel.text = @(i).stringValue;
// timeLabel.backgroundColor = [UIColor colorWithWhite:1 alpha:0.32];
// timeLabel.textColor = [UIColor whiteColor];
// timeLabel.font = [UIFont fus_themeFont:9];
// timeLabel.layer.cornerRadius = 7;
// timeLabel.textAlignment = NSTextAlignmentCenter;
// timeLabel.layer.masksToBounds = YES;
//
// UIGraphicsBeginImageContextWithOptions(timeLabel.bounds.size, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.bounds afterScreenUpdates:YES];
// UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
// UIGraphicsEndImageContext();
//
// if (screenImage) {
// NSData *imageData = UIImagePNGRepresentation(screenImage);
// [FUSFileHelper fus_writeDataToFile:imageData filePath:filePath];
// }
// }
// }
// UIImage *testImg = [UIImage imageWithContentsOfFile:filePath];
// content = [content stringByReplacingCharactersInRange:result.range withString:[NSString stringWithFormat:@"<img src=%@ />",filePath]];
}
}
}
if
([
content
containsString
:
@"fusi_del"
])
{
if
([
content
containsString
:
@"fusi_del"
])
{
NSString
*
regularStr
=
@"<fusi_del>(.*?)</fusi_del>"
;
NSString
*
regularStr
=
@"<fusi_del>(.*?)</fusi_del>"
;
...
...
FuSiLive/Classes/NewLive/Main/Other/FunctionViewHelper/FUSLiveChatDataSourceHelper.h
View file @
62fb3e9e
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#define MAX_DATA_COUNT 300 // 消息最大条数,超过这个数目则移除前方数据
#define MAX_DATA_COUNT 300 // 消息最大条数,超过这个数目则移除前方数据
#define LEVEL_IMAGE_WIDTH 30 // 等级图片宽度
#define LEVEL_IMAGE_WIDTH 30 // 等级图片宽度
#define LEVEL_IMAGE_HEIGHT
(LEVEL_IMAGE_WIDTH * 0.5)
#define LEVEL_IMAGE_HEIGHT
17
#define NOTIFICATION_SHOW_BULLETS @"notificationShowBulletsView"
#define NOTIFICATION_SHOW_BULLETS @"notificationShowBulletsView"
...
...
FuSiLive/Classes/NewLive/Main/Other/FunctionViewHelper/FUSLiveChatDataSourceHelper.m
View file @
62fb3e9e
...
@@ -714,27 +714,6 @@
...
@@ -714,27 +714,6 @@
[
attr
appendAttributedString
:[
self
createAttributedStringForString
:
@" : "
]];
[
attr
appendAttributedString
:[
self
createAttributedStringForString
:
@" : "
]];
[
attr
addAttribute
:
NSForegroundColorAttributeName
value
:[
UIColor
whiteColor
]
range
:
NSMakeRange
(
attr
.
length
-
3
,
3
)];
[
attr
addAttribute
:
NSForegroundColorAttributeName
value
:[
UIColor
whiteColor
]
range
:
NSMakeRange
(
attr
.
length
-
3
,
3
)];
}
}
}
else
{
if
(
model
.
lev
)
{
UIButton
*
levBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
levBtn
.
frame
=
CGRectMake
(
0
,
0
,
17
,
17
);
levBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
12
];
levBtn
.
contentVerticalAlignment
=
UIControlContentVerticalAlignmentCenter
;
levBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentCenter
;
levBtn
.
backgroundColor
=
[
UIColor
colorWithWhite
:
1
alpha
:
0
.
32
];
[
levBtn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
levBtn
.
layer
.
cornerRadius
=
levBtn
.
height
/
2
.
0
;
levBtn
.
layer
.
masksToBounds
=
YES
;
[
levBtn
setTitle
:
model
.
lev
forState
:
UIControlStateNormal
];
if
(
model
.
lev
.
length
<=
1
)
{
levBtn
.
width
=
17
;
}
else
{
levBtn
.
width
=
25
;
}
NSAttributedString
*
levAttr
=
[
NSAttributedString
attachmentStringWithContent
:
levBtn
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
levBtn
.
size
alignToFont
:
[
UIFont
fus_themeFont
:
self
.
fontSize
]
alignment
:
YYTextVerticalAlignmentCenter
];
[
attr
insertAttributedString
:
levAttr
atIndex
:
0
];
}
}
}
CGFloat
imageH
=
LEVEL_IMAGE_HEIGHT
;
CGFloat
imageH
=
LEVEL_IMAGE_HEIGHT
;
...
@@ -769,31 +748,6 @@
...
@@ -769,31 +748,6 @@
});
});
}
}
-
(
NSAttributedString
*
)
createStarLevAttributedStringForLev
:
(
NSString
*
)
lev
{
if
(
!
lev
)
{
return
nil
;
}
FUSStyleButton
*
levBtn
=
[
FUSStyleButton
buttonWithType
:
UIButtonTypeCustom
];
[
levBtn
setTitle
:
lev
forState
:
UIControlStateNormal
];
levBtn
.
frame
=
CGRectMake
(
0
,
0
,
16
,
16
);
levBtn
.
layer
.
masksToBounds
=
YES
;
levBtn
.
layer
.
cornerRadius
=
levBtn
.
height
/
2
.
0
;
levBtn
.
layer
.
borderWidth
=
1
;
levBtn
.
layer
.
borderColor
=
[[
UIColor
whiteColor
]
CGColor
];
levBtn
.
layer
.
backgroundColor
=
[[
UIColor
colorWithHex
:
@"49EAF0"
]
CGColor
];
[
levBtn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
UIFont
*
levFont
=
FUS_LIVE_FONT
(
10
);
levBtn
.
titleLabel
.
font
=
levFont
;
levBtn
.
userInteractionEnabled
=
NO
;
NSAttributedString
*
attr
=
[
NSAttributedString
attachmentStringWithContent
:
levBtn
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
CGSizeMake
(
20
,
16
)
alignToFont
:
FUS_LIVE_FONT
(
_fontSize
)
alignment
:
YYTextVerticalAlignmentCenter
];
return
attr
;
}
// 根据 string 创建一个可变的可变富文本
// 根据 string 创建一个可变的可变富文本
-
(
NSMutableAttributedString
*
)
createAttributedStringForString
:
(
NSString
*
)
string
-
(
NSMutableAttributedString
*
)
createAttributedStringForString
:
(
NSString
*
)
string
{
{
...
@@ -847,7 +801,7 @@
...
@@ -847,7 +801,7 @@
if
(
model
.
lev
)
{
if
(
model
.
lev
)
{
UIButton
*
levBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
UIButton
*
levBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
levBtn
.
frame
=
CGRectMake
(
0
,
0
,
1
7
,
17
);
levBtn
.
frame
=
CGRectMake
(
0
,
0
,
1
4
,
14
);
levBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
12
];
levBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
12
];
levBtn
.
contentVerticalAlignment
=
UIControlContentVerticalAlignmentCenter
;
levBtn
.
contentVerticalAlignment
=
UIControlContentVerticalAlignmentCenter
;
levBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentCenter
;
levBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentCenter
;
...
@@ -857,9 +811,9 @@
...
@@ -857,9 +811,9 @@
levBtn
.
layer
.
masksToBounds
=
YES
;
levBtn
.
layer
.
masksToBounds
=
YES
;
[
levBtn
setTitle
:
model
.
lev
forState
:
UIControlStateNormal
];
[
levBtn
setTitle
:
model
.
lev
forState
:
UIControlStateNormal
];
if
(
model
.
lev
.
length
<=
1
)
{
if
(
model
.
lev
.
length
<=
1
)
{
levBtn
.
width
=
1
7
;
levBtn
.
width
=
1
4
;
}
else
{
}
else
{
levBtn
.
width
=
2
5
;
levBtn
.
width
=
2
0
;
}
}
NSAttributedString
*
levAttr
=
[
NSAttributedString
attachmentStringWithContent
:
levBtn
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
levBtn
.
size
alignToFont
:
[
UIFont
fus_themeFont
:
self
.
fontSize
]
alignment
:
YYTextVerticalAlignmentCenter
];
NSAttributedString
*
levAttr
=
[
NSAttributedString
attachmentStringWithContent
:
levBtn
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
levBtn
.
size
alignToFont
:
[
UIFont
fus_themeFont
:
self
.
fontSize
]
alignment
:
YYTextVerticalAlignmentCenter
];
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
View file @
62fb3e9e
...
@@ -572,7 +572,7 @@ FUSLinkMicUserListDelegate
...
@@ -572,7 +572,7 @@ FUSLinkMicUserListDelegate
*/
*/
-
(
void
)
initActivtiyView
-
(
void
)
initActivtiyView
{
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
||
!
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
return
;
return
;
}
}
...
@@ -1132,7 +1132,7 @@ FUSLinkMicUserListDelegate
...
@@ -1132,7 +1132,7 @@ FUSLinkMicUserListDelegate
-
(
void
)
fus_reloadRealtimeActivityWebView
{
-
(
void
)
fus_reloadRealtimeActivityWebView
{
if
(
!
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
return
;
return
;
}
}
...
@@ -1206,6 +1206,7 @@ FUSLinkMicUserListDelegate
...
@@ -1206,6 +1206,7 @@ FUSLinkMicUserListDelegate
-
(
void
)
fus_initRealtimeActivityView
:
(
FUSLiveroomActivityInfoModel
*
)
model
{
-
(
void
)
fus_initRealtimeActivityView
:
(
FUSLiveroomActivityInfoModel
*
)
model
{
//TODO: ludy 7540版本后,这个时事活动的页面变成了一个横向的时事活动网页+一个竖直的游戏运营网页,创建方法在fus_reloadRealtimeActivityWebView
//TODO: ludy 7540版本后,这个时事活动的页面变成了一个横向的时事活动网页+一个竖直的游戏运营网页,创建方法在fus_reloadRealtimeActivityWebView
return
;
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
return
;
return
;
}
}
...
@@ -3008,7 +3009,7 @@ FUSLinkMicUserListDelegate
...
@@ -3008,7 +3009,7 @@ FUSLinkMicUserListDelegate
-
(
void
)
fus_showBroadcastWithDict
:
(
NSDictionary
*
)
dict
{
-
(
void
)
fus_showBroadcastWithDict
:
(
NSDictionary
*
)
dict
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
||
!
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
return
;
return
;
}
}
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftCollectionViewCell.m
View file @
62fb3e9e
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
@property
(
nonatomic
,
strong
)
UIImageView
*
exclusiveBgImageView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
exclusiveBgImageView
;
// 专属礼物头像
// 专属礼物头像
@property
(
nonatomic
,
strong
)
FUSRichIcon
View
*
exclusiveFaceImageView
;
@property
(
nonatomic
,
strong
)
UIImage
View
*
exclusiveFaceImageView
;
// 专属礼物所属的昵称
// 专属礼物所属的昵称
@property
(
nonatomic
,
strong
)
UILabel
*
exclusiveUserLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
exclusiveUserLabel
;
...
@@ -166,7 +166,9 @@
...
@@ -166,7 +166,9 @@
self
.
exclusiveBgImageView
.
contentMode
=
UIViewContentModeScaleToFill
;
self
.
exclusiveBgImageView
.
contentMode
=
UIViewContentModeScaleToFill
;
[
self
addSubview
:
self
.
exclusiveBgImageView
];
[
self
addSubview
:
self
.
exclusiveBgImageView
];
self
.
exclusiveFaceImageView
=
[[
FUSRichIconView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
17
,
17
)];
self
.
exclusiveFaceImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
17
,
17
)];
self
.
exclusiveFaceImageView
.
layer
.
cornerRadius
=
8
.
5
;
self
.
exclusiveFaceImageView
.
layer
.
masksToBounds
=
YES
;
self
.
exclusiveFaceImageView
.
hidden
=
YES
;
self
.
exclusiveFaceImageView
.
hidden
=
YES
;
[
self
addSubview
:
self
.
exclusiveFaceImageView
];
[
self
addSubview
:
self
.
exclusiveFaceImageView
];
...
@@ -226,7 +228,7 @@
...
@@ -226,7 +228,7 @@
}
}
_exclusiveUserLabel
.
text
=
model
.
exclusive
.
nickname
;
_exclusiveUserLabel
.
text
=
model
.
exclusive
.
nickname
;
[
_exclusiveFaceImageView
fus_setupLiveIconWithFacePath
:
model
.
exclusive
.
face
level
:
model
.
exclusive
.
isVip
?
model
.
exclusive
.
level
:
0
hiddenLevel
:
YES
animated
:
NO
];
[
_exclusiveFaceImageView
setLiveFaceWebImageWithSubURLString
:
model
.
exclusive
.
face
placeholder
:
UIImage
.
fus_defaultIcon
];
[
self
fus_layoutExclusiveViews
];
[
self
fus_layoutExclusiveViews
];
}
else
{
}
else
{
...
...
FuSiLive/Classes/NewLive/Main/View/MinimizeView/FUSLiveMinimizeView.m
View file @
62fb3e9e
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
#import "FUSLiveMinimizeView.h"
#import "FUSLiveMinimizeView.h"
#import "FUSBlurImageView.h"
#import "FUSLiveHelper.h"
#import "FUSLiveHelper.h"
...
@@ -21,7 +22,15 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
...
@@ -21,7 +22,15 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
@interface
FUSLiveMinimizeView
()
@interface
FUSLiveMinimizeView
()
// 头像
// 头像
@property
(
nonatomic
,
strong
)
UIImageView
*
backgroundImageView
;
@property
(
nonatomic
,
strong
)
FUSBlurImageView
*
roomUserBgImageView
;
// 主播头像上面显示的logo
@property
(
nonatomic
,
strong
)
UIImageView
*
roomUserlogoImageView
;
// PK头像
@property
(
nonatomic
,
strong
)
FUSBlurImageView
*
pkUserBgImageView
;
// PK头像上面显示的logo
@property
(
nonatomic
,
strong
)
UIImageView
*
pkUserLogoImageView
;
// 内容
// 内容
@property
(
nonatomic
,
strong
)
UIView
*
contentView
;
@property
(
nonatomic
,
strong
)
UIView
*
contentView
;
...
@@ -130,7 +139,10 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
...
@@ -130,7 +139,10 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
if
(
self
)
{
if
(
self
)
{
_sizeLevelType
=
FUSLiveMinimizeViewLevelTypeNormal
;
_sizeLevelType
=
FUSLiveMinimizeViewLevelTypeNormal
;
self
.
clipsToBounds
=
YES
;
self
.
clipsToBounds
=
YES
;
[
self
addSubview
:
self
.
backgroundImageView
];
[
self
addSubview
:
self
.
pkUserBgImageView
];
[
self
.
pkUserBgImageView
addSubview
:
self
.
pkUserLogoImageView
];
[
self
addSubview
:
self
.
roomUserBgImageView
];
[
self
.
roomUserBgImageView
addSubview
:
self
.
roomUserlogoImageView
];
[
self
addSubview
:
self
.
contentView
];
[
self
addSubview
:
self
.
contentView
];
[
self
.
contentView
addSubview
:
self
.
animImageView
];
[
self
.
contentView
addSubview
:
self
.
animImageView
];
[
self
addSubview
:
self
.
closeBtn
];
[
self
addSubview
:
self
.
closeBtn
];
...
@@ -151,9 +163,10 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
...
@@ -151,9 +163,10 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
case
FUSLiveMinimizeViewTypeNormalLive
:
case
FUSLiveMinimizeViewTypeNormalLive
:
[
self
.
animImageView
stopAnimating
];
[
self
.
animImageView
stopAnimating
];
self
.
animImageView
.
hidden
=
YES
;
self
.
animImageView
.
hidden
=
YES
;
[
_backgroundImageView
cancelCurrentImageRequest
];
[
_roomUserBgImageView
fus_setWebImageWithSubURLString
:
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
face
placeholder
:
UIImage
.
fus_defaultIcon
];
self
.
backgroundImageView
.
image
=
[
UIImage
imageNamed
:
@"live_pic_in_pic_bg_img"
];
_roomUserBgImageView
.
layer
.
cornerRadius
=
0
;
_backgroundImageView
.
layer
.
cornerRadius
=
0
;
self
.
roomUserlogoImageView
.
centerY
=
self
.
roomUserlogoImageView
.
height
/
2
.
0
-
10
;
self
.
roomUserlogoImageView
.
centerX
=
self
.
roomUserlogoImageView
.
width
/
2
.
0
;
self
.
closeBtn
.
origin
=
CGPointZero
;
self
.
closeBtn
.
origin
=
CGPointZero
;
[
self
.
closeBtn
setImage
:[
UIImage
imageNamed
:
@"Live_Close"
]
forState
:
UIControlStateNormal
];
[
self
.
closeBtn
setImage
:[
UIImage
imageNamed
:
@"Live_Close"
]
forState
:
UIControlStateNormal
];
self
.
layer
.
cornerRadius
=
10
;
self
.
layer
.
cornerRadius
=
10
;
...
@@ -162,9 +175,14 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
...
@@ -162,9 +175,14 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
case
FUSLiveMinimizeViewTypePK
:
case
FUSLiveMinimizeViewTypePK
:
[
self
.
animImageView
stopAnimating
];
[
self
.
animImageView
stopAnimating
];
self
.
animImageView
.
hidden
=
YES
;
self
.
animImageView
.
hidden
=
YES
;
[
_backgroundImageView
cancelCurrentImageRequest
];
[
_roomUserBgImageView
fus_setWebImageWithSubURLString
:
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
face
placeholder
:
UIImage
.
fus_defaultIcon
];
self
.
backgroundImageView
.
image
=
[
UIImage
imageNamed
:
@"live_pic_in_pic_pk_bg_img"
];
[
_pkUserBgImageView
fus_setWebImageWithSubURLString
:
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
face
placeholder
:
UIImage
.
fus_defaultIcon
];
_backgroundImageView
.
layer
.
cornerRadius
=
0
;
self
.
roomUserlogoImageView
.
centerY
=
self
.
roomUserlogoImageView
.
height
/
2
.
0
-
10
;
self
.
roomUserlogoImageView
.
centerX
=
self
.
roomUserlogoImageView
.
width
/
2
.
0
;
self
.
pkUserLogoImageView
.
centerY
=
self
.
pkUserLogoImageView
.
height
/
2
.
0
-
10
;
self
.
pkUserLogoImageView
.
centerX
=
self
.
pkUserLogoImageView
.
width
/
2
.
0
;
_roomUserBgImageView
.
layer
.
cornerRadius
=
0
;
self
.
closeBtn
.
origin
=
CGPointZero
;
self
.
closeBtn
.
origin
=
CGPointZero
;
[
self
.
closeBtn
setImage
:[
UIImage
imageNamed
:
@"Live_Close"
]
forState
:
UIControlStateNormal
];
[
self
.
closeBtn
setImage
:[
UIImage
imageNamed
:
@"Live_Close"
]
forState
:
UIControlStateNormal
];
self
.
layer
.
cornerRadius
=
10
;
self
.
layer
.
cornerRadius
=
10
;
...
@@ -173,9 +191,9 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
...
@@ -173,9 +191,9 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
case
FUSLiveMinimizeViewTypeLinkMicRoom
:
case
FUSLiveMinimizeViewTypeLinkMicRoom
:
[
self
.
animImageView
startAnimating
];
[
self
.
animImageView
startAnimating
];
self
.
animImageView
.
hidden
=
NO
;
self
.
animImageView
.
hidden
=
NO
;
[
_
backgroundImageView
setLiveFace
WebImageWithSubURLString
:
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
face
placeholder
:
UIImage
.
fus_defaultIcon
];
[
_
roomUserBgImageView
fus_set
WebImageWithSubURLString
:
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
face
placeholder
:
UIImage
.
fus_defaultIcon
];
_
backgroundImageView
.
layer
.
cornerRadius
=
_background
ImageView
.
width
/
2
.
0
f
;
_
roomUserBgImageView
.
layer
.
cornerRadius
=
_roomUserBg
ImageView
.
width
/
2
.
0
f
;
_
background
ImageView
.
layer
.
masksToBounds
=
YES
;
_
roomUserBg
ImageView
.
layer
.
masksToBounds
=
YES
;
self
.
closeBtn
.
origin
=
CGPointMake
(
self
.
contentView
.
right
-
self
.
closeBtn
.
width
-
4
,
4
);
self
.
closeBtn
.
origin
=
CGPointMake
(
self
.
contentView
.
right
-
self
.
closeBtn
.
width
-
4
,
4
);
[
self
.
closeBtn
setImage
:
nil
forState
:
UIControlStateNormal
];
[
self
.
closeBtn
setImage
:
nil
forState
:
UIControlStateNormal
];
self
.
layer
.
cornerRadius
=
0
;
self
.
layer
.
cornerRadius
=
0
;
...
@@ -230,25 +248,40 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
...
@@ -230,25 +248,40 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
if
(
self
.
type
!=
FUSLiveMinimizeViewTypeLinkMicRoom
)
{
if
(
self
.
type
!=
FUSLiveMinimizeViewTypeLinkMicRoom
)
{
self
.
background
ImageView
.
hidden
=
YES
;
self
.
roomUserBg
ImageView
.
hidden
=
YES
;
}
}
/// playerView 内部是有做动画的
/// playerView 内部是有做动画的
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
self
.
frame
=
frame
;
self
.
frame
=
frame
;
if
(
self
.
type
==
FUSLiveMinimizeViewTypeLinkMicRoom
)
{
switch
(
self
.
type
)
{
self
.
backgroundImageView
.
frame
=
CGRectInset
(
bounds
,
kFaceInset
,
kFaceInset
);
case
FUSLiveMinimizeViewTypeNormalLive
:
}
else
{
self
.
roomUserBgImageView
.
frame
=
bounds
;
self
.
backgroundImageView
.
frame
=
bounds
;
self
.
pkUserBgImageView
.
hidden
=
YES
;
break
;
case
FUSLiveMinimizeViewTypePK
:
{
CGRect
frame
=
bounds
;
frame
.
size
.
width
=
bounds
.
size
.
width
/
2
.
0
;
self
.
roomUserBgImageView
.
frame
=
frame
;
frame
.
origin
.
x
=
frame
.
size
.
width
;
self
.
pkUserBgImageView
.
frame
=
frame
;
self
.
pkUserBgImageView
.
hidden
=
NO
;
break
;
}
case
FUSLiveMinimizeViewTypeLinkMicRoom
:
self
.
roomUserBgImageView
.
frame
=
CGRectInset
(
bounds
,
kFaceInset
,
kFaceInset
);
self
.
pkUserBgImageView
.
hidden
=
YES
;
break
;
}
}
self
.
contentView
.
frame
=
bounds
;
self
.
contentView
.
frame
=
bounds
;
self
.
animImageView
.
frame
=
bounds
;
self
.
animImageView
.
frame
=
bounds
;
self
.
playerView
.
frame
=
bounds
;
self
.
playerView
.
frame
=
bounds
;
}
completion
:^
(
BOOL
finished
)
{
}
completion
:^
(
BOOL
finished
)
{
self
.
contentView
.
userInteractionEnabled
=
YES
;
self
.
contentView
.
userInteractionEnabled
=
YES
;
self
.
background
ImageView
.
hidden
=
NO
;
self
.
roomUserBg
ImageView
.
hidden
=
NO
;
}];
}];
}
}
...
@@ -399,15 +432,41 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
...
@@ -399,15 +432,41 @@ typedef NS_ENUM(NSInteger,FUSLiveMinimizeViewLevelType) {
#pragma mark - UI Quick Getters
#pragma mark - UI Quick Getters
-
(
UIImageView
*
)
backgroundImageView
{
-
(
FUSBlurImageView
*
)
roomUserBgImageView
{
if
(
!
_backgroundImageView
)
{
if
(
!
_roomUserBgImageView
)
{
_backgroundImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectInset
(
self
.
bounds
,
kFaceInset
,
kFaceInset
)];
_roomUserBgImageView
=
[[
FUSBlurImageView
alloc
]
init
];
_backgroundImageView
.
contentMode
=
UIViewContentModeScaleAspectFill
;
}
}
return
_
background
ImageView
;
return
_
roomUserBg
ImageView
;
}
}
-
(
UIImageView
*
)
roomUserlogoImageView
{
if
(
!
_roomUserlogoImageView
)
{
_roomUserlogoImageView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"icon_logo"
]];
_roomUserlogoImageView
.
frame
=
CGRectMake
(
0
,
0
,
60
,
50
);
}
return
_roomUserlogoImageView
;
}
-
(
FUSBlurImageView
*
)
pkUserBgImageView
{
if
(
!
_pkUserBgImageView
)
{
_pkUserBgImageView
=
[[
FUSBlurImageView
alloc
]
init
];
}
return
_pkUserBgImageView
;
}
-
(
UIImageView
*
)
pkUserLogoImageView
{
if
(
!
_pkUserLogoImageView
)
{
_pkUserLogoImageView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"icon_logo"
]];
_pkUserLogoImageView
.
frame
=
CGRectMake
(
0
,
0
,
60
,
50
);
}
return
_pkUserLogoImageView
;
}
-
(
UIView
*
)
contentView
{
-
(
UIView
*
)
contentView
{
if
(
!
_contentView
)
{
if
(
!
_contentView
)
{
_contentView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
bounds
];
_contentView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
bounds
];
...
...
FuSiLive/FUSAPPConfigs/FUSFuSiConfigs.m
View file @
62fb3e9e
...
@@ -66,12 +66,12 @@
...
@@ -66,12 +66,12 @@
/// App Version
/// App Version
-
(
NSString
*
)
appVersion
{
-
(
NSString
*
)
appVersion
{
return
@"75
0
0"
;
return
@"75
9
0"
;
}
}
/// App Dot Version
/// App Dot Version
-
(
NSString
*
)
appDotVersion
{
-
(
NSString
*
)
appDotVersion
{
return
@"7.5.
0
.0"
;
return
@"7.5.
9
.0"
;
}
}
/// App Id
/// App Id
...
...
FuSiLive/FUSAPPConfigs/FUSFuSiWebViewEventHelper.m
View file @
62fb3e9e
...
@@ -879,7 +879,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
...
@@ -879,7 +879,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
// 先转化为string,因为说是空字符串也不需要设置
// 先转化为string,因为说是空字符串也不需要设置
NSString
*
wr
=
[
dataDict
[
@"width"
]
stringValue
];
NSString
*
wr
=
[
dataDict
[
@"width"
]
stringValue
];
if
(
wr
.
length
>
0
&&
[
wr
isEqualToString
:
@"-1"
])
{
if
(
wr
.
length
>
0
&&
!
[
wr
isEqualToString
:
@"-1"
])
{
CGFloat
width
=
[
wr
doubleValue
];
CGFloat
width
=
[
wr
doubleValue
];
if
(
unit
==
1
)
{
if
(
unit
==
1
)
{
webView
.
width
=
ceil
(
UIView
.
fus_screenW
*
(
width
/
100
.
0
));
webView
.
width
=
ceil
(
UIView
.
fus_screenW
*
(
width
/
100
.
0
));
...
@@ -887,9 +887,9 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
...
@@ -887,9 +887,9 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
webView
.
width
=
width
;
webView
.
width
=
width
;
}
}
}
}
NSString
*
hr
=
[
dataDict
[
@"h
r
"
]
stringValue
];
NSString
*
hr
=
[
dataDict
[
@"h
eight
"
]
stringValue
];
if
(
hr
.
length
>
0
&&
[
hr
isEqualToString
:
@"-1"
])
{
if
(
hr
.
length
>
0
&&
!
[
hr
isEqualToString
:
@"-1"
])
{
CGFloat
height
=
[
w
r
doubleValue
];
CGFloat
height
=
[
h
r
doubleValue
];
if
(
unit
==
1
)
{
if
(
unit
==
1
)
{
webView
.
height
=
ceil
(
UIView
.
fus_screenW
*
height
/
100
.
0
);
webView
.
height
=
ceil
(
UIView
.
fus_screenW
*
height
/
100
.
0
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment