Skip to content

Dev/4.3.2 #389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 80 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
1e646a8
[Android]Update ci compile script.
xgfd3 May 24, 2024
e3aace7
[Android]adapt to 4.3.2 sdk and etc.
xgfd3 May 24, 2024
997df90
[Android]Update ci compile script.
xgfd3 May 24, 2024
4c56ed0
[Android]Update ci compile script.
xgfd3 May 24, 2024
00f8e6d
[Android]Update ci compile script.
xgfd3 May 24, 2024
0984f16
[Android]Update ci compile script.
xgfd3 May 24, 2024
710dc61
[Android]Update ci compile script.
xgfd3 May 24, 2024
d1360d6
[Android]Update gradle config.
xgfd3 May 24, 2024
dc9c4ec
[Android]Update ci compile script.
xgfd3 May 24, 2024
fd7028d
[Android]Update ci compile script.
xgfd3 May 24, 2024
3fce1df
[Android]Update ci compile script.
xgfd3 May 24, 2024
4c8be6c
[Android]Update ci compile script.
xgfd3 May 24, 2024
0b6e579
[Android]Update ci compile script.
xgfd3 May 24, 2024
ae688fe
[Android]Update ci compile script.
xgfd3 May 24, 2024
48875ec
[Android][Audio]Adapt to 4.3.2 sdk and etc
xgfd3 May 24, 2024
8cbd807
[Android]Update ci compile script and etc.
xgfd3 May 24, 2024
c25fa40
Compose (#381)
xgfd3 May 7, 2024
4a7cead
Swift UI (#382)
xgfd3 May 7, 2024
2a9effa
[Android][Compose]add cases and etc.
xgfd3 May 9, 2024
d44790d
[Android][Compose]update translate and README.
xgfd3 May 9, 2024
464fdff
Update REAMDE
xgfd3 May 9, 2024
cc024ad
Update REAMDE
xgfd3 May 9, 2024
785ad0f
[Android][Compose]update translate.
xgfd3 May 9, 2024
0c06bf0
[Android][Compose]update translate.
xgfd3 May 9, 2024
c085582
[Android][Compose]add cloud build script and etc.
xgfd3 May 24, 2024
471e3f6
[Android][Compose]update cloud build script.
xgfd3 May 24, 2024
606e79a
[Android][Compose]update cloud build script.
xgfd3 May 24, 2024
82b8920
[Android][Compose]update cloud build script.
xgfd3 May 24, 2024
ff792db
[Android][Compose]update cloud build script.
xgfd3 May 24, 2024
f392fc3
[Android][Compose]update cloud build script.
xgfd3 May 24, 2024
930cf5a
[Android][Compose]Renew icon.
xgfd3 May 24, 2024
788ab07
[iOS]Adapt to 4.3.2 and update ci script.
xgfd3 May 24, 2024
d1f5aea
[iOS]Update ci script.
xgfd3 May 24, 2024
d7163a5
[iOS]Update ci script.
xgfd3 May 24, 2024
2985e35
[iOS]Update ci script.
xgfd3 May 24, 2024
35c495f
[iOS]Update ci script.
xgfd3 May 24, 2024
5f29525
[iOS]Update ci script.
xgfd3 May 24, 2024
520909f
[iOS]Update ci script.
xgfd3 May 25, 2024
aca07bf
[iOS]Update ci script.
xgfd3 May 25, 2024
705ce73
[iOS]Update ci script.
xgfd3 May 25, 2024
283e4bf
[iOS] fix ci compile problem.
xgfd3 May 25, 2024
08920d2
[iOS] fix ci.
xgfd3 May 25, 2024
59fbdd4
[iOS] fix ci.
xgfd3 May 25, 2024
33a4b8f
[iOS] fix ci.
xgfd3 May 25, 2024
e16797f
[iOS] fix ci.
xgfd3 May 25, 2024
337bc63
[iOS] fix ci.
xgfd3 May 25, 2024
1e15275
[iOS] fix ci.
xgfd3 May 25, 2024
754fea9
fix ci.
xgfd3 May 25, 2024
ac38eb7
[iOS] Update rtc to 4.3.2.
xgfd3 May 25, 2024
bea30fc
[Mac] update rtc to 4.3.2 and etc.
xgfd3 May 25, 2024
bf55958
Update ci.
xgfd3 May 25, 2024
c81396a
[windows] update rtc to 4.3.2 and ci.
xgfd3 May 25, 2024
6124a7e
Update ci script.
xgfd3 May 27, 2024
fae0f15
[iOS]support file sharing.
xgfd3 May 28, 2024
eba3bdd
[Android][Compose]fix screensharing crash(NMS-21308).
xgfd3 May 29, 2024
2f8f401
[Android]fix proguard bug.
xgfd3 May 29, 2024
fdb8ee8
fix: crash on ipad when pop alert vc
tamworth May 29, 2024
f02e5a3
fix: keyboard dismiss
tamworth May 29, 2024
f0906b5
fix: minor changes
tamworth May 29, 2024
1678aa9
[windows]fix original video average filter bug.
xgfd3 May 29, 2024
990adb8
Merge branch 'dev/4.3.2' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 May 29, 2024
c1a3104
feat: add stabilization button
tamworth May 30, 2024
33a04ce
Merge branch 'dev/4.3.2' of https://github.com/AgoraIO/API-Examples i…
tamworth May 30, 2024
5b6ff5d
fix: setCameraStabilizationMode on main thread
tamworth May 30, 2024
412c715
[windows]fix ci hour time space bug.
xgfd3 May 30, 2024
8c38577
fix: update ignore file
tamworth May 30, 2024
553099c
Merge branch 'dev/4.3.2' of https://github.com/AgoraIO/API-Examples i…
tamworth May 30, 2024
f87d389
[Android][Compose]1.fix pip crash;2.fix rhythmplayer mute bug;3.fix r…
xgfd3 May 30, 2024
544d61c
[Android][Compose]fix custom video source dispose bug.
xgfd3 May 30, 2024
99a20b4
fix: add focal setting to top live streaming vc
tamworth May 30, 2024
e9ab99c
Merge branch 'dev/4.3.2' of https://github.com/AgoraIO/API-Examples i…
tamworth May 30, 2024
99093f6
fix: crash on ipad
tamworth May 30, 2024
2b3c448
fix: 3rd beauty vc crash on ipad
tamworth May 30, 2024
0313d0b
fix: center stage enable status fixed
tamworth May 31, 2024
db51446
[iOS]fix camera direction bug.
xgfd3 Jun 3, 2024
5cccde0
[iOS]change focus callback toast to logger.
xgfd3 Jun 3, 2024
a716dc4
[Android]reset default config.
xgfd3 Jun 4, 2024
9d2e4aa
fix: front/rear fixed
tamworth Jun 4, 2024
99fc799
Merge branch 'dev/4.3.2' of https://github.com/AgoraIO/API-Examples i…
tamworth Jun 4, 2024
dddd1bd
remove iOS SwiftUI temporarily.
xgfd3 Jun 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Android][Compose]1.fix pip crash;2.fix rhythmplayer mute bug;3.fix r…
…tmp push bug.
  • Loading branch information
xgfd3 committed May 30, 2024
commit f87d389c611bfde33c529418b516708fab39661c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ private fun PictureInPicture() {
}


private class PictureInPictureActivity : ComponentActivity() {
class PictureInPictureActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.agora.api.example.compose.samples

import android.os.Handler
import android.util.Log
import android.widget.Toast
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
Expand Down Expand Up @@ -33,7 +35,6 @@ import io.agora.rtc2.Constants
import io.agora.rtc2.IRtcEngineEventHandler
import io.agora.rtc2.RtcEngine
import io.agora.rtc2.RtcEngineConfig
import io.agora.rtc2.SimulcastStreamConfig
import io.agora.rtc2.live.LiveTranscoding
import io.agora.rtc2.video.VideoCanvas
import io.agora.rtc2.video.VideoEncoderConfiguration
Expand All @@ -43,6 +44,7 @@ fun RTMPStreaming() {
val context = LocalContext.current
val lifecycleOwner = LocalLifecycleOwner.current
val keyboard = LocalSoftwareKeyboardController.current
val mainHandler = remember { Handler(context.mainLooper) }
var isJoined by rememberSaveable { mutableStateOf(false) }
var localLarge by rememberSaveable { mutableStateOf(true) }
var channelName by rememberSaveable { mutableStateOf("") }
Expand Down Expand Up @@ -149,6 +151,25 @@ fun RTMPStreaming() {
super.onClientRoleChanged(oldRole, newRole, newRoleOptions)
clientRole = newRole
}

override fun onRtmpStreamingStateChanged(url: String?, state: Int, reason: Int) {
super.onRtmpStreamingStateChanged(url, state, reason)
Log.d("RTMPStreaming", "onRtmpStreamingStateChanged: $url, $state, $reason")
if (state == Constants.RTMP_STREAM_PUBLISH_STATE_IDLE) {
pushing = false
} else if (state == Constants.RTMP_STREAM_PUBLISH_STATE_RUNNING) {
pushing = true
}
}

override fun onRtmpStreamingEvent(url: String?, event: Int) {
super.onRtmpStreamingEvent(url, event)
if (event == Constants.RTMP_STREAMING_EVENT_URL_ALREADY_IN_USE) {
mainHandler.post {
Toast.makeText(context, "URL already in use: $url", Toast.LENGTH_LONG).show()
}
}
}
}
}).apply {
engine = this
Expand All @@ -161,14 +182,6 @@ fun RTMPStreaming() {
)
)
enableVideo()
setDualStreamMode(
Constants.SimulcastStreamMode.ENABLE_SIMULCAST_STREAM,
SimulcastStreamConfig(
VideoEncoderConfiguration.VideoDimensions(
100, 100
), 100, 15
)
)
}
}
DisposableEffect(lifecycleOwner) {
Expand Down Expand Up @@ -224,7 +237,6 @@ fun RTMPStreaming() {
pushing = !pushing

if (pushing) {
rtcEngine?.stopRtmpStream(url)
if (transcoding) {
rtcEngine?.startRtmpStreamWithTranscoding(url,
getRtmpStreamTranscoding(localUid, remoteUid)
Expand Down Expand Up @@ -337,25 +349,25 @@ private fun getRtmpStreamTranscoding(
remoteUid: Int
): LiveTranscoding {
return LiveTranscoding().apply {
width = 640
height = 360
width = 360
height = 640
videoBitrate = 400
videoFramerate = 15
addUser(LiveTranscoding.TranscodingUser().apply {
uid = localUid
x = 0
y = 0
width = 640
height = 180
width = 360
height = 320
zOrder = 1
})
if (remoteUid != 0) {
addUser(LiveTranscoding.TranscodingUser().apply {
uid = remoteUid
x = 0
y = 180
width = 640
height = 180
y = 320
width = 360
height = 320
zOrder = 2
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ fun RhythmPlayer() {
mediaOptions.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER
mediaOptions.autoSubscribeAudio = true
mediaOptions.autoSubscribeVideo = true
mediaOptions.publishRhythmPlayerTrack = true
mediaOptions.publishMicrophoneTrack = false
mediaOptions.publishRhythmPlayerTrack = isPlaying
mediaOptions.publishMicrophoneTrack = true
mediaOptions.publishCameraTrack = false
TokenUtils.gen(channelName, 0) {
rtcEngine.joinChannel(it, channelName, 0, mediaOptions)
Expand Down Expand Up @@ -153,6 +153,11 @@ private fun RhythmPlayerView(
.padding(8.dp, 0.dp),
onClick = {
rtcEngine?.startRhythmPlayer(URL_UPBEAT, URL_DOWNBEAT, config)
if(isJoined){
rtcEngine?.updateChannelMediaOptions(ChannelMediaOptions().apply {
publishRhythmPlayerTrack = true
})
}
}
) {
Text(text = stringResource(id = R.string.play))
Expand All @@ -163,6 +168,11 @@ private fun RhythmPlayerView(
.padding(8.dp, 0.dp),
onClick = {
rtcEngine?.stopRhythmPlayer()
if(isJoined){
rtcEngine?.updateChannelMediaOptions(ChannelMediaOptions().apply {
publishRhythmPlayerTrack = false
})
}
onPlayStopClick()
}
) {
Expand Down