在verto_communicator中添加視頻floor輪詢功能

只是實現了簡單的視頻輪詢功能,還需要修改完善!!!

1、在src/partials/chat.html中添加

<div>
        <p>{{num}}</p>
        <button ng-click="fun()">開始</button>
        <button ng-click="stopfun()">結束</button>
</div>

2、在src/vertoControllers/controllers/ChatController.js 中添加(在$scope.confVideoFloor 下面)

      //by aphero
      $scope.num=0;
      var stopEvent;  
      $scope.fun=function () {
        stopEvent=$interval(function () {
         if($scope.num < $scope.members.length){
             console.log($scope.members[$scope.num]);
             verto.data.conf.videoFloor($scope.members[$scope.num].id);
             $scope.num++;
        }else{
             $scope.num=0
        }
        console.log("start");
        },3000);
      };

      $scope.stopfun=function(){
        console.log("stop");
        $interval.cancel(stopEvent);
      };
      //by aphero end

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章