mumble-web
Este commit está contenido en:
42
production/mumble-web/config.js
Archivo normal
42
production/mumble-web/config.js
Archivo normal
@@ -0,0 +1,42 @@
|
||||
// Note: You probably do not want to change any values in here because this
|
||||
// file might need to be updated with new default values for new
|
||||
// configuration options. Use the [config.local.js] file instead!
|
||||
|
||||
window.mumbleWebConfig = {
|
||||
// Which fields to show on the Connect to Server dialog
|
||||
'connectDialog': {
|
||||
'address': false,
|
||||
'port': false,
|
||||
'token': false,
|
||||
'username': true,
|
||||
'password': false,
|
||||
'channelName': false
|
||||
},
|
||||
// Default values for user settings
|
||||
// You can see your current value by typing `localStorage.getItem('mumble.$setting')` in the web console.
|
||||
'settings': {
|
||||
'voiceMode': 'ptt', // one of 'cont' (Continuous), 'ptt' (Push-to-Talk), 'vad' (Voice Activity Detection)
|
||||
'pttKey': 'h',
|
||||
'vadLevel': 0.3,
|
||||
'toolbarVertical': false,
|
||||
'showAvatars': 'always', // one of 'always', 'own_channel', 'linked_channel', 'minimal_only', 'never'
|
||||
'userCountInChannelName': false,
|
||||
'audioBitrate': 128000, // bits per second
|
||||
'samplesPerPacket': 960
|
||||
},
|
||||
// Default values (can be changed by passing a query parameter of the same name)
|
||||
'defaults': {
|
||||
// Connect Dialog
|
||||
'address': window.location.hostname,
|
||||
'port': '443',
|
||||
'token': '',
|
||||
'username': '',
|
||||
'password': '',
|
||||
'joinDialog': true, // replace whole dialog with single "Join Conference" button
|
||||
'matrix': false, // enable Matrix Widget support (mostly auto-detected; implies 'joinDialog')
|
||||
'avatarurl': '', // download and set the user's Mumble avatar to the image at this URL
|
||||
// General
|
||||
//'theme': 'MetroMumbleLight'
|
||||
'theme': 'MetroMumbleDark'
|
||||
}
|
||||
}
|
||||
32
production/mumble-web/docker-compose.yml
Archivo normal
32
production/mumble-web/docker-compose.yml
Archivo normal
@@ -0,0 +1,32 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
mumble-web:
|
||||
build: ./mumble-web
|
||||
hostname: mumble-web
|
||||
container_name: mumble-web
|
||||
restart: always
|
||||
entrypoint:
|
||||
- /bin/bash
|
||||
- entrypoint.sh
|
||||
expose:
|
||||
- 8080
|
||||
volumes:
|
||||
- ./entrypoint.sh:/home/node/mumble-web/entrypoint.sh
|
||||
- ./config.js:/home/node/mumble-web/app/config.js:ro
|
||||
- ./cert.pem:/home/node/mumble-web/cert.pem:ro
|
||||
- ./key.pem:/home/node/mumble-web/key.pem:ro
|
||||
- ./index.html:/home/node/mumble-web/app/index.html:ro
|
||||
- ./index.js:/home/node/mumble-web/app/index.js:ro
|
||||
- ./loc:/home/node/mumble-web/loc:ro
|
||||
networks:
|
||||
mynet:
|
||||
ipv4_address: 172.60.0.101
|
||||
|
||||
networks:
|
||||
mynet:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.60.0.0/24
|
||||
|
||||
4
production/mumble-web/entrypoint.sh
Archivo normal
4
production/mumble-web/entrypoint.sh
Archivo normal
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
rm -rf dist && npm run build
|
||||
websockify --ssl-target --web=/home/node/mumble-web/dist --key=/home/node/mumble-web/key.pem --cert=/home/node/mumble-web/cert.pem 8080 mumble.hatthieves.es:64738
|
||||
|
||||
1
production/mumble-web/gencert.sh
Archivo normal
1
production/mumble-web/gencert.sh
Archivo normal
@@ -0,0 +1 @@
|
||||
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem
|
||||
708
production/mumble-web/index.html
Archivo normal
708
production/mumble-web/index.html
Archivo normal
@@ -0,0 +1,708 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<!-- Favicon as generated by realfavicongenerator.net (slightly modified for webpack) -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" href="favicon/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="favicon/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="favicon/manifest.json">
|
||||
<link rel="mask-icon" href="favicon/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="favicon/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Mumble">
|
||||
<meta name="application-name" content="Mumble">
|
||||
<meta name="msapplication-config" content="${require('./favicon/browserconfig.xml')}">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script src="config.js"></script>
|
||||
<script src="config.local.js"></script>
|
||||
<script src="theme.js"></script>
|
||||
<script src="matrix.js"></script>
|
||||
<style>
|
||||
.channel, .user-name, .branch, .user-tree, .channel-tree, .channel-sub {
|
||||
position: relative;
|
||||
}
|
||||
.channel, .user-name, .user {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
margin-top: -3px;
|
||||
}
|
||||
.user-tree, .branch, .channel-tree {
|
||||
float: left;
|
||||
}
|
||||
.user-wrapper {
|
||||
display: flex;
|
||||
}
|
||||
.branch{
|
||||
padding-top: 6px;
|
||||
padding-bottom: 0px;
|
||||
z-index: 1;
|
||||
}
|
||||
.user {
|
||||
margin-left: 0px;
|
||||
}
|
||||
.channel-wrapper .channel {
|
||||
left: -7px;
|
||||
}
|
||||
.channel-wrapper img.channel-description {
|
||||
margin-right: -1px;
|
||||
}
|
||||
img.channel-description {
|
||||
margin-right: 6px;
|
||||
margin-top: 4px !important
|
||||
}
|
||||
.channel img, .user img {
|
||||
margin-top: -5px;
|
||||
}
|
||||
.toolbar-horizontal ~ .chat {
|
||||
width: 59%;
|
||||
}
|
||||
.toolbar-vertical ~ .chat {
|
||||
width: calc(59% - 36px);
|
||||
}
|
||||
.toolbar-horizontal ~ .channel-root-container {
|
||||
width: calc(39% - 6px);
|
||||
}
|
||||
.toolbar-vertical ~ .channel-root-container {
|
||||
width: calc(39% - 6px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="loading-container" data-bind="css: { loaded: true }">
|
||||
<div class="loading-circle" data-bind="css: { loaded: true }"></div>
|
||||
</div>
|
||||
<div id="container" style="display: none" data-bind="visible: true,
|
||||
css: { minimal: minimalView }">
|
||||
<!-- ko with: connectDialog -->
|
||||
<div class="connect-dialog dialog" data-bind="visible: visible() && !joinOnly()">
|
||||
<div id="connect-dialog_title" class="dialog-header">
|
||||
Connect to Server
|
||||
</div>
|
||||
<form data-bind="submit: connect">
|
||||
<table>
|
||||
<tr data-bind="if: $root.config.connectDialog.address">
|
||||
<td id="connect-dialog_input_address">Address</td>
|
||||
<td><input id="address" type="text" data-bind="value: address" required></td>
|
||||
</tr>
|
||||
<tr data-bind="if: $root.config.connectDialog.port">
|
||||
<td id="connect-dialog_input_port">Port</td>
|
||||
<td><input id="port" type="text" data-bind="value: port" required></td>
|
||||
</tr>
|
||||
<tr data-bind="if: $root.config.connectDialog.username">
|
||||
<td id="connect-dialog_input_username">Username</td>
|
||||
<td><input id="username" type="text" data-bind="value: username" required></td>
|
||||
</tr>
|
||||
<tr data-bind="if: $root.config.connectDialog.password">
|
||||
<td id="connect-dialog_input_password">Password</td>
|
||||
<td><input id="password" type="password" data-bind="value: password"></td>
|
||||
</tr>
|
||||
<tr data-bind="if: $root.config.connectDialog.token">
|
||||
<td id="connect-dialog_input_tokens">Tokens</td>
|
||||
<td>
|
||||
<input type="text" data-bind='value: tokenToAdd, valueUpdate: "afterkeydown"'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-bind="if: $root.config.connectDialog.token">
|
||||
<td></td>
|
||||
<td>
|
||||
<button id="connect-dialog_controls_remove" class="dialog-submit" type="button" data-bind="enable: selectedTokens().length > 0, click: removeSelectedTokens()">Remove</button>
|
||||
<button id="connect-dialog_controls_add" class="dialog-submit" type="button" data-bind="enable: tokenToAdd().length > 0, click: addToken()">Add</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-bind="if: $root.config.connectDialog.token, visible: tokens().length > 0">
|
||||
<td></td>
|
||||
<td><select id="token" multiple="multiple" height="5" data-bind="options:tokens, selectedOptions:selectedTokens"></select></td>
|
||||
</tr>
|
||||
<tr data-bind="if: $root.config.connectDialog.channelName">
|
||||
<td>Channel</td>
|
||||
<td><input id="channelName" type="text" data-bind="value: channelName"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div data-bind="if: $root.config.connectDialog.username" style="padding: 8px; text-align: center">
|
||||
<div id="connect-dialog_use"></div>
|
||||
</div>
|
||||
<div class="dialog-footer">
|
||||
<input id="connect-dialog_controls_cancel" class="dialog-close" type="button" data-bind="click: hide" value="Cancel">
|
||||
<input id="connect-dialog_controls_connect" class="dialog-submit" type="submit" value="Connect">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko with: connectDialog -->
|
||||
<div class="join-dialog dialog" data-bind="visible: visible() && joinOnly()">
|
||||
<div class="dialog-header">
|
||||
Mumble Voice Conference
|
||||
</div>
|
||||
<form data-bind="submit: connect">
|
||||
<input class="dialog-submit" type="submit" value="Join Conference">
|
||||
</form>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko with: connectErrorDialog -->
|
||||
<div class="connect-dialog error-dialog dialog" data-bind="visible: visible()">
|
||||
<div class="dialog-header">
|
||||
Failed to connect
|
||||
</div>
|
||||
<form data-bind="submit: connect">
|
||||
<table>
|
||||
<tr class="reason">
|
||||
<td colspan=2>
|
||||
<!-- ko if: type() == 0 || type() == 8 -->
|
||||
<span class="refused">
|
||||
The connection has been refused.
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: type() == 1 -->
|
||||
<span class="version">
|
||||
The server uses an incompatible version.
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: type() == 2 -->
|
||||
<span class="username">
|
||||
Your user name was rejected. Maybe try a different one?
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: type() == 3 -->
|
||||
<span class="userpassword">
|
||||
The given password is incorrect.
|
||||
The user name you have chosen requires a special one.
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: type() == 4 -->
|
||||
<span class="serverpassword">
|
||||
The given password is incorrect.
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: type() == 5 -->
|
||||
<span class="username-in-use">
|
||||
The user name you have chosen is already in use.
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: type() == 6 -->
|
||||
<span class="full">
|
||||
The server is full.
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: type() == 7 -->
|
||||
<span class="clientcert">
|
||||
The server requires you to provide a client certificate
|
||||
which is not supported by this web application.
|
||||
</span>
|
||||
<!-- /ko -->
|
||||
<br>
|
||||
<span class="server">
|
||||
The server reports:
|
||||
</span>
|
||||
<br>
|
||||
"<span class="connect-error-reason" data-bind="text: reason"></span>"
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-bind="if: type() == 2 || type() == 3 || type() == 5">
|
||||
<td class="alternate-username">Username</td>
|
||||
<td><input id="username" type="text" data-bind="value: username" required></td>
|
||||
</tr>
|
||||
<tr data-bind="if: type() == 3 || type() == 4">
|
||||
<td class="alternate-password">Password</td>
|
||||
<td><input id="password" type="password" data-bind="value: password" required></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="dialog-footer">
|
||||
<input class="dialog-close" type="button" value="Cancel"
|
||||
data-bind="click: hide, visible: !joinOnly()">
|
||||
<input class="dialog-submit" type="submit" value="Retry">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko with: connectionInfo -->
|
||||
<div class="connection-info-dialog dialog" data-bind="visible: visible">
|
||||
<div class="dialog-header">
|
||||
Connection Information
|
||||
</div>
|
||||
<div class="dialog-content">
|
||||
<h3>Version</h3>
|
||||
<!-- ko with: serverVersion -->
|
||||
Protocol
|
||||
<span data-bind="text: major + '.' + minor + '.' + patch"></span>.
|
||||
<br>
|
||||
<br>
|
||||
<span data-bind="text: release"></span>
|
||||
<br>
|
||||
<span data-bind="text: os"></span>
|
||||
<span data-bind="text: osVersion"></span>
|
||||
<br>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: !serverVersion() -->
|
||||
Unknown
|
||||
<!-- /ko -->
|
||||
|
||||
<h3>Control channel</h3>
|
||||
<span data-bind="text: latencyMs().toFixed(2)"></span> ms average latency
|
||||
(<span data-bind="text: latencyDeviation().toFixed(2)"></span> deviation)
|
||||
<br>
|
||||
<br>
|
||||
Remote host <span data-bind="text: remoteHost"></span>
|
||||
(port <span data-bind="text: remotePort"></span>)
|
||||
<br>
|
||||
|
||||
<h3>Audio bandwidth</h3>
|
||||
Maximum <span data-bind="text: (maxBitrate()/1000).toFixed(1)"></span> kbits/s
|
||||
(<span data-bind="text: (maxBandwidth()/1000).toFixed(1)"></span> kbits/s with overhead)
|
||||
<br>
|
||||
Current <span data-bind="text: (currentBitrate()/1000).toFixed(1)"></span> kbits/s
|
||||
(<span data-bind="text: (currentBandwidth()/1000).toFixed(1)"></span> kbits/s with overhead)
|
||||
<br>
|
||||
Codec: <span data-bind="text: codec"></span>
|
||||
</div>
|
||||
<div class="dialog-footer">
|
||||
<input class="dialog-close" type="button" data-bind="click: hide" value="OK">
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko with: settingsDialog -->
|
||||
<div class="settings-dialog dialog" data-bind="visible: $data">
|
||||
<div class="dialog-header">
|
||||
Settings
|
||||
</div>
|
||||
<form data-bind="submit: $root.applySettings">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Transmission</td>
|
||||
<td>
|
||||
<select data-bind='value: voiceMode'>
|
||||
<option value="cont">Continuous</option>
|
||||
<option value="vad">Voice Activity</option>
|
||||
<option value="ptt">Push To Talk</option>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-bind="visible: voiceMode() == 'vad'">
|
||||
<td colspan="2">
|
||||
<div class="mic-volume-container">
|
||||
<div class="mic-volume" data-bind="style: {
|
||||
width: testVadLevel()*100 + '%',
|
||||
background: testVadActive() ? 'green' : 'red'
|
||||
}"></div>
|
||||
</div>
|
||||
<input type="range" min="0" max="1" step="0.01"
|
||||
data-bind="value: vadLevel">
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-bind="visible: voiceMode() == 'ptt'">
|
||||
<td>PTT Key</td>
|
||||
<td>
|
||||
<input type="button" data-bind="value: pttKeyDisplay, click: recordPttKey">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Audio Quality</td>
|
||||
<td><span data-bind="text: (audioBitrate()/1000).toFixed(1)"></span> kbit/s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="range" min="8000" max="96000" step="8"
|
||||
data-bind="value: audioBitrate, valueUpdate: 'input'">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Audio per packet</td>
|
||||
<td><span data-bind="text: msPerPacket"></span> ms</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="range" min="10" max="60" step="10"
|
||||
data-bind="value: msPerPacket, valueUpdate: 'input'">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="bandwidth-info">
|
||||
<span data-bind="text: (totalBandwidth()/1000).toFixed(1)"></span>
|
||||
kbit/s
|
||||
(Audio
|
||||
<span data-bind="text: (audioBitrate()/1000).toFixed(1)"></span>,
|
||||
Position
|
||||
<span data-bind="text: (positionBandwidth()/1000).toFixed(1)"></span>,
|
||||
Overhead
|
||||
<span data-bind="text: (overheadBandwidth()/1000).toFixed(1)"></span>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Show Avatars</td>
|
||||
<td>
|
||||
<select data-bind='value: showAvatars'>
|
||||
<option value="always">Always</option>
|
||||
<option value="own_channel">Same Channel</option>
|
||||
<option value="linked_channel">Linked Channels</option>
|
||||
<option value="minimal_only">Minimal View</option>
|
||||
<option value="never">Never</option>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="checkbox" data-bind="checked: userCountInChannelName">
|
||||
Show user count after channel name
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="dialog-footer">
|
||||
<input class="dialog-close" type="button" data-bind="click: $root.closeSettings" value="Cancel">
|
||||
<input class="dialog-submit" type="submit" value="Apply">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<img class="avatar-view" data-bind="visible: avatarView, attr: { src: avatarView },
|
||||
click: function () { avatarView(null) }"></img>
|
||||
<!-- ko with: userContextMenu -->
|
||||
<ul class="context-menu user-context-menu" data-bind="if: target,
|
||||
style: { left: posX() + 'px',
|
||||
top: posY() + 'px' }">
|
||||
|
||||
<!-- ko with: target -->
|
||||
<li data-bind="css: { disabled: !canChangeMute() }"
|
||||
class="mute">
|
||||
Mute
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canChangeDeafen() }"
|
||||
class="deafen">
|
||||
Deafen
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canChangePrioritySpeaker() }"
|
||||
class="priority-speaker">
|
||||
Priority Speaker
|
||||
</li>
|
||||
|
||||
<li data-bind="css: { disabled: !canLocalMute() }"
|
||||
class="local-mute">
|
||||
Local Mute
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canIgnoreMessages() }"
|
||||
class="ignore-messages">
|
||||
Ignore Messages
|
||||
</li>
|
||||
|
||||
<li data-bind="css: { disabled: !canChangeComment() }, visible: comment"
|
||||
class="view-comment">
|
||||
View Comment
|
||||
</li>
|
||||
<!-- ko if: $data === $root.thisUser() -->
|
||||
<li data-bind="css: { disabled: !canChangeComment() }, visible: true"
|
||||
class="change-comment">
|
||||
Change Comment
|
||||
</li>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: $data !== $root.thisUser() -->
|
||||
<li data-bind="css: { disabled: !canChangeComment() }, visible: comment"
|
||||
class="reset-comment">
|
||||
Reset Comment
|
||||
</li>
|
||||
<!-- /ko -->
|
||||
|
||||
<li data-bind="css: { disabled: !canChangeAvatar() }, visible: texture,
|
||||
click: viewAvatar"
|
||||
class="view-avatar">
|
||||
View Avatar
|
||||
</li>
|
||||
<!-- ko if: $data === $root.thisUser() -->
|
||||
<li data-bind="css: { disabled: !canChangeAvatar() }, visible: true,
|
||||
click: changeAvatar"
|
||||
class="change-avatar">
|
||||
Change Avatar
|
||||
</li>
|
||||
<!-- /ko -->
|
||||
<li data-bind="css: { disabled: !canChangeAvatar() }, visible: texture,
|
||||
click: removeAvatar",
|
||||
class="reset-avatar">
|
||||
Reset Avatar
|
||||
</li>
|
||||
|
||||
<li data-bind="css: { disabled: true }, visible: true"
|
||||
class="send-message">
|
||||
Send Message
|
||||
</li>
|
||||
<li data-bind="css: { disabled: true }, visible: true"
|
||||
class="information">
|
||||
Information
|
||||
</li>
|
||||
|
||||
<li data-bind="visible: $data === $root.thisUser(),
|
||||
css: { checked: selfMute },
|
||||
click: toggleMute"
|
||||
class="self-mute">
|
||||
Self Mute
|
||||
</li>
|
||||
<li data-bind="visible: $data === $root.thisUser(),
|
||||
css: { checked: selfDeaf },
|
||||
click: toggleDeaf"
|
||||
class="self-deafen">
|
||||
Self Deafen
|
||||
</li>
|
||||
|
||||
<!-- ko if: $data !== $root.thisUser() -->
|
||||
<li data-bind="css: { disabled: true }, visible: true"
|
||||
class="add-friend">
|
||||
Add Friend
|
||||
</li>
|
||||
<li data-bind="css: { disabled: true }, visible: false"
|
||||
class="remove-friend">
|
||||
Remove Friend
|
||||
</li>
|
||||
<!-- /ko -->
|
||||
|
||||
<!-- /ko -->
|
||||
</ul>
|
||||
<!-- /ko -->
|
||||
<!-- ko with: channelContextMenu -->
|
||||
<ul class="context-menu channel-context-menu" data-bind="if: target,
|
||||
style: { left: posX() + 'px',
|
||||
top: posY() + 'px' }">
|
||||
|
||||
<!-- ko with: target -->
|
||||
<li data-bind="visible: users.indexOf($root.thisUser()) === -1,
|
||||
css: { disabled: !canJoin() },
|
||||
click: $root.requestMove.bind($root, $root.thisUser())"
|
||||
class="join">
|
||||
Join Channel
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canAdd() }"
|
||||
class="add">
|
||||
Add
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canEdit() }"
|
||||
class="edit">
|
||||
Edit
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canRemove() }"
|
||||
class="remove">
|
||||
Remove
|
||||
</li>
|
||||
|
||||
<li data-bind="css: { disabled: !canLink() }"
|
||||
class="link">
|
||||
Link
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canUnlink() }"
|
||||
class="unlink">
|
||||
Unlink
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canUnlink() }"
|
||||
class="unlink-all">
|
||||
Unlink All
|
||||
</li>
|
||||
|
||||
<li data-bind="css: { disabled: true }"
|
||||
class="copy-mumble-url">
|
||||
Copy Mumble URL
|
||||
</li>
|
||||
<li data-bind="css: { disabled: true }"
|
||||
class="copy-mumble-web-url">
|
||||
Copy Mumble-Web URL
|
||||
</li>
|
||||
<li data-bind="css: { disabled: !canSendMessage() }"
|
||||
class="send-message">
|
||||
Send Message
|
||||
</li>
|
||||
|
||||
<!-- /ko -->
|
||||
</ul>
|
||||
<!-- /ko -->
|
||||
<script type="text/html" id="user-tag">
|
||||
<span class="user-tag" data-bind="text: name"></span>
|
||||
</script>
|
||||
<script type="text/html" id="channel-tag">
|
||||
<span class="channel-tag" data-bind="text: name"></span>
|
||||
</script>
|
||||
<div class="toolbar" data-bind="css: { 'toolbar-horizontal': toolbarHorizontal(),
|
||||
'toolbar-vertical': !toolbarHorizontal() }">
|
||||
<img class="handle-horizontal" src="/svg/handle_horizontal.svg"
|
||||
data-bind="click: toggleToolbarOrientation">
|
||||
<img class="handle-vertical" src="/svg/handle_vertical.svg"
|
||||
data-bind="click: toggleToolbarOrientation">
|
||||
<img rel="HatThieves" src="https://www.hatthieves.es/wp-content/uploads/2019/08/cropped-ht.png">
|
||||
<!--img class="tb-connect" data-bind="visible: !connectDialog.joinOnly(),
|
||||
click: connectDialog.show"
|
||||
rel="connect" src="/svg/applications-internet.svg">
|
||||
<img class="tb-information" rel="information" src="/svg/information_icon.svg"
|
||||
data-bind="click: connectionInfo.show,
|
||||
css: { disabled: !thisUser() }">
|
||||
<div class="divider"></div-->
|
||||
<img class="tb-mute" data-bind="visible: !selfMute(),
|
||||
click: function () { requestMute(thisUser()) }"
|
||||
rel="mute" src="/svg/audio-input-microphone.svg">
|
||||
<img class="tb-unmute tb-active" data-bind="visible: selfMute,
|
||||
click: function () { requestUnmute(thisUser()) }"
|
||||
rel="unmute" src="/svg/audio-input-microphone-muted.svg">
|
||||
<img class="tb-deaf" data-bind="visible: !selfDeaf(),
|
||||
click: function () { requestDeaf(thisUser()) }"
|
||||
rel="deaf" src="/svg/audio-output.svg">
|
||||
<img class="tb-undeaf tb-active" data-bind="visible: selfDeaf,
|
||||
click: function () { requestUndeaf(thisUser()) }"
|
||||
rel="undeaf" src="/svg/audio-output-deafened.svg">
|
||||
<!--img class="tb-record" data-bind="click: function(){}"
|
||||
rel="record" src="/svg/media-record.svg">
|
||||
<div class="divider"></div>
|
||||
<img class="tb-comment" data-bind="click: commentDialog.show"
|
||||
rel="comment" src="/svg/toolbar-comment.svg">
|
||||
<div class="divider"></div>
|
||||
<img class="tb-settings" data-bind="click: openSettings"
|
||||
rel="settings" src="/svg/config_basic.svg">
|
||||
<div class="divider"></div>
|
||||
<img class="tb-sourcecode" data-bind="click: openSourceCode"
|
||||
rel="Source Code" src="/svg/source-code.svg"-->
|
||||
<div class="divider"></div>
|
||||
<button id="hat" style="border-radius: 50%; background-color: red; width: 34px; height: 34px;"></button>
|
||||
</div>
|
||||
<div class="chat">
|
||||
<script type="text/html" id="log-generic">
|
||||
<span data-bind="text: value"></span>
|
||||
</script>
|
||||
<script type="text/html" id="log-welcome-message">
|
||||
Welcome message: <span data-bind="html: message"></span>
|
||||
</script>
|
||||
<script type="text/html" id="log-chat-message">
|
||||
<span data-bind="visible: channel">
|
||||
(Channel)
|
||||
</span>
|
||||
<span data-bind="template: { name: 'user-tag', data: user }"></span>:
|
||||
<span class="message-content" data-bind="html: message"></span>
|
||||
</script>
|
||||
<script type="text/html" id="log-chat-message-self">
|
||||
To
|
||||
<span data-bind="template: { if: $data.channel, name: 'channel-tag', data: $data.channel }">
|
||||
</span><span data-bind="template: { if: $data.user, name: 'user-tag', data: $data.user }">
|
||||
</span>:
|
||||
<span class="message-content" data-bind="html: message"></span>
|
||||
</script>
|
||||
<script type="text/html" id="log-disconnect">
|
||||
</script>
|
||||
<div class="log" data-bind="foreach: {
|
||||
data: log,
|
||||
afterRender: function (e) {
|
||||
[].forEach.call(e[1].getElementsByTagName('a'), function(e){e.target = '_blank'})
|
||||
}
|
||||
}">
|
||||
<div class="log-entry">
|
||||
<span class="log-timestamp" data-bind="text: $root.getTimeString()"></span>
|
||||
<!-- ko template: { data: $data, name: function(l) { return 'log-' + l.type; } } -->
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
</div>
|
||||
<form data-bind="submit: submitMessageBox">
|
||||
<input id="message-box" type="text" data-bind="
|
||||
attr: { placeholder: messageBoxHint }, textInput: messageBox">
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/html" id="channel">
|
||||
<div class="channel" data-bind="
|
||||
click: $root.select,
|
||||
event: {
|
||||
contextmenu: openContextMenu,
|
||||
dblclick: $root.requestMove.bind($root, $root.thisUser())
|
||||
},
|
||||
css: {
|
||||
selected: $root.selected() === $data,
|
||||
currentChannel: users.indexOf($root.thisUser()) !== -1
|
||||
}">
|
||||
<div class="channel-status">
|
||||
<img class="channel-description" data-bind="visible: description"
|
||||
alt="description" src="/svg/comment.svg">
|
||||
</div>
|
||||
<div data-bind="if: description">
|
||||
<div class="channel-description tooltip" data-bind="html: description"></div>
|
||||
</div>
|
||||
<img class="channel-icon" src="/svg/channel.svg"
|
||||
data-bind="visible: !linked() && $root.thisUser().channel() !== $data">
|
||||
<img class="channel-icon-active" src="/svg/channel_active.svg"
|
||||
data-bind="visible: $root.thisUser().channel() === $data">
|
||||
<img class="channel-icon-linked" src="/svg/channel_linked.svg"
|
||||
data-bind="visible: linked() && $root.thisUser().channel() !== $data">
|
||||
<div class="channel-name">
|
||||
<span data-bind="text: name"></span>
|
||||
<!-- ko if: $root.settings.userCountInChannelName() && userCount() !== 0 -->
|
||||
(<span data-bind="text: userCount()"></span>)
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ko if: expanded -->
|
||||
<!-- ko foreach: users -->
|
||||
<div class="user-wrapper">
|
||||
<div class="user-tree"></div>
|
||||
<div class="user" data-bind="
|
||||
click: $root.select,
|
||||
event: {
|
||||
contextmenu: openContextMenu
|
||||
},
|
||||
css: {
|
||||
thisClient: $root.thisUser() === $data,
|
||||
selected: $root.selected() === $data
|
||||
}">
|
||||
<div class="user-status" data-bind="attr: { title: state }">
|
||||
<img class="user-comment" data-bind="visible: comment"
|
||||
alt="comment" src="/svg/comment.svg">
|
||||
<img class="user-server-mute" data-bind="visible: mute"
|
||||
alt="server mute" src="/svg/muted_server.svg">
|
||||
<img class="user-suppress-mute" data-bind="visible: suppress"
|
||||
alt="suppressed" src="/svg/muted_suppressed.svg">
|
||||
<img class="user-self-mute" data-bind="visible: selfMute"
|
||||
alt="self mute" src="/svg/muted_self.svg">
|
||||
<img class="user-server-deaf" data-bind="visible: deaf"
|
||||
alt="server deaf" src="/svg/deafened_server.svg">
|
||||
<img class="user-self-deaf" data-bind="visible: selfDeaf"
|
||||
alt="self deaf" src="/svg/deafened_self.svg">
|
||||
<img class="user-authenticated" data-bind="visible: uid"
|
||||
alt="authenticated" src="/svg/authenticated.svg">
|
||||
</div>
|
||||
<div data-bind="if: comment">
|
||||
<div class="user-comment tooltip" data-bind="html: comment"></div>
|
||||
</div>
|
||||
<!-- ko if: show_avatar() -->
|
||||
<img class="user-avatar" alt="avatar"
|
||||
data-bind="attr: { src: texture },
|
||||
css: { 'user-avatar-talk-off': talking() == 'off',
|
||||
'user-avatar-talk-on': talking() == 'on',
|
||||
'user-avatar-talk-whisper': talking() == 'whisper',
|
||||
'user-avatar-talk-shout': talking() == 'shout' }">
|
||||
<!-- /ko -->
|
||||
<!-- ko ifnot: show_avatar() -->
|
||||
<img class="user-talk user-talk-off" data-bind="visible: talking() == 'off'"
|
||||
alt="talk off" src="/svg/talking_off.svg">
|
||||
<img class="user-talk user-talk-on" data-bind="visible: talking() == 'on'"
|
||||
alt="talk on" src="/svg/talking_on.svg">
|
||||
<img class="user-talk user-talk-whisper" data-bind="visible: talking() == 'whisper'"
|
||||
alt="whisper" src="/svg/talking_whisper.svg">
|
||||
<img class="user-talk user-talk-shout" data-bind="visible: talking() == 'shout'"
|
||||
alt="shout" src="/svg/talking_alt.svg">
|
||||
<!-- /ko -->
|
||||
<div class="user-name" data-bind="text: name"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko foreach: channels -->
|
||||
<div class="channel-wrapper">
|
||||
<!-- ko ifnot: users().length || channels().length -->
|
||||
<div class="channel-tree"></div>
|
||||
<!-- /ko -->
|
||||
<div class="branch" data-bind="if: users().length || channels().length">
|
||||
<img class="branch-open" src="/svg/branch_open.svg"
|
||||
data-bind="click: expanded.bind($data, false), visible: expanded()">
|
||||
<img class="branch-closed" src="/svg/branch_closed.svg"
|
||||
data-bind="click: expanded.bind($data, true), visible: !expanded()">
|
||||
</div>
|
||||
<div class="channel-sub" data-bind="template: {name: 'channel', data: $data}"></div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- /ko -->
|
||||
</script>
|
||||
<div class="channel-root-container" data-bind="if: root, visible: !minimalView()">
|
||||
<div class="channel-root" data-bind="template: {name: 'channel', data: root}"></div>
|
||||
</div>
|
||||
<div class="channel-root-container" data-bind="if: thisUser, visible: minimalView()">
|
||||
<div class="channel-root" data-bind="template: {name: 'channel', data: thisUser().channel}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="index.js"></script>
|
||||
</html>
|
||||
1165
production/mumble-web/index.js
Archivo normal
1165
production/mumble-web/index.js
Archivo normal
La diferencia del archivo ha sido suprimido porque es demasiado grande
Cargar Diff
1153
production/mumble-web/index.js.save
Archivo normal
1153
production/mumble-web/index.js.save
Archivo normal
La diferencia del archivo ha sido suprimido porque es demasiado grande
Cargar Diff
16
production/mumble-web/loc/de.json
Archivo normal
16
production/mumble-web/loc/de.json
Archivo normal
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"connectdialog": {
|
||||
"use": "",
|
||||
"title": "Verbindung herstellen",
|
||||
"address": "Adresse",
|
||||
"port": "Port",
|
||||
"username": "Nutzername",
|
||||
"password": "Passwort",
|
||||
"tokens": "Tokens",
|
||||
"remove": "Entfernen",
|
||||
"add": "Hinzufügen",
|
||||
"cancel": "Abbrechen",
|
||||
"connect": "Verbinden"
|
||||
}
|
||||
}
|
||||
|
||||
78
production/mumble-web/loc/en.json
Archivo normal
78
production/mumble-web/loc/en.json
Archivo normal
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"connectdialog": {
|
||||
"use": "Use the red button or the 'h' key to speak",
|
||||
"title": "Connect to Server",
|
||||
"address": "Address",
|
||||
"port": "Port",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"tokens": "Tokens",
|
||||
"remove": "Remove",
|
||||
"add": "Add",
|
||||
"cancel": "Cancel",
|
||||
"connect": "Connect",
|
||||
"error": {
|
||||
"title": "Failed to connect",
|
||||
"reason": {
|
||||
"refused": "The connection has been refused.",
|
||||
"version": "The server uses an incompatible version.",
|
||||
"username": "Your user name was rejected. Maybe try a different one?",
|
||||
"userpassword": "The given password is incorrect.\nThe user name you have chosen requires a special one.",
|
||||
"serverpassword": "The given password is incorrect.",
|
||||
"username_in_use": "The user name you have chosen is already in use.",
|
||||
"full": "The server is full.",
|
||||
"clientcert": "The server requires you to provide a client certificate which is not supported by this web application.",
|
||||
"server": "The server reports:"
|
||||
},
|
||||
"retry": "Retry",
|
||||
"cancel": "Cancel"
|
||||
}
|
||||
},
|
||||
"joindialog": {
|
||||
"title": "Mumble Voice Conference",
|
||||
"connect": "Join Conference"
|
||||
},
|
||||
"usercontextmenu": {
|
||||
"mute": "Mute",
|
||||
"deafen": "Deafen",
|
||||
"priority_speaker": "Priority Speaker",
|
||||
"local_mute": "Local Mute",
|
||||
"ignore_messages": "Ignore Messages",
|
||||
"view_comment": "View Comment",
|
||||
"change_comment": "Change Comment",
|
||||
"reset_comment": "Reset Comment",
|
||||
"view_avatar": "View Avatar",
|
||||
"change_avatar": "Change Avatar",
|
||||
"reset_avatar": "Reset Avatar",
|
||||
"send_message": "Send Message",
|
||||
"information": "Information",
|
||||
"self_mute": "Self Mute",
|
||||
"self_deafen": "Self Deafen",
|
||||
"add_friend": "Add Friend",
|
||||
"remove_friend": "Remove Friend"
|
||||
},
|
||||
"channelcontextmenu": {
|
||||
"join": "Join Channel",
|
||||
"add": "Add",
|
||||
"edit": "Edit",
|
||||
"remove": "Remove",
|
||||
"link": "Link",
|
||||
"unlink": "Unlink",
|
||||
"unlink_all": "Unlink All",
|
||||
"copy_mumble_url": "Copy Mumble URL",
|
||||
"copy_mumble_web_url": "Copy Mumble-Web URL",
|
||||
"send_message": "Send Message"
|
||||
},
|
||||
"logentry": {
|
||||
"connecting": "Connecting to server",
|
||||
"connected": "Connected!",
|
||||
"connection_error": "Connection error:",
|
||||
"unknown_voice_mode": "Unknown voice mode:",
|
||||
"mic_init_error": "Cannot initialize user media. Microphone will not work:"
|
||||
},
|
||||
"chat": {
|
||||
"channel_message_placeholder": "Type message to channel '%1' here",
|
||||
"user_message_placeholder": "Type message to user '%1' here"
|
||||
}
|
||||
}
|
||||
|
||||
16
production/mumble-web/loc/eo.json
Archivo normal
16
production/mumble-web/loc/eo.json
Archivo normal
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"connectdialog": {
|
||||
"use": "",
|
||||
"title": "Konektado",
|
||||
"address": "Adreso",
|
||||
"port": "Pordo",
|
||||
"username": "Uzantnomo",
|
||||
"password": "Pasvorto",
|
||||
"tokens": "Ĵetonoj",
|
||||
"remove": "Forigi",
|
||||
"add": "Aldoni",
|
||||
"cancel": "Nuligi",
|
||||
"connect": "Konekti"
|
||||
}
|
||||
}
|
||||
|
||||
78
production/mumble-web/loc/es.json
Archivo normal
78
production/mumble-web/loc/es.json
Archivo normal
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"connectdialog": {
|
||||
"title": "Conectar al servidor",
|
||||
"use": "Utilice el botón rojo o la tecla 'h' para hablar",
|
||||
"address": "Dirección",
|
||||
"port": "Puerto",
|
||||
"username": "Nombre de usuario",
|
||||
"password": "Contraseña",
|
||||
"tokens": "Tokens",
|
||||
"remove": "Eliminar",
|
||||
"add": "Añadir",
|
||||
"cancel": "Cancelar",
|
||||
"connect": "Conectar",
|
||||
"error": {
|
||||
"title": "Fallo al conectar",
|
||||
"reason": {
|
||||
"refused": "La conexión ha sido rechazada.",
|
||||
"version": "El servidor usa una versión incompatible.",
|
||||
"username": "El nombre de usuario está en uso o no es válido. Prueba con otro.",
|
||||
"userpassword": "Contraseña incorrecta.\nEl nombre de usuario elegido requiere contraseña.",
|
||||
"serverpassword": "Contraseña incorrecta.",
|
||||
"username_in_use": "El nombre de usuario está en uso.",
|
||||
"full": "El servidor está lleno (completo).",
|
||||
"clientcert": "El servidor requiere acceder con un certificado, lo que no está soportado en esta aplicación web.",
|
||||
"server": "El servidor informa:"
|
||||
},
|
||||
"retry": "Reintentar",
|
||||
"cancel": "Cancelar"
|
||||
}
|
||||
},
|
||||
"joindialog": {
|
||||
"title": "Chat de Voz Mumble",
|
||||
"connect": "Unirse a la conferencia"
|
||||
},
|
||||
"usercontextmenu": {
|
||||
"mute": "Enmudecer",
|
||||
"deafen": "Ensordecer",
|
||||
"priority_speaker": "Orador prioritario",
|
||||
"local_mute": "Enmudecer localmente",
|
||||
"ignore_messages": "Ignorar mensajes",
|
||||
"view_comment": "Ver comentarios",
|
||||
"change_comment": "Cambiar comentarios",
|
||||
"reset_comment": "Reiniciar comentarios",
|
||||
"view_avatar": "Ver Avatar",
|
||||
"change_avatar": "Cambiar Avatar",
|
||||
"reset_avatar": "Reiniciar Avatar",
|
||||
"send_message": "Enviar un mensaje",
|
||||
"information": "Información",
|
||||
"self_mute": "Enmudecerse a uno mismo",
|
||||
"self_deafen": "Ensordecerse a uno mismo",
|
||||
"add_friend": "Añadir amigo",
|
||||
"remove_friend": "Eliminar amigo"
|
||||
},
|
||||
"channelcontextmenu": {
|
||||
"join": "Unirse al canal",
|
||||
"add": "Añadir",
|
||||
"edit": "Editar",
|
||||
"remove": "Eliminar",
|
||||
"link": "Link",
|
||||
"unlink": "Unlink",
|
||||
"unlink_all": "Unlink All",
|
||||
"copy_mumble_url": "Copiar Mumble URL",
|
||||
"copy_mumble_web_url": "Copiar Mumble-Web URL",
|
||||
"send_message": "Enviar mensaje"
|
||||
},
|
||||
"logentry": {
|
||||
"connecting": "Conectando al servidor",
|
||||
"connected": "¡Conectado!",
|
||||
"connection_error": "Error en la conexión:",
|
||||
"unknown_voice_mode": "Modo de voz desconocido:",
|
||||
"mic_init_error": "No se pudieron inicializar los medios. El micrófono no funcionará:"
|
||||
},
|
||||
"chat": {
|
||||
"channel_message_placeholder": "Escribe un mensaje al canal '%1'",
|
||||
"user_message_placeholder": "Escribe un mensaje al usuario '%1'"
|
||||
}
|
||||
}
|
||||
|
||||
77
production/mumble-web/loc/oc.json
Archivo normal
77
production/mumble-web/loc/oc.json
Archivo normal
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"connectdialog": {
|
||||
"use": "",
|
||||
"title": "Connexion al servidor",
|
||||
"address": "Adreça",
|
||||
"port": "Pòrt",
|
||||
"username": "Nom d’utilizaire",
|
||||
"password": "Senhal",
|
||||
"tokens": "Getons",
|
||||
"remove": "Suprimir",
|
||||
"add": "Ajustar",
|
||||
"cancel": "Anullar",
|
||||
"connect": "Se connectar",
|
||||
"error": {
|
||||
"title": "Connexion impossibla",
|
||||
"reason": {
|
||||
"refused": "Lo servidor a refusat la connexion.",
|
||||
"version": "Lo servidor utiliza una version incompatibla.",
|
||||
"username": "Vòstre nom d’utilizaire es estat regetat. Ensajatz benlèu un autre ?",
|
||||
"userpassword": "Lo senhal donat es incorrèct.\nLo nom d’utilizaire qu’avètz causit requerís un senhal especial.",
|
||||
"serverpassword": "Lo senhal donat es incorrèct.",
|
||||
"username_in_use": "Lo nom d’utilizaire donat es ja utilizat.",
|
||||
"full": "Lo servidor es plen.",
|
||||
"clientcert": "Lo servidor requerís que forniscatz un certificat client qu’es pas compatible amb aquesta web aplicacion.",
|
||||
"server": "Lo servidor senhala :"
|
||||
},
|
||||
"retry": "Ensajar tornamai",
|
||||
"cancel": "Anullar"
|
||||
}
|
||||
},
|
||||
"joindialog": {
|
||||
"title": "Conferéncia àudio Mumble",
|
||||
"connect": "Participar a la conferéncia"
|
||||
},
|
||||
"usercontextmenu": {
|
||||
"mute": "Copar lo son",
|
||||
"deafen": "Sordina",
|
||||
"priority_speaker": "Prioritat parlaire",
|
||||
"local_mute": "Copar lo son localament",
|
||||
"ignore_messages": "Ignorar los messatges",
|
||||
"view_comment": "Veire lo comentari",
|
||||
"change_comment": "Cambiar lo comentari",
|
||||
"reset_comment": "Escafar lo comentari",
|
||||
"view_avatar": "Veire l’avatar",
|
||||
"change_avatar": "Cambiar l’avatar",
|
||||
"reset_avatar": "Escafar Avatar",
|
||||
"send_message": "Enviar un messatge",
|
||||
"information": "Informacions",
|
||||
"self_mute": "Copar mon son",
|
||||
"self_deafen": "Me metre en sordina",
|
||||
"add_friend": "Ajustar coma amic",
|
||||
"remove_friend": "Tirar dels amics"
|
||||
},
|
||||
"channelcontextmenu": {
|
||||
"join": "Rejónher la sala",
|
||||
"add": "Ajustar",
|
||||
"edit": "Modificar",
|
||||
"remove": "Suprimir",
|
||||
"link": "Associar",
|
||||
"unlink": "Desassociar",
|
||||
"unlink_all": "Tot desassociar",
|
||||
"copy_mumble_url": "Copair l’URL Mumble",
|
||||
"copy_mumble_web_url": "Copiar l’URL Mumble-Web",
|
||||
"send_message": "Enviar messatge"
|
||||
},
|
||||
"logentry": {
|
||||
"connecting": "Connexion al servidor",
|
||||
"connected": "Connectat !",
|
||||
"connection_error": "Error de connexion :",
|
||||
"unknown_voice_mode": "Mòde àudio desconegut :",
|
||||
"mic_init_error": "Aviada del mèdia utilizaire impossibla. Lo microfòn foncionarà pas :"
|
||||
},
|
||||
"chat": {
|
||||
"channel_message_placeholder": "Escrivètz un messatge per la sala '%1' aquí",
|
||||
"user_message_placeholder": "Escrivètz un messatge a '%1' aquí"
|
||||
}
|
||||
}
|
||||
8
production/mumble-web/mumble-web/Dockerfile
Archivo normal
8
production/mumble-web/mumble-web/Dockerfile
Archivo normal
@@ -0,0 +1,8 @@
|
||||
FROM node:12-slim
|
||||
RUN apt update && apt -y upgrade && apt -y install websockify git python python-setuptools
|
||||
RUN npm i npm -g
|
||||
USER node
|
||||
WORKDIR /home/node
|
||||
RUN git clone https://github.com/Johni0702/mumble-web
|
||||
WORKDIR /home/node/mumble-web
|
||||
RUN npm i
|
||||
186
production/mumble-web/voice.js
Archivo normal
186
production/mumble-web/voice.js
Archivo normal
@@ -0,0 +1,186 @@
|
||||
import { Writable } from 'stream'
|
||||
import MicrophoneStream from 'microphone-stream'
|
||||
import audioContext from 'audio-context'
|
||||
import getUserMedia from 'getusermedia'
|
||||
import keyboardjs from 'keyboardjs'
|
||||
import vad from 'voice-activity-detection'
|
||||
import DropStream from 'drop-stream'
|
||||
|
||||
class VoiceHandler extends Writable {
|
||||
constructor (client, settings) {
|
||||
super({ objectMode: true })
|
||||
this._client = client
|
||||
this._settings = settings
|
||||
this._outbound = null
|
||||
this._mute = false
|
||||
}
|
||||
|
||||
setMute (mute) {
|
||||
this._mute = mute
|
||||
if (mute) {
|
||||
this._stopOutbound()
|
||||
}
|
||||
}
|
||||
|
||||
_getOrCreateOutbound () {
|
||||
if (this._mute) {
|
||||
throw new Error('tried to send audio while self-muted')
|
||||
}
|
||||
if (!this._outbound) {
|
||||
if (!this._client) {
|
||||
this._outbound = DropStream.obj()
|
||||
this.emit('started_talking')
|
||||
return this._outbound
|
||||
}
|
||||
|
||||
// Note: the samplesPerPacket argument is handled in worker.js and not passed on
|
||||
this._outbound = this._client.createVoiceStream(this._settings.samplesPerPacket)
|
||||
|
||||
this.emit('started_talking')
|
||||
}
|
||||
return this._outbound
|
||||
}
|
||||
|
||||
_stopOutbound () {
|
||||
if (this._outbound) {
|
||||
this.emit('stopped_talking')
|
||||
this._outbound.end()
|
||||
this._outbound = null
|
||||
}
|
||||
}
|
||||
|
||||
_final (callback) {
|
||||
this._stopOutbound()
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
export class ContinuousVoiceHandler extends VoiceHandler {
|
||||
constructor (client, settings) {
|
||||
super(client, settings)
|
||||
}
|
||||
|
||||
_write (data, _, callback) {
|
||||
if (this._mute) {
|
||||
callback()
|
||||
} else {
|
||||
this._getOrCreateOutbound().write(data, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class PushToTalkVoiceHandler extends VoiceHandler {
|
||||
var hat = document.getElementById('hat')
|
||||
constructor (client, settings) {
|
||||
super(client, settings)
|
||||
this._key = settings.pttKey
|
||||
this._pushed = false
|
||||
this._keydown_handler = () => this._pushed = true
|
||||
this._keyup_handler = () => {
|
||||
this._stopOutbound()
|
||||
this._pushed = false
|
||||
}
|
||||
keyboardjs.bind(this._key, this._keydown_handler, this._keyup_handler)
|
||||
hat.addEventListener('mouseover', function(event) {
|
||||
this._getOrCreateOutbound()
|
||||
this._pushed = true
|
||||
console.log('start voice')
|
||||
})
|
||||
hat.addEventListener('mouseout', function(event) {
|
||||
this._stopOutbound()
|
||||
this._pushed = false
|
||||
console.log('start voice')
|
||||
})
|
||||
}
|
||||
|
||||
_write (data, _, callback) {
|
||||
if (this._pushed && !this._mute) {
|
||||
this._getOrCreateOutbound().write(data, callback)
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
_final (callback) {
|
||||
super._final(e => {
|
||||
keyboardjs.unbind(this._key, this._keydown_handler, this._keyup_handler)
|
||||
callback(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class VADVoiceHandler extends VoiceHandler {
|
||||
constructor (client, settings) {
|
||||
super(client, settings)
|
||||
let level = settings.vadLevel
|
||||
const self = this
|
||||
this._vad = vad(audioContext(), theUserMedia, {
|
||||
onVoiceStart () {
|
||||
console.log('vad: start')
|
||||
self._active = true
|
||||
},
|
||||
onVoiceStop () {
|
||||
console.log('vad: stop')
|
||||
self._stopOutbound()
|
||||
self._active = false
|
||||
},
|
||||
onUpdate (val) {
|
||||
self._level = val
|
||||
self.emit('level', val)
|
||||
},
|
||||
noiseCaptureDuration: 0,
|
||||
minNoiseLevel: level,
|
||||
maxNoiseLevel: level
|
||||
})
|
||||
// Need to keep a backlog of the last ~150ms (dependent on sample rate)
|
||||
// because VAD will activate with ~125ms delay
|
||||
this._backlog = []
|
||||
this._backlogLength = 0
|
||||
this._backlogLengthMin = 1024 * 6 * 4 // vadBufferLen * (vadDelay + 1) * bytesPerSample
|
||||
}
|
||||
|
||||
_write (data, _, callback) {
|
||||
if (this._active && !this._mute) {
|
||||
if (this._backlog.length > 0) {
|
||||
for (let oldData of this._backlog) {
|
||||
this._getOrCreateOutbound().write(oldData)
|
||||
}
|
||||
this._backlog = []
|
||||
this._backlogLength = 0
|
||||
}
|
||||
this._getOrCreateOutbound().write(data, callback)
|
||||
} else {
|
||||
// Make sure we always keep the backlog filled if we're not (yet) talking
|
||||
this._backlog.push(data)
|
||||
this._backlogLength += data.length
|
||||
// Check if we can discard the oldest element without becoming too short
|
||||
if (this._backlogLength - this._backlog[0].length > this._backlogLengthMin) {
|
||||
this._backlogLength -= this._backlog.shift().length
|
||||
}
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
_final (callback) {
|
||||
super._final(e => {
|
||||
this._vad.destroy()
|
||||
callback(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var theUserMedia = null
|
||||
|
||||
export function initVoice (onData, onUserMediaError) {
|
||||
getUserMedia({ audio: true }, (err, userMedia) => {
|
||||
if (err) {
|
||||
onUserMediaError(err)
|
||||
} else {
|
||||
theUserMedia = userMedia
|
||||
var micStream = new MicrophoneStream(userMedia, { objectMode: true, bufferSize: 1024 })
|
||||
micStream.on('data', data => {
|
||||
onData(Buffer.from(data.getChannelData(0).buffer))
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
Referencia en una nueva incidencia
Block a user