移除KTV相关代码

This commit is contained in:
huangjian
2022-09-14 10:42:43 +08:00
parent 7090350376
commit 89aabeea5b
60 changed files with 55 additions and 4590 deletions

View File

@@ -56,13 +56,13 @@ android {
}
def loggerVersion = "2.2.0"
def Lombok = "1.18.10"
def Lombok = "1.18.18"
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
api "com.orhanobut:logger:${loggerVersion}"
@@ -76,10 +76,10 @@ dependencies {
// 支付
api fileTree(dir: 'alipay-libs', include: ['*.jar'])
api 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.1.6'
api 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.4.0'
// 声网
api 'io.agora.rtc:full-sdk:3.0.1'
api 'io.agora.rtc:full-sdk:3.6.2'
// core
implementation 'com.liulishuo.okdownload:okdownload:1.0.4'
@@ -88,17 +88,16 @@ dependencies {
// provide okhttp to connect to backend
implementation 'com.liulishuo.okdownload:okhttp:1.0.4'
// Room
api 'androidx.room:room-runtime:2.2.5'
annotationProcessor 'androidx.room:room-compiler:2.2.5'
api 'androidx.room:room-runtime:2.3.0'
annotationProcessor 'androidx.room:room-compiler:2.3.0'
// RxJava support for Room
api 'androidx.room:room-rxjava2:2.2.5'
api 'androidx.room:room-rxjava2:2.3.0'
api 'com.tencent.bugly:crashreport_upgrade:1.5.23'
api 'com.tencent.bugly:crashreport_upgrade:1.6.1'
api 'com.tencent.bugly:nativecrashreport:3.9.2'
api project(':nim_uikit')
api project(':library')
api project(':agora-ktv-kit-release')
api project(':trtc_release')
}

View File

@@ -97,7 +97,6 @@ import com.yizhuan.xchat_android_core.im.custom.bean.MonsterHuntingResultAttachm
import com.yizhuan.xchat_android_core.im.custom.bean.MonsterStatusAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.MultiGiftAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.MultiLuckyGiftAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.MusicInfoAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.NobleAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomGiftValueAttachment;
@@ -136,8 +135,6 @@ import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
import com.yizhuan.xchat_android_core.room.exception.AntiSpamHitException;
import com.yizhuan.xchat_android_core.room.face.DynamicFaceModel;
import com.yizhuan.xchat_android_core.room.giftvalue.helper.GiftValueMrg;
import com.yizhuan.xchat_android_core.room.ktv.bean.MusicInfo;
import com.yizhuan.xchat_android_core.room.ktv.event.KtvEvent;
import com.yizhuan.xchat_android_core.room.model.AvRoomModel;
import com.yizhuan.xchat_android_core.room.model.MicQueueModel;
import com.yizhuan.xchat_android_core.room.pk.attachment.RoomPkAttachment;
@@ -994,41 +991,6 @@ public final class IMNetEaseManager {
noticeDragonBarStart(msg, RoomEvent.DRAGON_BAR_START);
}
break;
case CUSTOM_MSG_KTV:
MusicInfo musicInfo = ((MusicInfoAttachment) msg.getAttachment()).getMusicInfo();
switch (second) {
case CUSTOM_MSG_SUB_KTV_SWITCH:
case CUSTOM_MSG_SUB_KTV_TOP:
case CUSTOM_MSG_SUB_KTV_OPEN:
case CUSTOM_MSG_SUB_KTV_CLOSE:
case CUSTOM_MSG_SUB_KTV_FINISH:
addMessages(msg);
break;
case CUSTOM_MSG_SUB_KTV_SWITCH_NO_SEND:
RxBus.get().post(KtvEvent.newInstance(KtvEvent.SWITCH_MUSIC, musicInfo));
break;
case CUSTOM_MSG_SUB_KTV_ADD:
addMessages(msg);
RxBus.get().post(KtvEvent.newInstance(KtvEvent.ADD_MUSIC, musicInfo));
break;
case CUSTOM_MSG_SUB_KTV_DELETE:
addMessages(msg);
RxBus.get().post(KtvEvent.newInstance(KtvEvent.DELETE_USER_CHOOSE_MUSIC, musicInfo));
break;
case CUSTOM_MSG_SUB_KTV_DELETE_USER_ALL:
RxBus.get().post(KtvEvent.newInstance(KtvEvent.DELETE_USER_ALL_MUSIC, musicInfo));
break;
case CUSTOM_MSG_SUB_KTV_END:
RxBus.get().post(KtvEvent.newInstance(KtvEvent.NO_MUSIC, musicInfo));
break;
case CUSTOM_MSG_SUB_KTV_STOP:
RxBus.get().post(KtvEvent.newInstance(KtvEvent.STOP, musicInfo));
break;
case CUSTOM_MSG_SUB_KTV_CONTINUE:
RxBus.get().post(KtvEvent.newInstance(KtvEvent.CONTINUE, musicInfo));
break;
}
break;
case CUSTOM_MSG_GAME:
break;
case CUSTOM_MSG_QUEUING_MIC:

View File

@@ -154,7 +154,7 @@ public class RtcEngineManager extends BaseEngine {
public void setRemoteMute(long uid, boolean mute) {
Logger.t(TAG).d("setRemoteMute uid:%s mute:%s", uid, mute);
if (mRtcEngine != null) {
if (mRtcEngine != null && !isRemoteMute) {
mRtcEngine.muteRemoteAudioStream((int) uid, mute);
}
}

View File

@@ -7,6 +7,7 @@ import java.util.HashSet;
import java.util.Set;
import io.agora.rtc.IAudioEffectManager;
import io.agora.rtc.audio.AgoraRhythmPlayerConfig;
/**
* 音效的控制类
@@ -103,6 +104,11 @@ public class TRTCEffectManager implements IAudioEffectManager {
return 0;
}
@Override
public int playEffect(int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish, int startPos) {
return 0;
}
@Override
public int stopEffect(int soundId) {
stopAudioEffect(soundId);
@@ -161,6 +167,36 @@ public class TRTCEffectManager implements IAudioEffectManager {
return 0;
}
@Override
public int getEffectCurrentPosition(int soundId) {
return 0;
}
@Override
public int setEffectPosition(int soundId, int pos) {
return 0;
}
@Override
public int getEffectDuration(String filePath) {
return 0;
}
@Override
public int startRhythmPlayer(String sound1, String sound2, AgoraRhythmPlayerConfig config) {
return 0;
}
@Override
public int stopRhythmPlayer() {
return 0;
}
@Override
public int configRhythmPlayer(AgoraRhythmPlayerConfig config) {
return 0;
}
public void setMusicObserver(TXAudioEffectManager.TXMusicPlayObserver observer) {
mMusicPlayObserver = observer;
}

View File

@@ -1642,7 +1642,7 @@ public class TRTCEngineAdapter extends BaseAdapterImpl {
TRTCEngineAdapterListener.onError(WARN_INVALID_VIEW);
return -1;
}
localVideoView = new TXCloudVideoView(local.view);
localVideoView = new TXCloudVideoView(local.view.getContext());
isStartPreview = true;
this.startPreview();
@@ -1663,8 +1663,8 @@ public class TRTCEngineAdapter extends BaseAdapterImpl {
remoteVideoMap.remove(remote.uid);
return -1;
}
remoteVideoMap.put(remote.uid, new TXCloudVideoView(remote.view));
trtcCloud.startRemoteView(String.valueOf(remote.uid), new TXCloudVideoView(remote.view));
remoteVideoMap.put(remote.uid, new TXCloudVideoView(remote.view.getContext()));
trtcCloud.startRemoteView(String.valueOf(remote.uid), new TXCloudVideoView(remote.view.getContext()));
return 0;
}

View File

@@ -323,10 +323,6 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CUSTOM_MSG_BOX:
attachment = new RoomBoxPrizeAttachment(CUSTOM_MSG_BOX, second);
break;
case CUSTOM_MSG_KTV:
attachment = new MusicInfoAttachment(first, second);
break;
case CUSTOM_MSG_PUBLIC_CHAT_HALL:
switch (second) {
case CUSTOM_MSG_SUB_PUBLIC_CHAT_HALL_AIT:

View File

@@ -1,60 +0,0 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.yizhuan.xchat_android_core.room.ktv.bean.MusicInfo;
/**
* Created by chenran on 2017/10/4.
*/
public class MusicInfoAttachment extends CustomAttachment {
private MusicInfo musicInfo;
public MusicInfoAttachment(int first, int second) {
super(first, second);
}
@Override
protected void parseData(JSONObject jsonObject) {
musicInfo = new Gson().fromJson(jsonObject.toJSONString(),MusicInfo.class);
}
public MusicInfo getMusicInfo() {
return musicInfo;
}
public void setMusicInfo(MusicInfo musicInfo) {
this.musicInfo = musicInfo;
}
@Override
protected JSONObject packData() {
JSONObject object = new JSONObject();
if (musicInfo!=null){
object.put("userNick", musicInfo.getUserNick());
object.put("avatar", musicInfo.getAvatar());
object.put("cover", musicInfo.getCover());
object.put("duration", musicInfo.getDuration());
object.put("durationFormat", musicInfo.getDurationFormat());
object.put("musicId", musicInfo.getMusicId());
object.put("musicName", musicInfo.getMusicName());
object.put("musicUrl", musicInfo.getMusicUrl());
object.put("operationNick", musicInfo.getOperationNick());
object.put("operationUid", musicInfo.getOperationUid());
object.put("singer", musicInfo.getSinger());
object.put("uid", musicInfo.getUid());
object.put("uploader", musicInfo.getUploader());
}
return object;
}
@Override
public String toString() {
return "MusicInfoAttachment{" +
"musicInfo=" + musicInfo +
", first=" + first +
", second=" + second +
'}';
}
}

View File

@@ -33,7 +33,6 @@ import com.yizhuan.xchat_android_core.room.bean.SimplePartyRoomInfo;
import com.yizhuan.xchat_android_core.room.event.RoomClearScreenEvent;
import com.yizhuan.xchat_android_core.room.game.GameStatus;
import com.yizhuan.xchat_android_core.room.giftvalue.helper.GiftValueMrg;
import com.yizhuan.xchat_android_core.room.ktv.event.KtvEvent;
import com.yizhuan.xchat_android_core.room.bean.RoomModeType;
import com.yizhuan.xchat_android_core.super_admin.SuperAdminDataMrg;
import com.yizhuan.xchat_android_core.super_admin.util.SuperAdminUtil;
@@ -58,7 +57,6 @@ import java.util.Map;
import java.util.Objects;
import io.reactivex.Single;
import io.reactivex.disposables.Disposable;
import io.reactivex.processors.PublishProcessor;
/**
@@ -519,9 +517,6 @@ public final class AvRoomDataManager {
if (AvRoomDataManager.get().isOwner(account) && mOwnerMember != null) {
//自己是管理员被移除,恢复身份
mOwnerMember.setMemberType(MemberType.NORMAL);
if (isOpenKTV()) {
notifyManagerChange();
}
}
}
@@ -1024,11 +1019,7 @@ public final class AvRoomDataManager {
* @return -
*/
public boolean isOpenKTV() {
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
if (roomInfo == null) {
return false;
}
return roomInfo.isOpenKTV();
return false;
}
/**
@@ -1100,14 +1091,6 @@ public final class AvRoomDataManager {
if (!isContain) {
mRoomManagerList.add(member);
}
if (isOwner(member.getAccount()) && isOpenKTV()) {
//如果是自己被添加管理员,才发出事件
notifyManagerChange();
}
}
private void notifyManagerChange() {
RxBus.get().post(KtvEvent.newInstance(KtvEvent.ROOM_USER_MANAGER_STATUS, null));
}
public long getRoomId() {

View File

@@ -1,126 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv;
import com.yizhuan.xchat_android_core.base.IModel;
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
import com.yizhuan.xchat_android_core.room.ktv.bean.KtvRoomInfo;
import com.yizhuan.xchat_android_core.room.ktv.bean.MusicInfo;
import com.yizhuan.xchat_android_core.room.ktv.bean.RoomMusicInfo;
import java.util.List;
import io.reactivex.Single;
public interface IKtvModel extends IModel {
/**
* 房间已点歌曲列表
*
* @param roomUid 房主uid
* @return
*/
Single<ServiceResult<RoomMusicInfo>> getRoomMusic(long roomUid);
/**
* 获取ktv房间列表
*
* @param orderType 排序方式。1:最新, 2:最热
* @return
*/
Single<ServiceResult<List<KtvRoomInfo>>> getKtvRooms(int orderType, int page, int pageSize);
/**
* 搜索歌曲
*
* @param searchKey 搜索关键字
* @return 歌曲列表
*/
Single<ServiceResult<List<MusicInfo>>> searchMusic(String searchKey, int page, int pageSize);
/**
* 热门歌曲列表
*
* @return
*/
Single<ServiceResult<List<MusicInfo>>> hotMusic(int page, int pageSize);
/**
* 删除用户已点的歌曲(单曲)
*
* @param musicId 歌曲id
* @param uid 被删除歌曲的用户uid
* @param roomUid 房主uid
* @return
*/
Single<String> deleteUserChooseMusic(int musicId, long uid, long roomUid);
/**
* 删除用户已点的所有歌曲,如果正在演唱的是他的歌,后台会发送切歌消息
*
* @param uid
* @param roomUid
* @return
*/
Single<String> deleteUserAllChooseMusic(long uid, long roomUid);
/**
* 删除房间已点的所有歌曲
*
* @param roomUid
* @return
*/
Single<String> deleteRoomAllChooseMusic(long roomUid);
/**
* 开启房间ktv模式
*
* @param roomUid
* @return
*/
Single<Boolean> openKtvMode(long roomUid);
/**
* 关闭房间ktv模式
*
* @param roomUid
* @return
*/
Single<Boolean> closeKtvMode(long roomUid);
/**
* 置顶歌曲
*
* @param musicId 歌曲id
* @param uid 置顶歌曲对应的用户uid
* @param roomUid 房主uid
* @return
*/
Single<String> popMusic(int musicId, long uid, long roomUid);
/**
* 切歌
*
* @param roomUid
* @return
*/
Single<Boolean> switchMusic(long roomUid);
/**
* 点歌
*
* @param musicId 歌曲id
* @param uid 歌曲对应的用户uid
* @param roomUid 房主uid
* @return
*/
Single<String> chooseMusic(int musicId, long uid, long roomUid);
/**
* 歌曲报错
*
* @param musicId 歌曲id
* @param errorUid 报错人uid
* @param errorMsg 错误信息
* @return
*/
Single<String> musicError(int musicId, long errorUid, String errorMsg);
}

View File

@@ -1,326 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv;
import com.yizhuan.xchat_android_core.base.BaseModel;
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
import com.yizhuan.xchat_android_core.room.ktv.bean.KtvRoomInfo;
import com.yizhuan.xchat_android_core.room.ktv.bean.MusicInfo;
import com.yizhuan.xchat_android_core.room.ktv.bean.RoomMusicInfo;
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
import java.util.List;
import io.reactivex.Single;
import io.reactivex.SingleSource;
import io.reactivex.functions.Function;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
public class KtvModel extends BaseModel implements IKtvModel {
private Api api;
private KtvModel(){
api = RxNet.create(Api.class);
}
private static class KtvModelHelper{
private static IKtvModel instance = new KtvModel();
}
public static IKtvModel get(){
return KtvModelHelper.instance;
}
@Override
public Single<ServiceResult<RoomMusicInfo>> getRoomMusic(long roomUid) {
return api.getRoomMusic(roomUid)
.compose(RxHelper.handleSchedulers());
}
@Override
public Single<ServiceResult<List<KtvRoomInfo>>> getKtvRooms(int orderType, int page, int pageSize) {
return api.getKtvRooms(orderType, page, pageSize);
}
@Override
public Single<ServiceResult<List<MusicInfo>>> searchMusic(String searchKey, int page, int pageSize) {
return api.searchMusic(searchKey, page, pageSize)
.compose(RxHelper.handleSchedulers());
}
@Override
public Single<ServiceResult<List<MusicInfo>>> hotMusic(int page, int pageSize) {
return api.hotMusic(page, pageSize)
.compose(RxHelper.handleSchedulers());
}
@Override
public Single<String> deleteUserChooseMusic(int musicId, long uid, long roomUid) {
return api.deleteUserChooseMusic(musicId, uid, roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just("删除歌曲成功");
}
return Single.error(new Throwable(result.getMessage()));
});
}
@Override
public Single<String> deleteUserAllChooseMusic(long uid, long roomUid) {
return api.deleteUserAllChooseMusic(uid, roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just("删除全部歌曲成功");
}
return Single.error(new Throwable(result.getMessage()));
});
}
@Override
public Single<String> deleteRoomAllChooseMusic(long roomUid) {
return api.deleteRoomAllChooseMusic(roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just("删除成功");
}
return Single.error(new Throwable(result.getMessage()));
});
}
@Override
public Single<Boolean> openKtvMode(long roomUid) {
return api.openKtvMode(roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just(true);
}
return Single.error(new Throwable(RxHelper.getValidMessage(result)));
});
}
@Override
public Single<Boolean> closeKtvMode(long roomUid) {
return api.closeKtvMode(roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just(true);
}
return Single.error(new Throwable(RxHelper.getValidMessage(result)));
});
}
@Override
public Single<String> popMusic(int musicId, long uid, long roomUid) {
return api.popMusic(musicId, uid, roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just("歌曲置顶成功");
}
return Single.error(new Throwable(result.getMessage()));
});
}
@Override
public Single<Boolean> switchMusic(long roomUid) {
return api.switchMusic(roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just(true);
}
return Single.error(new Throwable(RxHelper.getValidMessage(result)));
});
}
@Override
public Single<String> chooseMusic(int musicId, long uid, long roomUid) {
return api.chooseMusic(musicId, uid, roomUid)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just("点歌成功");
} else {
return Single.error(new Throwable(result.getMessage()));
}
});
}
@Override
public Single<String> musicError(int musicId, long errorUid, String errorMsg) {
return api.musicError(musicId, errorUid, errorMsg)
.compose(RxHelper.handleSchedulers())
.flatMap(result -> {
if (result.isSuccess()) {
return Single.just("提交成功");
} else {
return Single.error(new Throwable(result.getMessage()));
}
});
}
private interface Api{
/**
* 房间已点歌曲列表
*
* @param roomUid 房主uid
* @return
*/
@GET("ktv/getRoomChooseMusics")
Single<ServiceResult<RoomMusicInfo>> getRoomMusic(@Query("roomUid") long roomUid);
/**
* 获取ktv房间列表
*
* @param orderType 排序方式。1:最新, 2:最热
* @return
*/
@GET("room/listKTVRooms")
Single<ServiceResult<List<KtvRoomInfo>>> getKtvRooms(@Query("orderType") int orderType,
@Query("page") int page,
@Query("pageSize") int pageSize);
/**
* 搜索歌曲
*
* @param searchKey 搜索关键字
* @return 歌曲列表
*/
@GET("ktv/searchMusic")
Single<ServiceResult<List<MusicInfo>>> searchMusic(@Query("searchKey") String searchKey,
@Query("page") int page,
@Query("pageSize") int pageSize);
/**
* 热门歌曲列表
*
* @return
*/
@GET("ktv/listHotMusic")
Single<ServiceResult<List<MusicInfo>>> hotMusic(@Query("page") int page,
@Query("pageSize") int pageSize);
/**
* 删除用户已点的歌曲(单曲)
*
* @param musicId 歌曲id
* @param uid 被删除歌曲的用户uid
* @param roomUid 房主uid
* @return
*/
@FormUrlEncoded
@POST("ktv/deleteUserChooseMusic")
Single<ServiceResult<String>> deleteUserChooseMusic(@Field("musicId") int musicId,
@Field("targetUid") long uid,
@Field("roomUid") long roomUid);
/**
* 删除用户已点的所有歌曲,如果正在演唱的是他的歌,后台会发送切歌消息
*
* @param uid
* @param roomUid
* @return
*/
@FormUrlEncoded
@POST("ktv/deleteUserAllChooseMusic")
Single<ServiceResult<String>> deleteUserAllChooseMusic(@Field("targetUid") long uid,
@Field("roomUid") long roomUid);
/**
* 删除房间已点的所有歌曲
*
* @param roomUid
* @return
*/
@FormUrlEncoded
@POST("ktv/deleteRoomAllChooseMusic")
Single<ServiceResult<String>> deleteRoomAllChooseMusic(@Field("roomUid") long roomUid);
/**
* 开启房间ktv模式
*
* @param roomUid
* @return
*/
@FormUrlEncoded
@POST("room/openKTVMode")
Single<ServiceResult<String>> openKtvMode(@Field("roomUid") long roomUid);
/**
* 关闭房间ktv模式
*
* @param roomUid
* @return
*/
@FormUrlEncoded
@POST("room/closeKTVMode")
Single<ServiceResult<String>> closeKtvMode(@Field("roomUid") long roomUid);
/**
* 置顶歌曲
*
* @param musicId 歌曲id
* @param uid 置顶歌曲对应的用户uid
* @param roomUid 房主uid
* @return
*/
@FormUrlEncoded
@POST("ktv/popMusic")
Single<ServiceResult<String>> popMusic(@Field("musicId") int musicId,
@Field("targetUid") long uid,
@Field("roomUid") long roomUid);
/**
* 切歌
*
* @param roomUid
* @return
*/
@FormUrlEncoded
@POST("ktv/switchMusic")
Single<ServiceResult<String>> switchMusic(@Field("roomUid") long roomUid);
/**
* 点歌
*
* @param musicId 歌曲id
* @param uid 歌曲对应的用户uid
* @param roomUid 房主uid
* @return
*/
@FormUrlEncoded
@POST("ktv/chooseMusic")
Single<ServiceResult<String>> chooseMusic(@Field("musicId") int musicId,
@Field("uid") long uid,
@Field("roomUid") long roomUid);
/**
* 歌曲报错
*
* @param musicId 歌曲id
* @param errorUid 报错人uid
* @param errorMsg 错误信息
* @return
*/
@FormUrlEncoded
@POST("ktv/musicError")
Single<ServiceResult<String>> musicError(@Field("musicId") int musicId,
@Field("errorUid") long errorUid,
@Field("errorMsg") String errorMsg);
}
}

