-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mirotalkwebrtc] - improve config.js
- Loading branch information
1 parent
75eeb0a
commit 3158f72
Showing
4 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
'use-strict'; | ||
|
||
module.exports = { | ||
App: { | ||
Name: 'MiroTalk test', | ||
Logo: '../Images/logo.png', | ||
}, | ||
Author: { | ||
Email: '[email protected]', | ||
Profile: 'https://www.linkedin.com/in/miroslav-pejic-976a07101/', | ||
|
@@ -9,6 +13,7 @@ module.exports = { | |
MiroTalk: { | ||
P2P: { | ||
Visible: true, | ||
Label: 'MiroTalk P2P', | ||
Home: 'https://p2p.mirotalk.com', | ||
Room: 'https://p2p.mirotalk.com/newcall', | ||
Join: 'https://p2p.mirotalk.com/join/', | ||
|
@@ -22,6 +27,7 @@ module.exports = { | |
SFU: { | ||
Visible: true, | ||
Protected: false, // host_protected or user_auth enabled | ||
Label: 'MiroTalk SFU', | ||
Home: 'https://sfu.mirotalk.com', | ||
Room: 'https://sfu.mirotalk.com/newroom', | ||
Join: 'https://sfu.mirotalk.com/join/', | ||
|
@@ -34,6 +40,7 @@ module.exports = { | |
}, | ||
C2C: { | ||
Visible: true, | ||
Label: 'MiroTalk C2C', | ||
Home: 'https://c2c.mirotalk.com', | ||
Room: 'https://c2c.mirotalk.com/?room=', | ||
GitHub: { | ||
|
@@ -45,6 +52,7 @@ module.exports = { | |
}, | ||
BRO: { | ||
Visible: true, | ||
Label: 'MiroTalk BRO', | ||
Home: 'https://bro.mirotalk.com', | ||
Broadcast: 'https://bro.mirotalk.com/broadcast?id=', | ||
Viewer: 'https://bro.mirotalk.com/viewer?id=', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* @license For private project or commercial purposes contact us at: [email protected] or purchase it directly via Code Canyon: | ||
* @license https://codecanyon.net/item/a-selfhosted-mirotalks-webrtc-rooms-scheduler-server/42643313 | ||
* @author Miroslav Pejic - [email protected] | ||
* @version 1.1.26 | ||
* @version 1.1.27 | ||
*/ | ||
|
||
const isMobile = !!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test( | ||
|
@@ -30,6 +30,17 @@ const navSup = document.getElementById('navSup'); | |
const navAcc = document.getElementById('navAcc'); | ||
const navSet = document.getElementById('navSet'); | ||
|
||
const navLogoImage = document.getElementById('navLogoImage'); | ||
const navLogoLabel = document.getElementById('navLogoLabel'); | ||
|
||
const navP2PLabel = document.getElementById('navP2PLabel'); | ||
const navSFULabel = document.getElementById('navSFULabel'); | ||
const navC2CLabel = document.getElementById('navC2CLabel'); | ||
const navBROLabel = document.getElementById('navBROLabel'); | ||
|
||
const tableAppName = document.getElementById('tableAppName'); | ||
const rowAppName = document.getElementById('rowAppName'); | ||
|
||
const myProfile = document.getElementById('myProfile'); | ||
|
||
const search = document.getElementById('search'); | ||
|
@@ -192,6 +203,8 @@ function loadConfig(cfg) { | |
config = cfg; | ||
html = cfg.HTML ? cfg.HTML : html; | ||
console.log('Config', config); | ||
const appName = config?.App?.Name || 'MiroTalk'; | ||
const appLogo = config?.App?.Logo || '../Images/logo.png'; | ||
myProfile.setAttribute('href', config.Author.Profile); | ||
repoP2P.setAttribute('href', config.MiroTalk.P2P.GitHub.Repo); | ||
starP2P.setAttribute('href', config.MiroTalk.P2P.GitHub.Star); | ||
|
@@ -209,6 +222,14 @@ function loadConfig(cfg) { | |
sfuIframe.setAttribute('src', config.MiroTalk.SFU.Room); | ||
c2cIframe.setAttribute('src', config.MiroTalk.C2C.Home); | ||
broIframe.setAttribute('src', config.MiroTalk.BRO.Home); | ||
navLogoImage.setAttribute('src', appLogo); | ||
navLogoLabel.textContent = appName; | ||
navP2PLabel.textContent = config.MiroTalk.P2P.Label || 'MiroTalk P2P'; | ||
navSFULabel.textContent = config.MiroTalk.SFU.Label || 'MiroTalk SFU'; | ||
navC2CLabel.textContent = config.MiroTalk.C2C.Label || 'MiroTalk C2C'; | ||
navBROLabel.textContent = config.MiroTalk.BRO.Label || 'MiroTalk BRO'; | ||
tableAppName.textContent = appName; | ||
rowAppName.textContent = appName; | ||
} | ||
|
||
function handleTokens(cfg) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters