只是實現了簡單的視頻輪詢功能,還需要修改完善!!!
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