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
    

      

     
  • 相关阅读:
    模块-和包
    re模块
    递归函数
    内置函数
    C++ 创建文件的方法
    C++多态的实现条件
    C++常见错误总结
    Http客户端跳转和服务器端跳转的区别
    struts1学习
    Java 核心读书笔记 第11章
  • 原文地址:https://www.cnblogs.com/guziteng1/p/13044306.html
Copyright © 2011-2022 走看看