Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
d9107a4b
Commit
d9107a4b
authored
May 09, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 静音相关
parent
0718d473
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
YHVideoPlayerControlView.swift
...xy/Classes/Tools/VideoPlay/YHVideoPlayerControlView.swift
+11
-0
YHVideoPlayerVC.swift
galaxy/galaxy/Classes/Tools/VideoPlay/YHVideoPlayerVC.swift
+3
-0
No files found.
galaxy/galaxy/Classes/Tools/VideoPlay/YHVideoPlayerControlView.swift
View file @
d9107a4b
...
@@ -12,9 +12,16 @@ import AVFoundation
...
@@ -12,9 +12,16 @@ import AVFoundation
class
YHVideoPlayerControlView
:
BMPlayerControlView
{
class
YHVideoPlayerControlView
:
BMPlayerControlView
{
var
isSilient
=
true
{
didSet
{
self
.
player
?
.
avPlayer
?
.
isMuted
=
isSilient
}
}
lazy
var
volumeBtn
=
{
lazy
var
volumeBtn
=
{
let
btn
=
UIButton
()
let
btn
=
UIButton
()
btn
.
setImage
(
UIImage
(
named
:
"mine_btn_setting"
),
for
:
.
normal
)
btn
.
setImage
(
UIImage
(
named
:
"mine_btn_setting"
),
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
didVolumeBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
return
btn
}()
}()
...
@@ -52,4 +59,8 @@ class YHVideoPlayerControlView: BMPlayerControlView {
...
@@ -52,4 +59,8 @@ class YHVideoPlayerControlView: BMPlayerControlView {
self
.
volumeBtn
.
alpha
=
alpha
self
.
volumeBtn
.
alpha
=
alpha
})
})
}
}
@objc
func
didVolumeBtnClicked
()
{
self
.
isSilient
=
!
self
.
isSilient
}
}
}
galaxy/galaxy/Classes/Tools/VideoPlay/YHVideoPlayerVC.swift
View file @
d9107a4b
...
@@ -127,6 +127,7 @@ class YHVideoPlayerVC: YHBaseViewController {
...
@@ -127,6 +127,7 @@ class YHVideoPlayerVC: YHBaseViewController {
view
.
likeBlock
=
{
[
weak
self
]
flag
in
view
.
likeBlock
=
{
[
weak
self
]
flag
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
self
.
player
.
pause
()
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
...
@@ -158,6 +159,7 @@ class YHVideoPlayerVC: YHBaseViewController {
...
@@ -158,6 +159,7 @@ class YHVideoPlayerVC: YHBaseViewController {
view
.
starBlock
=
{
[
weak
self
]
flag
in
view
.
starBlock
=
{
[
weak
self
]
flag
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
if
YHLoginManager
.
shared
.
isLogin
()
==
false
{
self
.
player
.
pause
()
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
let
vc
=
UINavigationController
(
rootVC
:
YHPhoneLoginViewController
())
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
...
@@ -259,6 +261,7 @@ extension YHVideoPlayerVC {
...
@@ -259,6 +261,7 @@ extension YHVideoPlayerVC {
}
}
return
return
}
}
self
.
player
.
pause
()
YHShareManager
.
shared
.
sendVideoContent
(
title
,
""
,
thumbImg
,
link
:
link
)
YHShareManager
.
shared
.
sendVideoContent
(
title
,
""
,
thumbImg
,
link
:
link
)
}
}
}
}
...
...
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