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
4c2c58f2
authored
Jan 17, 2025
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复连麦声音问题
parent
5df38f0e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/LinkMicro/Other/FUSAgoraHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/LinkMicro/Other/FUSAgoraHelper.m
View file @
4c2c58f2
...
@@ -577,13 +577,15 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
...
@@ -577,13 +577,15 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
-
(
void
)
delayUpdateToSpeakerPlay
{
-
(
void
)
delayUpdateToSpeakerPlay
{
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
AVAudioSessionCategoryOptions
currentCategoryOptions
=
[
AVAudioSession
sharedInstance
].
categoryOptions
;
AVAudioSessionCategoryOptions
currentCategoryOptions
=
[
AVAudioSession
sharedInstance
].
categoryOptions
;
[
self
.
agoraEngine
setEnableSpeakerphone
:
YES
];
[
self
->
_agoraEngine
setEnableSpeakerphone
:
YES
];
currentCategoryOptions
=
[
AVAudioSession
sharedInstance
].
categoryOptions
;
AVAudioSessionCategoryOptions
categoryOptions
=
43
;
AVAudioSessionCategory
currentCategory
=
[
AVAudioSession
sharedInstance
].
category
;
AVAudioSessionCategoryOptions
categoryOptions
=
AVAudioSessionCategoryOptionMixWithOthers
|
AVAudioSessionCategoryOptionAllowBluetooth
|
AVAudioSessionCategoryOptionDefaultToSpeaker
|
AVAudioSessionCategoryOptionAllowBluetoothA2DP
;
NSError
*
error
;
NSError
*
error
;
if
(
currentCategoryOptions
<
categoryOptions
)
{
[[
AVAudioSession
sharedInstance
]
setCategory
:
AVAudioSessionCategoryPlayAndRecord
withOptions
:
categoryOptions
error
:&
error
];
[[
AVAudioSession
sharedInstance
]
setCategory
:
AVAudioSessionCategoryPlayAndRecord
withOptions
:
categoryOptions
error
:&
error
];
}
AVAudioSessionRouteDescription
*
currentRoute
=
[
AVAudioSession
sharedInstance
].
currentRoute
;
AVAudioSessionRouteDescription
*
currentRoute
=
[
AVAudioSession
sharedInstance
].
currentRoute
;
BOOL
needForceToSpeaker
=
NO
;
BOOL
needForceToSpeaker
=
NO
;
for
(
AVAudioSessionPortDescription
*
port
in
currentRoute
.
outputs
)
{
for
(
AVAudioSessionPortDescription
*
port
in
currentRoute
.
outputs
)
{
...
@@ -598,9 +600,9 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
...
@@ -598,9 +600,9 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
}
}
[[
AVAudioSession
sharedInstance
]
setActive
:
YES
error
:
nil
];
[[
AVAudioSession
sharedInstance
]
setActive
:
YES
error
:
nil
];
currentCategoryOptions
=
[
AVAudioSession
sharedInstance
].
categoryOptions
;
currentCategoryOptions
=
[
AVAudioSession
sharedInstance
].
categoryOptions
;
});
}
}
#pragma mark - AgoraVideoFrameDelegate
#pragma mark - AgoraVideoFrameDelegate
-
(
BOOL
)
onRenderVideoFrame
:
(
AgoraOutputVideoFrame
*
)
videoFrame
uid
:
(
NSUInteger
)
uid
channelId
:
(
NSString
*
)
channelId
{
-
(
BOOL
)
onRenderVideoFrame
:
(
AgoraOutputVideoFrame
*
)
videoFrame
uid
:
(
NSUInteger
)
uid
channelId
:
(
NSString
*
)
channelId
{
if
(
uid
==
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
roomId
.
integerValue
&&
if
(
uid
==
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
roomId
.
integerValue
&&
...
...
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