Update app.js
This commit is contained in:
parent
4d237879bd
commit
68a6952b2c
1 changed files with 3 additions and 2 deletions
5
app.js
5
app.js
|
@ -36,7 +36,7 @@ const dbg = function (string, item, color) {
|
||||||
|
|
||||||
const er = function (err, item) { dbg(err, item, '#FF0000') }
|
const er = function (err, item) { dbg(err, item, '#FF0000') }
|
||||||
|
|
||||||
dbg(`Starting... v${VERSION}`)
|
dbg(`Starting v${VERSION}. WebTorrent ${WebTorrent.VERSION}`)
|
||||||
|
|
||||||
const client = new WebTorrent({
|
const client = new WebTorrent({
|
||||||
tracker: trackerOpts
|
tracker: trackerOpts
|
||||||
|
@ -66,13 +66,14 @@ const app = angular.module('BTorrent',
|
||||||
app.controller('BTorrentCtrl', ['$scope', '$rootScope', '$http', '$log', '$location', 'ngNotify', function ($scope, $rootScope, $http, $log, $location, ngNotify) {
|
app.controller('BTorrentCtrl', ['$scope', '$rootScope', '$http', '$log', '$location', 'ngNotify', function ($scope, $rootScope, $http, $log, $location, ngNotify) {
|
||||||
let updateAll
|
let updateAll
|
||||||
$rootScope.version = VERSION
|
$rootScope.version = VERSION
|
||||||
|
$rootScope.webtorrentVersion = WebTorrent.VERSION
|
||||||
ngNotify.config({
|
ngNotify.config({
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
html: true
|
html: true
|
||||||
})
|
})
|
||||||
if (!WebTorrent.WEBRTC_SUPPORT) {
|
if (!WebTorrent.WEBRTC_SUPPORT) {
|
||||||
$rootScope.disabled = true
|
$rootScope.disabled = true
|
||||||
ngNotify.set('Please use latest Chrome, Firefox or Opera', {
|
ngNotify.set('Please use a WebRTC compatible browser', {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
sticky: true,
|
sticky: true,
|
||||||
button: false
|
button: false
|
||||||
|
|
Loading…
Reference in a new issue