Changeset View
Changeset View
Standalone View
Standalone View
src/resources/js/meet/app.js
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | function Meet(container) | ||||
* token - OpenVidu token for the main connection, | * token - OpenVidu token for the main connection, | ||||
* shareToken - OpenVidu token for screen-sharing connection, | * shareToken - OpenVidu token for screen-sharing connection, | ||||
* nickname - Participant name, | * nickname - Participant name, | ||||
* role - connection (participant) role(s), | * role - connection (participant) role(s), | ||||
* connections - Optional metadata for other users connections (current state), | * connections - Optional metadata for other users connections (current state), | ||||
* channel - Selected interpreted language channel (two-letter language code) | * channel - Selected interpreted language channel (two-letter language code) | ||||
* languages - Supported languages (code-to-label map) | * languages - Supported languages (code-to-label map) | ||||
* chatElement - DOM element for the chat widget, | * chatElement - DOM element for the chat widget, | ||||
* counterElement - DOM element for the participants counter, | |||||
* menuElement - DOM element of the room toolbar, | * menuElement - DOM element of the room toolbar, | ||||
* queueElement - DOM element for the Q&A queue (users with a raised hand) | * queueElement - DOM element for the Q&A queue (users with a raised hand) | ||||
* onSuccess - Callback for session connection (join) success | * onSuccess - Callback for session connection (join) success | ||||
* onError - Callback for session connection (join) error | * onError - Callback for session connection (join) error | ||||
* onDestroy - Callback for session disconnection event, | * onDestroy - Callback for session disconnection event, | ||||
* onDismiss - Callback for Dismiss action, | * onDismiss - Callback for Dismiss action, | ||||
* onJoinRequest - Callback for join request, | * onJoinRequest - Callback for join request, | ||||
* onConnectionChange - Callback for participant changes, e.g. role update, | * onConnectionChange - Callback for participant changes, e.g. role update, | ||||
▲ Show 20 Lines • Show All 1,275 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Update the room "matrix" layout | * Update the room "matrix" layout | ||||
*/ | */ | ||||
function updateLayout() { | function updateLayout() { | ||||
let publishers = $(publishersContainer).find('.meet-video') | let publishers = $(publishersContainer).find('.meet-video') | ||||
let numOfVideos = publishers.length | let numOfVideos = publishers.length | ||||
if (sessionData && sessionData.counterElement) { | |||||
sessionData.counterElement.innerHTML = Object.keys(connections).length + 1 | |||||
} | |||||
if (!numOfVideos) { | if (!numOfVideos) { | ||||
return | return | ||||
} | } | ||||
let css, rows, cols, height, padding = 0 | let css, rows, cols, height, padding = 0 | ||||
// Make the first screen sharing tile big | // Make the first screen sharing tile big | ||||
let screenVideo = publishers.filter('.screen').find('video').get(0) | let screenVideo = publishers.filter('.screen').find('video').get(0) | ||||
▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines |