zoukankan      html  css  js  c++  java
  • 十天冲刺(第二阶段)

    一、说在前面

     今天开始完善自己的相遇过程中 俩人的语音聊天还是那么难但是自己差不多做完了

    二、完成情况

     语音基本功能实现接下来就是去完成一些细节化比如可以最小化啥的

       CloudManager.getInstance().setReceivedCallListener(new IRongReceivedCallListener() {
                @Override
                public void onReceivedCall(RongCallSession rongCallSession) {
                   // String call=new Gson().toJson(rongCallSession);
    
                    LogUtils.i("rongCallSession");
    
                    if (!CloudManager.getInstance().isVoIPEnabled(CloudService.this))
                    {
                        return;
                    }
                    //呼叫端
                  String callUserId=  rongCallSession.getCallerUserId();
                  callId=  rongCallSession.getCallId();
                  //播放来电铃声
                    mAudioCallMedia.startPlay(CloudManager.callAudioPath);
                    updateWindowInfo(0, rongCallSession.getMediaType(),callUserId);
    
                    if (rongCallSession.getMediaType().equals(RongCallCommon.CallMediaType.AUDIO))
                    {
                        LogUtils.i("音频通话");
    
                        WindowHelper.getInstance().showView(mFullAudioView);
                    }else if (rongCallSession.getMediaType().equals(RongCallCommon.CallMediaType.VIDEO))
                    {
                        LogUtils.i("vieo");
                        WindowHelper.getInstance().showView(mFullVideoView);
                    }
                    isReceiverTo = 1;
                    isCallOrReceiver=false;
                }
    
                @Override
                public void onCheckPermission(RongCallSession rongCallSession) {
                    LogUtils.i("onCheckPermission"+rongCallSession.toString());
                }
            });
            //监听通话状态
            CloudManager.getInstance().setVoIPCallListener(new IRongCallListener() {
                @Override
                public void onCallOutgoing(RongCallSession rongCallSession, SurfaceView surfaceView) {
             //       String call=new Gson().toJson(rongCallSession);
    
                    LogUtils.i("onCallOutgoing");
                    isCallTo=1;
                    isCallOrReceiver=true;
                    //更新信息
                    String targetId=rongCallSession.getTargetId();
                    updateWindowInfo(1,rongCallSession.getMediaType(),targetId);
    //通话Id
                    callId=  rongCallSession.getCallId();
    
                    if (rongCallSession.getMediaType().equals(RongCallCommon.CallMediaType.AUDIO))
                    {
                        LogUtils.i("音频通话");
                        WindowHelper.getInstance().showView(mFullAudioView);
                    }else if (rongCallSession.getMediaType().equals(RongCallCommon.CallMediaType.VIDEO))
                    {
                        LogUtils.i("音频通话");
                        WindowHelper.getInstance().showView(mFullVideoView);
                        //显示 摄像头
                        mLocalView=surfaceView;
                        video_big_video.addView(mLocalView);
                    }
                }
    
                @Override
    

      

     
  • 相关阅读:
    POJ-1321-棋盘问题
    HDU-2553-N皇后问题
    POJ-1502-MPI Maelstrom
    POJ-3268-Silver Cow Party
    POJ-1125-Stockbroker Grapevine
    SPFA算法模板
    邻接表
    关于apache做301的问题
    在eclipse中使用正则表达式进行搜素
    sprintf数据库查询的作用
  • 原文地址:https://www.cnblogs.com/guziteng1/p/13044306.html
Copyright © 2011-2022 走看看