@ -3,38 +3,38 @@
import UIEvents from "../../../service/UI/UIEvents" ;
import UIUtil from "../util/UIUtil" ;
const FilmS trip = {
const Films trip = {
/ * *
*
* @ param eventEmitter the { EventEmitter } through which { FilmS trip } is to
* emit / fire { UIEvents } ( such as { UIEvents . TOGGLED _FILM _ STRIP} ) .
* @ param eventEmitter the { EventEmitter } through which { Films trip } is to
* emit / fire { UIEvents } ( such as { UIEvents . TOGGLED _FILMSTRIP } ) .
* /
init ( eventEmitter ) {
this . iconMenuDownClassName = 'icon-menu-down' ;
this . iconMenuUpClassName = 'icon-menu-up' ;
this . filmS tripContainerClassName = 'filmstrip' ;
this . filmS trip = $ ( '#remoteVideos' ) ;
this . films tripContainerClassName = 'filmstrip' ;
this . films trip = $ ( '#remoteVideos' ) ;
this . eventEmitter = eventEmitter ;
this . _initFilmS tripToolbar ( ) ;
this . _initFilms tripToolbar ( ) ;
this . registerListeners ( ) ;
} ,
/ * *
* Initializes the filmstrip toolbar .
* /
_initFilmS tripToolbar ( ) {
// Do not show the toggle button in film strip only mode.
_initFilms tripToolbar ( ) {
// Do not show the toggle button in filmstrip only mode.
if ( interfaceConfig . filmStripOnly )
return ;
let toolbarContainerHTML = this . _generateToolbarHTML ( ) ;
let className = this . filmS tripContainerClassName ;
let className = this . films tripContainerClassName ;
let container = document . querySelector ( ` . ${ className } ` ) ;
UIUtil . prependChild ( container , toolbarContainerHTML ) ;
let iconSelector = '#toggleFilmS tripButton i' ;
this . toggleFilmS tripIcon = document . querySelector ( iconSelector ) ;
let iconSelector = '#toggleFilms tripButton i' ;
this . toggleFilms tripIcon = document . querySelector ( iconSelector ) ;
} ,
/ * *
@ -44,10 +44,10 @@ const FilmStrip = {
* /
_generateToolbarHTML ( ) {
let container = document . createElement ( 'div' ) ;
let isVisible = this . isFilmS tripVisible ( ) ;
let isVisible = this . isFilms tripVisible ( ) ;
container . className = 'filmstrip__toolbar' ;
container . innerHTML = `
< button id = "toggleFilmS tripButton" >
< button id = "toggleFilms tripButton" >
< i class = "icon-menu-${isVisible ? 'down' : 'up'}" >
< / i >
< / b u t t o n >
@ -64,8 +64,8 @@ const FilmStrip = {
// Firing the event instead of executing toggleFilmstrip method because
// it's important to hide the filmstrip by UI.toggleFilmstrip in order
// to correctly resize the video area.
$ ( '#toggleFilmS tripButton' ) . on ( 'click' ,
( ) => this . eventEmitter . emit ( UIEvents . TOGGLE _FILM _ STRIP) ) ;
$ ( '#toggleFilms tripButton' ) . on ( 'click' ,
( ) => this . eventEmitter . emit ( UIEvents . TOGGLE _FILMSTRIP ) ) ;
this . _registerToggleFilmstripShortcut ( ) ;
} ,
@ -82,7 +82,7 @@ const FilmStrip = {
// Firing the event instead of executing toggleFilmstrip method because
// it's important to hide the filmstrip by UI.toggleFilmstrip in order
// to correctly resize the video area.
let handler = ( ) => this . eventEmitter . emit ( UIEvents . TOGGLE _FILM _ STRIP) ;
let handler = ( ) => this . eventEmitter . emit ( UIEvents . TOGGLE _FILMSTRIP ) ;
APP . keyboardshortcut . registerShortcut (
shortcut ,
@ -96,7 +96,7 @@ const FilmStrip = {
* Changes classes of icon for showing down state
* /
showMenuDownIcon ( ) {
let icon = this . toggleFilmS tripIcon ;
let icon = this . toggleFilms tripIcon ;
if ( icon ) {
icon . classList . add ( this . iconMenuDownClassName ) ;
icon . classList . remove ( this . iconMenuUpClassName ) ;
@ -107,7 +107,7 @@ const FilmStrip = {
* Changes classes of icon for showing up state
* /
showMenuUpIcon ( ) {
let icon = this . toggleFilmS tripIcon ;
let icon = this . toggleFilms tripIcon ;
if ( icon ) {
icon . classList . add ( this . iconMenuUpClassName ) ;
icon . classList . remove ( this . iconMenuDownClassName ) ;
@ -115,10 +115,10 @@ const FilmStrip = {
} ,
/ * *
* Toggles the visibility of the film strip .
* Toggles the visibility of the filmstrip .
*
* @ param visible optional { Boolean } which specifies the desired visibility
* of the film strip . If not specified , the visibility will be flipped
* of the filmstrip . If not specified , the visibility will be flipped
* ( i . e . toggled ) ; otherwise , the visibility will be set to the specified
* value .
* @ param { Boolean } sendAnalytics - True to send an analytics event . The
@ -129,17 +129,17 @@ const FilmStrip = {
* It ' s important to hide the filmstrip with UI . toggleFilmstrip in order
* to correctly resize the video area .
* /
toggleFilmS trip ( visible , sendAnalytics = true ) {
toggleFilms trip ( visible , sendAnalytics = true ) {
const isVisibleDefined = typeof visible === 'boolean' ;
if ( ! isVisibleDefined ) {
visible = this . isFilmS tripVisible ( ) ;
} else if ( this . isFilmS tripVisible ( ) === visible ) {
visible = this . isFilms tripVisible ( ) ;
} else if ( this . isFilms tripVisible ( ) === visible ) {
return ;
}
if ( sendAnalytics ) {
JitsiMeetJS . analytics . sendEvent ( 'toolbar.filmstrip.toggled' ) ;
}
this . filmS trip . toggleClass ( "hidden" ) ;
this . films trip . toggleClass ( "hidden" ) ;
if ( visible ) {
this . showMenuUpIcon ( ) ;
@ -147,12 +147,12 @@ const FilmStrip = {
this . showMenuDownIcon ( ) ;
}
// Emit/fire UIEvents.TOGGLED_FILM_ STRIP.
// Emit/fire UIEvents.TOGGLED_FILMSTRIP.
const eventEmitter = this . eventEmitter ;
if ( eventEmitter ) {
eventEmitter . emit (
UIEvents . TOGGLED _FILM _ STRIP,
this . isFilmS tripVisible ( ) ) ;
UIEvents . TOGGLED _FILMSTRIP ,
this . isFilms tripVisible ( ) ) ;
}
} ,
@ -160,24 +160,24 @@ const FilmStrip = {
* Shows if filmstrip is visible
* @ returns { boolean }
* /
isFilmS tripVisible ( ) {
return ! this . filmS trip . hasClass ( 'hidden' ) ;
isFilms tripVisible ( ) {
return ! this . films trip . hasClass ( 'hidden' ) ;
} ,
/ * *
* Adjusts styles for film - strip only mode .
* Adjusts styles for filmstrip - only mode .
* /
setFilmS tripOnly ( ) {
this . filmS trip . addClass ( 'filmstrip__videos-filmstripOnly' ) ;
setFilms tripOnly ( ) {
this . films trip . addClass ( 'filmstrip__videos-filmstripOnly' ) ;
} ,
/ * *
* Returns the height of filmstrip
* @ returns { number } height
* /
getFilmS tripHeight ( ) {
if ( this . isFilmS tripVisible ( ) ) {
return $ ( ` . ${ this . filmS tripContainerClassName } ` ) . outerHeight ( ) ;
getFilms tripHeight ( ) {
if ( this . isFilms tripVisible ( ) ) {
return $ ( ` . ${ this . films tripContainerClassName } ` ) . outerHeight ( ) ;
} else {
return 0 ;
}
@ -187,10 +187,10 @@ const FilmStrip = {
* Returns the width of filmstip
* @ returns { number } width
* /
getFilmS tripWidth ( ) {
return this . filmS trip . innerWidth ( )
- parseInt ( this . filmS trip . css ( 'paddingLeft' ) , 10 )
- parseInt ( this . filmS trip . css ( 'paddingRight' ) , 10 ) ;
getFilms tripWidth ( ) {
return this . films trip . innerWidth ( )
- parseInt ( this . films trip . css ( 'paddingLeft' ) , 10 )
- parseInt ( this . films trip . css ( 'paddingRight' ) , 10 ) ;
} ,
/ * *
@ -220,17 +220,17 @@ const FilmStrip = {
/ * *
* If the videoAreaAvailableWidth is set we use this one to calculate
* the filmS trip width , because we ' re probably in a state where the
* film strip size hasn ' t been updated yet , but it will be .
* the films trip width , because we ' re probably in a state where the
* filmstrip size hasn ' t been updated yet , but it will be .
* /
let videoAreaAvailableWidth
= UIUtil . getAvailableVideoWidth ( )
- this . _getFilmstripExtraPanelsWidth ( )
- UIUtil . parseCssInt ( this . filmS trip . css ( 'right' ) , 10 )
- UIUtil . parseCssInt ( this . filmS trip . css ( 'paddingLeft' ) , 10 )
- UIUtil . parseCssInt ( this . filmS trip . css ( 'paddingRight' ) , 10 )
- UIUtil . parseCssInt ( this . filmS trip . css ( 'borderLeftWidth' ) , 10 )
- UIUtil . parseCssInt ( this . filmS trip . css ( 'borderRightWidth' ) , 10 )
- UIUtil . parseCssInt ( this . films trip . css ( 'right' ) , 10 )
- UIUtil . parseCssInt ( this . films trip . css ( 'paddingLeft' ) , 10 )
- UIUtil . parseCssInt ( this . films trip . css ( 'paddingRight' ) , 10 )
- UIUtil . parseCssInt ( this . films trip . css ( 'borderLeftWidth' ) , 10 )
- UIUtil . parseCssInt ( this . films trip . css ( 'borderRightWidth' ) , 10 )
- 5 ;
let availableWidth = videoAreaAvailableWidth ;
@ -297,7 +297,7 @@ const FilmStrip = {
* @ private
* /
_getFilmstripExtraPanelsWidth ( ) {
let className = this . filmS tripContainerClassName ;
let className = this . films tripContainerClassName ;
let width = 0 ;
$ ( ` . ${ className } ` )
. children ( )
@ -405,7 +405,7 @@ const FilmStrip = {
} ) ) ;
}
promises . push ( new Promise ( ( resolve ) => {
this . filmS trip . animate ( {
this . films trip . animate ( {
// adds 2 px because of small video 1px border
height : remote . thumbHeight + 2
} , this . _getAnimateOptions ( animate , resolve ) ) ;
@ -415,7 +415,7 @@ const FilmStrip = {
let { localThumb } = this . getThumbs ( ) ;
let height = localThumb . height ( ) ;
let fontSize = UIUtil . getIndicatorFontSize ( height ) ;
this . filmS trip . find ( '.indicator' ) . animate ( {
this . films trip . find ( '.indicator' ) . animate ( {
fontSize
} , this . _getAnimateOptions ( animate , resolve ) ) ;
} ) ) ;
@ -455,7 +455,7 @@ const FilmStrip = {
}
let localThumb = $ ( "#localVideoContainer" ) ;
let remoteThumbs = this . filmS trip . children ( selector )
let remoteThumbs = this . films trip . children ( selector )
. not ( "#localVideoContainer" ) ;
// Exclude the local video container if it has been hidden.
@ -467,4 +467,4 @@ const FilmStrip = {
}
} ;
export default FilmS trip ;
export default Films trip ;