]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8400 [verto_communicator] Removing deprecated use of stream.stop(), removing unuse...
authorItalo Rossi <italorossib@gmail.com>
Fri, 6 Nov 2015 19:38:15 +0000 (16:38 -0300)
committerItalo Rossi <italorossib@gmail.com>
Fri, 6 Nov 2015 19:38:15 +0000 (16:38 -0300)
html5/verto/verto_communicator/src/css/verto.css
html5/verto/verto_communicator/src/partials/preview.html
html5/verto/verto_communicator/src/vertoControllers/controllers/PreviewController.js

index c9694e15d331041b0dc5d7e255817781ad9c5e34..84ca62e730cfb90bb4765d679e35c9d1bbc87f10 100644 (file)
@@ -1488,7 +1488,7 @@ body:-webkit-full-screen #incall .video-footer {
 }
 #mic-meter .icon {
   margin-left: 3px;
-  color: white;
+  color: #CCC;
 }
 #mic-meter .volumes {
   width: 30px;
@@ -1497,13 +1497,13 @@ body:-webkit-full-screen #incall .video-footer {
   height: 10px;
   width: 100%;
   border-radius: 5px;
-  border: 2px solid white;
+  border: 2px solid #CCC;
   display: block;
   margin-top: 1.5px;
 }
 
 #mic-meter .volumes .volume-segment.active {
-  background-color: white;
+  background-color: #CCC;
 }
 
 #preview .refresh {
index 947b0afb042b08d3630066bd6306d3746265e671..76e3b68744461aec8148da6b58c29212fc2f667f 100644 (file)
@@ -1,26 +1,3 @@
-<!-- <div class="panel panel-default shadow-z-0">
-  <div class="" style="width: 100%; height: 100%;">
-    <div class="" ng-dblclick="goFullscreen()">
-      <video id="preview" style="width: 400px;"></video>
-      <svg ng-show="video != 'active'" class="spinner" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
-        <circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>
-      </svg>
-    </div>
-    <div class="video-footer panel-body">
-      <div class="row">
-        <div class="col-md-6 col-xs-6 text-left">
-        </div>
-        <div class="col-md-6 col-xs-6 text-right">
-          <button class="btn btn-primary" ng-click="localVideo()">
-            <i class="mdi-communication-call-end"></i>
-            Get
-          </button>
-        </div>
-      </div>
-    </div>
-  </div>
-</div> -->
-
 <div class="centered-block-frame" id="preview">
   <div class="col-md-4 col-sm-12 col-xs-12 centered-block">
     <div class="panel panel-material-blue-900 shadow-z-2 ">
index 61fbc5f2e2786ea4f9b2386ba080ea016adf2ac5..6a1d6494302418816e212fd52d3bf1a701eae9f7 100644 (file)
         var meter;
         var streamObj = {};
 
+        function stopMedia(stream) {
+          if (typeof stream == 'function') {
+            stream.stop();
+          } else {
+            if (stream.active) {
+              var tracks = stream.getTracks();
+              tracks.forEach(function(track, index) {
+                track.stop();
+              })
+            }
+          }
+        }
         function handleMedia(stream) {
-          streamObj.stop ? streamObj.stop() : streamObj.active = false;
+          if (streamObj) {
+            stopMedia(streamObj);
+          }
 
           streamObj = stream;
           localVideo.src = window.URL.createObjectURL(stream);
           localVideo.src = null;
           meter.shutdown();
           meter.onaudioprocess = null;
-          streamObj.stop();
+          stopMedia(streamObj);
           $location.path('/dialpad');
           storage.data.preview = false;
         };
 
-        $scope.screenshare = function() {
-          if(verto.data.shareCall) {
-            verto.screenshareHangup();
-            return false;
-          }
-          verto.screenshare(storage.data.called_number);
-        };
-
-        $scope.call = function() {
-          if($rootScope.dialpadNumber) {
-            localVideo.src = null;
-            meter.shutdown();
-            meter.onaudioprocess = null;
-            streamObj.stop();
-          }
-          $rootScope.call($rootScope.dialpadNumber);
-        };
-
-        $scope.muteMic = verto.muteMic;
-        $scope.muteVideo = verto.muteVideo;
-
-        $rootScope.$on('ScreenShareExtensionStatus', function(event, error) {
-          var pluginUrl = 'https://chrome.google.com/webstore/detail/screen-capturing/ajhifddimkapgcifgcodmmfdlknahffk';
-          switch(error) {
-            case 'permission-denied':
-              toastr.info('Please allow the plugin in order to use Screen Share', 'Error'); break;
-            case 'not-installed':
-              toastr.warning('Please <a target="_blank" class="install" href="'+ pluginUrl +'">install</a> the plugin in order to use Screen Share', 'Warning', { allowHtml: true }); break;
-            case 'installed-disabled':
-              toastr.info('Please enable the plugin in order to use Screen Share', 'Error'); break;
-            // case 'not-chrome'
-            //   toastr.info('Chrome', 'Error');
-          }
-        });
         $scope.localVideo();
       }
     ]);