package com.ym.service;

import com.ym.mec.common.entity.ImRoomMessage;
import com.ym.pojo.IMApiResultInfo;
import com.ym.pojo.RecordNotify;

/**
 * @author hgw
 * Created by 2022-02-21
 */
public interface LiveRoomService {

    IMApiResultInfo createLiveRoom(String roomId, String roomName) throws Exception;

    IMApiResultInfo destroyLiveRoom(String roomId) throws Exception;

    IMApiResultInfo publishRoomMessage(ImRoomMessage message);

    /**
    * @description: 开始录制直播
     * @param roomId
    * @return void
    * @author zx
    * @date 2022/2/25 10:00
    */
    void startRecord(String roomId, String videoResolution) throws Exception;

    /**
    * @description: 结束录制直播
     * @param roomId
    * @return void
    * @author zx
    * @date 2022/2/25 10:00
    */
    void stopRecord(String roomId) throws Exception;

    /**
    * @description: 录制状态回调
     * @param recordNotify
    * @return void
    * @author zx
    * @date 2022/2/25 11:49
    */
    void recordSync(RecordNotify recordNotify);

    boolean userExistInRoom(String chatroomId, String userId);

    boolean checkOnline(String userId);

    /**
     * 添加禁言成员-默认禁言120分钟
     *
     * @param roomUid 房间uid
     * @param userId  用户id
     */
    boolean addUserUnableSpeak(String roomUid, String userId);

    /**
     * 移除禁言成员
     *
     * @param roomUid 房间uid
     * @param userId  用户id
     */
    boolean removeUserUnableSpeak(String roomUid, String userId);
}
