v0.10.3 - Use new WebRTC support APPI

This commit is contained in:
Diego Rodríguez 2016-01-02 16:49:48 -05:00
parent 48f29dff9a
commit 1b775906c4
4 changed files with 7 additions and 11 deletions

View file

@ -63,9 +63,8 @@
app.controller('BTorrentCtrl', [
'$scope', '$http', '$log', '$location', 'ngNotify', function($scope, $http, $log, $location, ngNotify) {
var rtc, updateAll;
rtc = window.mozRTCPeerConnection || window.RTCPeerConnection || window.webkitRTCPeerConnection;
if (rtc == null) {
var updateAll;
if (WebTorrent.WEBRTC_SUPPORT == null) {
$scope.disabled = true;
ngNotify.set('Please use latest Chrome, Firefox or Opera', {
type: 'error',
@ -73,7 +72,6 @@
button: false
});
}
rtc = null;
$scope.client = client;
$scope.seedIt = true;
$scope.columns = [

View file

@ -8,7 +8,7 @@
<meta name="keywords" content="βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent, torrenting, sharing, filesharing">
<meta name="author" content="Diego Rodríguez Baquero - DiegoRBaquero">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/g/webtorrent@0.67.1,momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7,angular.file-upload@10.1"></script>
<script src="https://cdn.jsdelivr.net/g/webtorrent@0.68,momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7,angular.file-upload@10.1"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0,angular.ng-notify@0.7(ng-notify.min.css)">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.5/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/angular.ui-grid/3.0.7/ui-grid.min.css">
@ -16,7 +16,7 @@
</head>
<body ng-controller="BTorrentCtrl" ng-cloak="">
<header>
<h1>βTorrent<span class="version"> v0.10.2</span></h1>
<h1>βTorrent<span class="version"> v0.10.3</span></h1>
</header>
<div class="container">
<div class="row">

View file

@ -50,11 +50,9 @@ app = angular.module 'BTorrent', ['ui.grid', 'ui.grid.resizeColumns', 'ui.grid.s
]
app.controller 'BTorrentCtrl', ['$scope','$http','$log','$location', 'ngNotify', ($scope, $http, $log, $location, ngNotify) ->
rtc = window.mozRTCPeerConnection || window.RTCPeerConnection || window.webkitRTCPeerConnection
if !rtc?
if !WebTorrent.WEBRTC_SUPPORT?
$scope.disabled = true
ngNotify.set 'Please use latest Chrome, Firefox or Opera', {type: 'error', sticky: true, button: false}
rtc = null
$scope.client = client
$scope.seedIt = true

View file

@ -8,7 +8,7 @@ html(ng-app='BTorrent', lang='en')
meta(name='keywords', content='βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent, torrenting, sharing, filesharing')
meta(name='author', content='Diego Rodríguez Baquero - DiegoRBaquero')
meta(name='viewport', content='width=device-width, initial-scale=1')
script(src='https://cdn.jsdelivr.net/g/webtorrent@0.67.1,momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7,angular.file-upload@10.1')
script(src='https://cdn.jsdelivr.net/g/webtorrent@0.68,momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7,angular.file-upload@10.1')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0,angular.ng-notify@0.7(ng-notify.min.css)')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/fontawesome/4.5/css/font-awesome.min.css')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/angular.ui-grid/3.0.7/ui-grid.min.css')
@ -17,7 +17,7 @@ html(ng-app='BTorrent', lang='en')
header
h1
| βTorrent
span.version v0.10.2
span.version v0.10.3
.container
.row
.four.columns