package com.xhkjedu.slive.service.agora;

import com.xhkjedu.slive.config.ConfigKey;
import org.springframework.stereotype.Service;

/**
 * @author ywx
 * @className AgoraRedisService
 * @description
 * @date 2021/1/25 15:37
 **/
@Service
public class AgoraRedisService {
    String address = ConfigKey.address;

    //获取房间服务地址
    public String getRoomAddress(Integer rid,Integer userid) {
        String[] addreses = address.split(",");
        int num = addreses.length;
        int num2 = rid%num;
        String url = addreses[num2];
        return url;
    }
}