View File

@@ -1,67 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv.bean;
public class KtvRoomInfo {
/**
* roomUid : 90006982
* roomId : 26811582
* title : 第一个ktv房....
* onlineNum : 5
* singingMusicName : 就现在
*/
private int roomUid;
private int roomId;
private String title;
private int onlineNum;
private String singingMusicName;
private String avatar;
public int getRoomUid() {
return roomUid;
}
public void setRoomUid(int roomUid) {
this.roomUid = roomUid;
}
public int getRoomId() {
return roomId;
}
public void setRoomId(int roomId) {
this.roomId = roomId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getOnlineNum() {
return onlineNum;
}
public void setOnlineNum(int onlineNum) {
this.onlineNum = onlineNum;
}
public String getSingingMusicName() {
return singingMusicName;
}
public void setSingingMusicName(String singingMusicName) {
this.singingMusicName = singingMusicName;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
}

View File

@@ -1,165 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv.bean;
public class MusicInfo {
/**
* musicId : 3
* musicName : 幻想家
* singer : 叶炫清
* musicUrl : https://img.letusmix.com/%E5%8F%B6%E7%82%AB%E6%B8%85-%E5%B9%BB%E6%83%B3%E5%AE%B6-%E5%9B%BD%E8%AF%AD-1066843.mpg
* cover : https://img.letusmix.com/6ab60eec2eb24e87b19bd64d8be56ede_cover.jpg
* duration : 266
* durationFormat : 00:04:26
* uploader : 十二月的猴子
*/
private int musicId;
private String musicName;
private String singer;
private String musicUrl;
private String cover;
private long uid;
private String userNick;
private int duration;
private String durationFormat;
private String uploader;
private String avatar;
private long operationUid;
private String operationNick;
public int getMusicId() {
return musicId;
}
public void setMusicId(int musicId) {
this.musicId = musicId;
}
public String getMusicName() {
return musicName;
}
public void setMusicName(String musicName) {
this.musicName = musicName;
}
public String getSinger() {
return singer;
}
public void setSinger(String singer) {
this.singer = singer;
}
public String getMusicUrl() {
return musicUrl;
}
public void setMusicUrl(String musicUrl) {
this.musicUrl = musicUrl;
}
public String getCover() {
return cover;
}
public void setCover(String cover) {
this.cover = cover;
}
public int getDuration() {
return duration;
}
public void setDuration(int duration) {
this.duration = duration;
}
public String getDurationFormat() {
return durationFormat;
}
public void setDurationFormat(String durationFormat) {
this.durationFormat = durationFormat;
}
public String getUploader() {
return uploader;
}
public void setUploader(String uploader) {
this.uploader = uploader;
}
public long getUid() {
return uid;
}
public void setUid(long uid) {
this.uid = uid;
}
public String getUserNick() {
return userNick;
}
public void setUserNick(String userNick) {
this.userNick = userNick;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public long getOperationUid() {
return operationUid;
}
public void setOperationUid(long operationUid) {
this.operationUid = operationUid;
}
public String getOperationNick() {
return operationNick;
}
public void setOperationNick(String operationNick) {
this.operationNick = operationNick;
}
@Override
public String toString() {
return "MusicInfo{" +
"musicId=" + musicId +
", musicName='" + musicName + '\'' +
", singer='" + singer + '\'' +
", musicUrl='" + musicUrl + '\'' +
", cover='" + cover + '\'' +
", uid=" + uid +
", userNick='" + userNick + '\'' +
", duration=" + duration +
", durationFormat='" + durationFormat + '\'' +
", uploader='" + uploader + '\'' +
", avatar='" + avatar + '\'' +
", operationUid=" + operationUid +
", operationNick='" + operationNick + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MusicInfo musicInfo = (MusicInfo) o;
return musicId == musicInfo.musicId;
}
@Override
public int hashCode() {
return musicId;
}
}

View File

@@ -1,32 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv.bean;
import java.util.List;
public class RoomMusicInfo {
private MusicInfo singingMusicVo;
private List<MusicInfo> userChooseMusicVos;
public MusicInfo getSingingMusicVo() {
return singingMusicVo;
}
public void setSingingMusicVo(MusicInfo singingMusicVo) {
this.singingMusicVo = singingMusicVo;
}
public List<MusicInfo> getUserChooseMusicVos() {
return userChooseMusicVos;
}
public void setUserChooseMusicVos(List<MusicInfo> userChooseMusicVos) {
this.userChooseMusicVos = userChooseMusicVos;
}
@Override
public String toString() {
return "RoomMusicInfo{" +
"singingMusicVo=" + singingMusicVo +
", userChooseMusicVos=" + userChooseMusicVos +
'}';
}
}

View File

@@ -1,60 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv.event;
import androidx.annotation.Nullable;
import com.yizhuan.xchat_android_core.room.ktv.bean.MusicInfo;
public class KtvEvent {
public static final int CLOSE_KTV_MODEL = 1;
public static final int SWITCH_MUSIC = 2;
public static final int POP_MUSIC = 3;
public static final int ADD_MUSIC = 4;
public static final int DELETE_USER_CHOOSE_MUSIC = 5;
public static final int DELETE_USER_ALL_MUSIC = 6;
public static final int NO_MUSIC = 7;
public static final int STOP = 8;
public static final int CONTINUE = 9;
public static final int ADD_MUSIC_BY_USER = 10;//点歌后结束对应界面的通知
public static final int MUSIC_UPDATE = 11;
public static final int MUSIC_COMPLETE = 12;
//add by lvzebiao 自己的管理员状态发生变化时需要更新相关的ui
public static final int ROOM_USER_MANAGER_STATUS = 13;
private int type;
@Nullable
private MusicInfo musicInfo;
public static KtvEvent newInstance(int type,MusicInfo musicInfo) {
return new KtvEvent(type).setMusicInfo(musicInfo);
}
public KtvEvent(int type) {
this.type = type;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
@Nullable
public MusicInfo getMusicInfo() {
return musicInfo;
}
public KtvEvent setMusicInfo(MusicInfo musicInfo) {
this.musicInfo = musicInfo;
return this;
}
@Override
public String toString() {
return "KtvEvent{" +
"type=" + type +
", musicInfo=" + musicInfo +
'}';
}
}

View File

@@ -1,17 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv.event;
public class MusicCountEvent {
private int count;
public MusicCountEvent(int count) {
this.count = count;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
}

View File

@@ -1,18 +0,0 @@
package com.yizhuan.xchat_android_core.room.ktv.event;
public class RemoteVideoEvent {
private int uid;
public RemoteVideoEvent(int uid) {
this.uid = uid;
}
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
}