Skip to content

Commit

Permalink
Dev/1.0.0 (#122)
Browse files Browse the repository at this point in the history
* feat: migration rtm to 2.1.7

* fix: enable setup rtm channel type for rtmmanager

* feat: add local mic seat service & add local enterseat func

* feat: add all local micseat set meta data

* fix: add receipt

* feat: release the lock when room will destroy

* fix: fix presence reset when timeout to rejoined

* fix: add @objc to protocol

* feat: add interaction handler to increase interaction between services

* feat: update music local service

* fix: remove custom log path

* fix: remove logs

* fix: remove "releasetime" in song model

* feat: add chorus local service

* fix:  create room to setup metadata

* feat: remove AUIiCreateRoomInfo

* fix: try acquire lock if release lock by any one

* fix: leave room to clean user info

* feat: add more interactionHandler

* fix: remove interaction of service

* refactor: rename class

* feat: add more func to aui arbiter

* fix: minor changes

* perf: add batch set metadata & refactor service interaction

* style: copy xxx local service to xxx service

* refactor: remove roommanager

* refactor: batch remove metadata

* style: rename protocol function

* feat: add  debug generate token closure

* fix: use message channel type & remove unused roominfo param & fix dispatch value change incorrect

* refactor: migration model & function

* refactor: new create room/get room/destroy room

* perf: remove unused token & remove join stream channel

* perf: update benchmark

* style: update error type

* fix: add timerout when receipt no response

* feat: add timerout for throttler

* feat: add local gift list json file & parse

* [Android]Update rtm version to v217 and adjust room controller.

* [Android]Complete lock logic and etc.

* [Android]Complete lock logic and etc.

* [Android]Perfect mic seat controller and etc.

* [Android]Perfect room and mic seat service and etc.

* [Android]Perfect choose song logic and etc.

* [Android]Perfect chorus logic and etc.

* [Android]Perfect gift logic and etc.

* [Android]Fix create room anr.

* [Android]Fix room destory info bug and etc.

* [Android]Fix audience choose song bug and etc.

* fix: remove lock incorrect

* feat: migration channel message to user message

* [Android]Change rtm channel message to user p2p message.

* perf: migration ktvapi

* [Android]Update room and channel name config and etc.

* fix: revert channel message

* feat: add map/list collection

* fix: send receipt incorrect

* feature: add merge type

* fix: fix build fail

* fix: merge permission fixed

* fix: clean metadata when destroy room fixed

* fix: update list collection

* fix: add clean type

* feat: add new property(sceneKey )

* feat: music/chorus service using list collection

* feat: add subscribe metadata closure

* feat: add calc metadata

* fix: leave seat user id incorrect

* refactor: collection model

* fix: cmd incorrect

* fix: receipt incorrect when set list collection metadata

* fix: add subscribe calc closure

* refactor: add base collection

* fix: remove music service filter(userId == xxx)

* [Android]Add map collection.

* [Android]Fix map collection problem.

* [Android]Add list collection and fix bugs.

* fix: sort music incorrect

* feat: add meta data will set closure & music sort

* fix: main thread check

* refactor: remove unused net work model

* fix: filter match bug fixed

* [Android]Update chorus service with list collection and fix bugs.

* fix: minor changes

* [Android]Perfect collection codes and fix some bugs.

* fix: add AUIAttributesModel

* fix: missing filter

* [Android]Add collection calculate method and etc.

* [Android]Change collection attribute callback model to AUIAttributesModel.

* feat: migration im service

* [Android]Add chat room create interface, adjust chat logic and etc.

* fix: chat id validation

* fix: receipt time out fixed

* fix: cleanUserInfo to remove all chorus info

* fix: chorus filter fixed

* feat: add collection operation error code

* [Android]1.Fix lock owner empty callback bug;2.Fix mic seat operations bug;

* [Android]1.Fix music player voice conversion bug;2.Fix user snapshot bug.

* [Android]Fix chorus tag bug.

* [Android]Adjust rtm publish timeout to 1000ms.

* [Android]perfect chorus code.

* style: minor changes func format

* fix: If it is the lock owner, fetch the metadata when recv the lock

* fix: im token reques bug fixed

* [Android]1.Perfect collection with error code;2.Fetch metadata when arbiter changing;3.Toast error message in ui.

* fix: recv lock bug fixed

* [Android]Fix audience with lock exit bug.

* docs: update readme

* docs: update changelog

* docs: update readme

* docs: update change log

* Dev/local service p2p (#121)

* docs: update readme

* docs: update changelog

* docs: update readme

* docs: update change log

* fix: podspec fixed

* fix: rtc sdk limited version range

* [Android]Fix bugs.

* [Android]Fix app compile problems.

* [Android]Perfect invitation logic and fix bugs.

* [Android]commit leak file.

* [Android]fix app demo bug.

* docs: update changelog

* fix: example podfile fixed

---------

Co-authored-by: wushengtao <[email protected]>
Co-authored-by: sync2gitee <[email protected]>
  • Loading branch information
3 people authored Feb 4, 2024
1 parent 1c686a7 commit 7d97b85
Show file tree
Hide file tree
Showing 147 changed files with 9,675 additions and 4,881 deletions.
11 changes: 6 additions & 5 deletions AUIKitCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'AUIKitCore'
s.version = '0.5.4'
s.version = '1.0.0'
s.summary = 'A short description of AUIKit.'

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -47,8 +47,8 @@ Pod::Spec.new do |s|
ss.dependency 'MJRefresh'
ss.dependency 'ScoreEffectUI'
ss.dependency 'AgoraLyricsScore'
ss.dependency 'AgoraRtm_iOS', '2.1.4'
ss.dependency 'AgoraRtcEngine_Special_iOS','~> 4.1.1.1'
ss.dependency 'AgoraRtm_iOS', '2.1.8'
ss.dependency 'AgoraRtcEngine_Special_iOS','> 4.1.1.19', '< 4.1.1.100'
ss.dependency 'Zip'
ss.dependency 'Alamofire'
ss.dependency 'Agora_Chat_iOS'
Expand All @@ -67,8 +67,8 @@ Pod::Spec.new do |s|
'iOS/AUIKitCore/Sources/Core/Utils/Network/**/*',
'iOS/AUIKitCore/Sources/Core/FoundationExtension/*',
]
ss.dependency 'AgoraRtm_iOS', '2.1.4'
ss.dependency 'AgoraRtcEngine_Special_iOS','~> 4.1.1.1'
ss.dependency 'AgoraRtm_iOS', '2.1.8'
ss.dependency 'AgoraRtcEngine_Special_iOS','> 4.1.1.19', '< 4.1.1.100'
ss.dependency 'Zip'
ss.dependency 'Alamofire'
ss.dependency 'Agora_Chat_iOS'
Expand All @@ -89,6 +89,7 @@ Pod::Spec.new do |s|
'iOS/AUIKitCore/Sources/Components/**/*',
'iOS/AUIKitCore/Sources/Service/Extension/Model/*',
'iOS/AUIKitCore/Sources/Service/Model/AUIKitModel.swift',
'iOS/AUIKitCore/Sources/Service/Model/AUIKitModel+Coder.swift',
'iOS/AUIKitCore/Sources/Service/Model/AUIGiftEntity.swift',
'iOS/AUIKitCore/Sources/Service/Extension/Protocol/AUIUserCellUserDataProtocol.swift',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import io.agora.app.sample.dialog.VoiceMoreItemBean
import io.agora.app.sample.dialog.VoiceRoomMoreDialog
import io.agora.auikit.model.AUICommonConfig
import io.agora.auikit.model.AUIRoomContext
import io.agora.auikit.model.AUIUserThumbnailInfo
import io.agora.auikit.ui.action.AUIActionUserInfo
import io.agora.auikit.ui.action.AUIActionUserInfoList
import io.agora.auikit.ui.action.impI.AUIApplyDialog
Expand All @@ -33,8 +34,7 @@ import io.agora.auikit.ui.member.impl.AUIRoomMemberListView
import io.agora.auikit.utils.FastClickTools
import io.agora.auikit.utils.GsonTools
import org.json.JSONObject
import java.util.*
import kotlin.collections.ArrayList
import java.util.Random

class VoiceCptListActivity : AppCompatActivity() {
private var themeId = R.style.Theme_Sample_Voice
Expand All @@ -49,8 +49,8 @@ class VoiceCptListActivity : AppCompatActivity() {

private var memberList:MutableList<MemberInfo?> = mutableListOf()
private var seatMap: MutableMap<Int, String?> = mutableMapOf()
private var inviteList: MutableList<AUIActionUserInfo?> = mutableListOf()
private var applyList: MutableList<AUIActionUserInfo?> = mutableListOf()
private var inviteList: MutableList<AUIActionUserInfo> = mutableListOf()
private var applyList: MutableList<AUIActionUserInfo> = mutableListOf()


override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -142,10 +142,11 @@ class VoiceCptListActivity : AppCompatActivity() {
private fun loadLocalData(){
val config = AUICommonConfig()
config.context = applicationContext
config.userId = randomId()
config.userName = randomUserName()
config.userAvatar = randomAvatar()
AUIRoomContext.shared().commonConfig = config
config.owner = AUIUserThumbnailInfo()
config.owner.userId = randomId()
config.owner.userName = randomUserName()
config.owner.userAvatar = randomAvatar()
AUIRoomContext.shared().setCommonConfig(config)

val jsonFileName = "gift.json" // 指定要读取的文件名
val json: String
Expand Down Expand Up @@ -285,15 +286,9 @@ class VoiceCptListActivity : AppCompatActivity() {
}

private fun showApplyDialog(){
val applyInfo = AUIActionUserInfoList()
applyInfo.userList = applyList

applyDialog = AUIApplyDialog()
applyDialog.refreshApplyData(applyList)
applyDialog.apply {
arguments = Bundle().apply {
putSerializable(AUIApplyDialog.KEY_ROOM_APPLY_BEAN, applyInfo)
putInt(AUIApplyDialog.KEY_CURRENT_ITEM, 0)
}
setApplyDialogListener(object : AUIApplyDialogEventListener {
override fun onApplyItemClick(
view: View,
Expand All @@ -309,10 +304,9 @@ class VoiceCptListActivity : AppCompatActivity() {
}

private fun showInvitationDialog(){
val invitationInfo = AUIActionUserInfoList()
invitationInfo.userList = inviteList
invitationInfo.invitedIndex = 2

val invitationInfo = AUIActionUserInfoList(
inviteList, 2
)
invitationDialog = AUIInvitationDialog()
invitationDialog.apply {
arguments = Bundle().apply {
Expand Down
7 changes: 5 additions & 2 deletions Android/auikit-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'maven-publish'
apply plugin: 'de.undercouch.download'
apply from: 'rtm.gradle'

android {
compileSdkVersion 30
Expand Down Expand Up @@ -69,8 +68,12 @@ dependencies {

//agora chat
api 'io.agora.rtc:chat-sdk:1.1.0'
api 'io.agora.rtc:agora-special-full:4.1.1.147'

//agora rtc
api 'io.agora.rtc:agora-special-full:4.1.1.20'

// agora rtm
api 'io.agora:agora-rtm:2.1.8'
}

// Because the components are created only during the afterEvaluate phase, you must
Expand Down
5 changes: 0 additions & 5 deletions Android/auikit-service/libs/PlaceHolder

This file was deleted.

2 changes: 1 addition & 1 deletion Android/auikit-service/rtm.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
task downloadRtmLibs {
def destFile = new File(buildDir, 'rtm.zip')
download {
src 'https://download.agora.io/rtm2/release/Agora_RTM_JAVA_SDK_for_Android_v214.zip'
src 'https://download.agora.io/rtm2/release/Agora_RTM_JAVA_SDK_for_Android_v217.zip'
dest destFile
overwrite false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.agora.auikit.model;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.google.gson.annotations.SerializedName;

Expand All @@ -12,6 +11,4 @@ public class AUIChoristerModel {
@SerializedName("chorusSongNo")
public @NonNull String chorusSongNo = ""; //合唱者演唱歌曲

@SerializedName("owner")
public @Nullable AUIUserThumbnailInfo owner; //合唱者信息
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@

public class AUICommonConfig {
public @NonNull Context context;
// 声网AppId
public @NonNull String appId = "";
// 声网App证书(可选,如果没有用到后端token生成服务可以不设置)
public @NonNull String appCert = "";
// 域名(可选,如果没有用到后端服务可以不设置)
public @NonNull String host = "";
public @NonNull String userId = "";
public @NonNull String userName = "";
public @NonNull String userAvatar = ""; //用户头像
// 用户信息
public @NonNull AUIUserThumbnailInfo owner;

public @NonNull String imAppKey = "";
public @NonNull String imClientId = "";
public @NonNull String imClientSecret = "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

public class AUICreateRoomInfo implements Serializable {
public @NonNull String roomId = ""; //房间Id
public @NonNull String roomName = ""; //房间名称
@SerializedName("roomThumbnail")
public @NonNull String thumbnail = ""; //房间列表上的缩略图
@SerializedName("roomSeatCount")
public int micSeatCount = 8; //麦位个数
public @Nullable String password; //房间密码
public String micSeatStyle = ""; //麦位样式
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data class AUIGiftEntity constructor(
// 每个app启动后加载场景之前预先去下载礼物资源缓存到磁盘供UIKit取用
@SerializedName("giftEffect")var giftEffect:String?="",
@SerializedName("effectMD5")var effectMD5:String?="",
@SerializedName("sendUser")var sendUser: AUIUserThumbnailInfo?,
@SerializedName("sendUser")var sendUser: AUIUserThumbnailInfo? = null,
var selected:Boolean=false,
var giftCount:Int = 1,
): Serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package io.agora.auikit.model;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class AUIInvitationInfo {
@IntDef({
AUIInvitationType.Apply,
AUIInvitationType.Invite,
})
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface AUIInvitationType{
int Apply = 1; // 观众申请
int Invite = 2; // 主播邀请
}

@IntDef({
AUIInvitationStatus.Waiting,
AUIInvitationStatus.Accept,
AUIInvitationStatus.Reject,
AUIInvitationStatus.Timeout,
})
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface AUIInvitationStatus{
int Waiting = 1; // 等待确认
int Accept = 2; // 同意
int Reject = 3; // 拒绝
int Timeout = 4; // 超时
}

// 申请观众userId,被邀请观众userId
public @NonNull String userId = "";

// 麦位位置
public int seatNo = 0;

// 类型,申请 or 邀请
public @AUIInvitationType int type = AUIInvitationType.Apply;

public @AUIInvitationStatus int status = AUIInvitationStatus.Waiting;

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,20 @@ public class AUIMicSeatInfo {
public @AUIMicSeatStatus int seatStatus = AUIMicSeatStatus.idle;
/** 麦位禁用声音 */
@SerializedName("isMuteAudio")
public int muteAudio = 0;
public boolean muteAudio = false;

/** 麦位禁用视频 */
@SerializedName("isMuteVideo")
public int muteVideo = 0;
public boolean muteVideo = false;

@Override
public String toString() {
return "AUIMicSeatInfo{" +
"user=" + user +
", seatIndex=" + seatIndex +
", seatStatus=" + seatStatus +
", muteAudio=" + muteAudio +
", muteVideo=" + muteVideo +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@

public class AUIRoomConfig {

@NonNull public String channelName = ""; //正常rtm使用的频道
@NonNull public String rtmToken = ""; //rtm login用,只能007
@NonNull public String rtcToken = ""; //rtm join用

@NonNull public String rtcChannelName = ""; //rtc使用的频道
@NonNull public String rtcRtcToken = ""; //rtc join使用
@NonNull public String rtcRtmToken = ""; //rtc mcc使用,只能006
@NonNull public String channelName = ""; //正常rtm/rtc使用的频道
@NonNull public String rtmToken = ""; //rtm login用
@NonNull public String rtcToken = ""; //rtc join用
@NonNull public String rtcChorusChannelName = ""; //rtc 合唱使用的频道
@NonNull public String rtcChorusRtcToken = ""; //rtc 合唱join使用

public AUIRoomConfig(@NonNull String roomId) {
channelName = roomId;
rtcChannelName = roomId + "_rtc";
rtcChorusChannelName = roomId + "_rtc_ex";
}
}
Loading

0 comments on commit 7d97b85

Please sign in to comment.