package com.daya.live_teaching.utils;

import android.content.Context;
import android.media.AudioManager;

import com.daya.live_teaching.rtc.RtcManager;

/**
 * Description:
 * Copyright  : Copyright (c) 2019
 * Company    : 大雅乐盟
 * Author     : r
 * Date       : 2020/5/18 11:33
 */
public class RTCAudioManager {

    public static int MODE_NORMAL = AudioManager.MODE_NORMAL;

    public static void getDefaultAudioMode(Context context) {
        try {
            AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
            if (am != null) {
                MODE_NORMAL = am.getMode();
            }
        } catch (Exception e) {
        }

    }

    public static void setDefaultAudioMode(Context context) {
        try {
            AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
            if (am != null) {
                am.setMode(MODE_NORMAL);
            }
        } catch (Exception e) { }
    }


}
