Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
056ffcd2
Commit
056ffcd2
authored
Dec 26, 2020
by
Antonin Décimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing semicolons.
parent
d2f70101
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
static/galene.js
static/galene.js
+25
-25
static/protocol.js
static/protocol.js
+11
-11
No files found.
static/galene.js
View file @
056ffcd2
...
...
@@ -147,7 +147,7 @@ function delSetting(key) {
if
(
!
(
key
in
s
))
return
;
delete
(
s
[
key
]);
storeSettings
(
s
)
storeSettings
(
s
)
;
}
/**
...
...
@@ -316,13 +316,13 @@ function gotDownStream(c) {
c
.
onerror
=
function
(
e
)
{
console
.
error
(
e
);
displayError
(
e
);
}
}
;
c
.
ondowntrack
=
function
(
track
,
transceiver
,
label
,
stream
)
{
setMedia
(
c
,
false
);
}
}
;
c
.
onstatus
=
function
(
status
)
{
setMediaStatus
(
c
);
}
}
;
c
.
onstats
=
gotDownStats
;
if
(
getSettings
().
activityDetection
)
c
.
setStatsInterval
(
activityDetectionInterval
);
...
...
@@ -455,14 +455,14 @@ getInputElement('blackboardbox').onchange = function(e) {
throw
new
Error
(
'
Unexpected type for this
'
);
updateSettings
({
blackboardMode
:
this
.
checked
});
changePresentation
();
}
}
;
document
.
getElementById
(
'
mutebutton
'
).
onclick
=
function
(
e
)
{
e
.
preventDefault
();
let
localMute
=
getSettings
().
localMute
;
localMute
=
!
localMute
;
setLocalMute
(
localMute
,
true
);
}
}
;
document
.
getElementById
(
'
sharebutton
'
).
onclick
=
function
(
e
)
{
e
.
preventDefault
();
...
...
@@ -473,13 +473,13 @@ document.getElementById('unsharebutton').onclick = function(e) {
e
.
preventDefault
();
delUpMediaKind
(
'
screenshare
'
);
resizePeers
();
}
}
;
document
.
getElementById
(
'
stopvideobutton
'
).
onclick
=
function
(
e
)
{
e
.
preventDefault
();
delUpMediaKind
(
'
video
'
);
resizePeers
();
}
}
;
/** @returns {number} */
function
getMaxVideoThroughput
()
{
...
...
@@ -508,7 +508,7 @@ getSelectElement('sendselect').onchange = async function(e) {
let
c
=
serverConnection
.
up
[
id
];
await
setMaxVideoThroughput
(
c
,
t
);
}
}
}
;
getSelectElement
(
'
requestselect
'
).
onchange
=
function
(
e
)
{
e
.
preventDefault
();
...
...
@@ -535,7 +535,7 @@ getInputElement('activitybox').onchange = function(e) {
setActive
(
c
,
false
);
}
}
}
}
;
getInputElement
(
'
fileinput
'
).
onchange
=
function
(
e
)
{
if
(
!
(
this
instanceof
HTMLInputElement
))
...
...
@@ -550,7 +550,7 @@ getInputElement('fileinput').onchange = function(e) {
}
input
.
value
=
''
;
closeNav
();
}
}
;
/**
* @this {Stream}
...
...
@@ -735,18 +735,18 @@ function newUpStream(id) {
let
c
=
serverConnection
.
newUpStream
(
id
);
c
.
onstatus
=
function
(
status
)
{
setMediaStatus
(
c
);
}
}
;
c
.
onerror
=
function
(
e
)
{
console
.
error
(
e
);
displayError
(
e
);
delUpMedia
(
c
);
}
}
;
c
.
onabort
=
function
()
{
delUpMedia
(
c
);
}
}
;
c
.
onnegotiationcompleted
=
function
()
{
setMaxVideoThroughput
(
c
,
getMaxVideoThroughput
())
}
setMaxVideoThroughput
(
c
,
getMaxVideoThroughput
())
;
}
;
return
c
;
}
...
...
@@ -833,7 +833,7 @@ async function addLocalMedia(id) {
c
.
stream
=
stream
;
let
mute
=
getSettings
().
localMute
;
stream
.
getTracks
().
forEach
(
t
=>
{
c
.
labels
[
t
.
id
]
=
t
.
kind
c
.
labels
[
t
.
id
]
=
t
.
kind
;
if
(
t
.
kind
==
'
audio
'
)
{
if
(
mute
)
t
.
enabled
=
false
;
...
...
@@ -888,7 +888,7 @@ async function addShareMedia() {
c
.
onstats
=
gotUpStats
;
c
.
setStatsInterval
(
2000
);
await
setMedia
(
c
,
true
);
setButtonsVisibility
()
setButtonsVisibility
()
;
}
/**
...
...
@@ -937,7 +937,7 @@ async function addFileMedia(file) {
sender
=
s
;
});
if
(
sender
)
{
c
.
pc
.
removeTrack
(
sender
)
c
.
pc
.
removeTrack
(
sender
)
;
}
else
{
console
.
warn
(
'
Removing unknown track
'
);
}
...
...
@@ -950,7 +950,7 @@ async function addFileMedia(file) {
};
await
setMedia
(
c
,
true
,
false
,
video
);
c
.
userdata
.
play
=
true
;
setButtonsVisibility
()
setButtonsVisibility
()
;
}
/**
...
...
@@ -979,7 +979,7 @@ function delUpMedia(c) {
}
c
.
close
();
delete
(
serverConnection
.
up
[
c
.
id
]);
setButtonsVisibility
()
setButtonsVisibility
()
;
}
/**
...
...
@@ -1369,8 +1369,8 @@ let users = {};
* @param{string} b
*/
function
stringCompare
(
a
,
b
)
{
let
la
=
a
.
toLowerCase
()
let
lb
=
b
.
toLowerCase
()
let
la
=
a
.
toLowerCase
()
;
let
lb
=
b
.
toLowerCase
()
;
if
(
la
<
lb
)
return
-
1
;
else
if
(
la
>
lb
)
...
...
@@ -1761,7 +1761,7 @@ function clearChat() {
*
* @type {Object.<string,command>}
*/
let
commands
=
{}
let
commands
=
{}
;
function
operatorPredicate
()
{
if
(
serverConnection
&&
serverConnection
.
permissions
&&
...
...
@@ -1818,7 +1818,7 @@ commands.set = {
let
p
=
parseCommand
(
r
);
let
value
;
if
(
p
[
1
])
{
value
=
JSON
.
parse
(
p
[
1
])
value
=
JSON
.
parse
(
p
[
1
])
;
}
else
{
value
=
true
;
}
...
...
static/protocol.js
View file @
056ffcd2
...
...
@@ -190,7 +190,7 @@ function ServerConnection() {
ServerConnection
.
prototype
.
close
=
function
()
{
this
.
socket
&&
this
.
socket
.
close
(
1000
,
'
Close requested by client
'
);
this
.
socket
=
null
;
}
}
;
/**
* send sends a message to the server.
...
...
@@ -202,7 +202,7 @@ ServerConnection.prototype.send = function(m) {
throw
(
new
Error
(
'
Connection is not open
'
));
}
return
this
.
socket
.
send
(
JSON
.
stringify
(
m
));
}
}
;
/**
* connect connects to the server.
...
...
@@ -263,7 +263,7 @@ ServerConnection.prototype.connect = async function(url) {
sc
.
gotAnswer
(
m
.
id
,
m
.
sdp
);
break
;
case
'
renegotiate
'
:
sc
.
gotRenegotiate
(
m
.
id
)
sc
.
gotRenegotiate
(
m
.
id
)
;
break
;
case
'
close
'
:
sc
.
gotClose
(
m
.
id
);
...
...
@@ -322,7 +322,7 @@ ServerConnection.prototype.connect = async function(url) {
}
};
});
}
}
;
/**
* join requests to join a group. The onjoined callback will be called
...
...
@@ -340,7 +340,7 @@ ServerConnection.prototype.join = function(group, username, password) {
username
:
username
,
password
:
password
,
});
}
}
;
/**
* leave leaves a group. The onjoined callback will be called when we've
...
...
@@ -354,7 +354,7 @@ ServerConnection.prototype.leave = function(group) {
kind
:
'
leave
'
,
group
:
group
,
});
}
}
;
/**
* request sets the list of requested media types.
...
...
@@ -430,7 +430,7 @@ ServerConnection.prototype.newUpStream = function(id) {
pc
.
ontrack
=
console
.
error
;
return
c
;
}
}
;
/**
* chat sends a chat message to the server. The server will normally echo
...
...
@@ -734,7 +734,7 @@ function Stream(sc, id, pc, up) {
* @type {boolean}
* @const
*/
this
.
up
=
up
this
.
up
=
up
;
/**
* For up streams, one of "local" or "screenshare".
*
...
...
@@ -920,7 +920,7 @@ Stream.prototype.abort = function() {
type
:
'
abort
'
,
id
:
c
.
id
,
});
}
}
;
/**
* Called when we get a local ICE candidate. Don't call this.
...
...
@@ -937,7 +937,7 @@ Stream.prototype.gotLocalIce = function(candidate) {
});
else
c
.
localIceCandidates
.
push
(
candidate
);
}
}
;
/**
* flushLocalIceCandidates flushes any buffered local ICE candidates.
...
...
@@ -959,7 +959,7 @@ Stream.prototype.flushLocalIceCandidates = function () {
}
});
c
.
localIceCandidates
=
[];
}
}
;
/**
* flushRemoteIceCandidates flushes any buffered remote ICE candidates. It is
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment