diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000..05b4d615d427f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +indent_style = tab +indent_size = 8 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/client/views/app/layout.coffee b/client/views/app/layout.coffee index 0dd5380bda5b5..ae2e5de30e264 100644 --- a/client/views/app/layout.coffee +++ b/client/views/app/layout.coffee @@ -5,16 +5,16 @@ Template.appLayout.helpers flexOpenedRTC1: -> console.log 'layout.helpers flexOpenedRTC1' if window.rocketDebug - return 'layout1' if Session.equals('flexOpenedRTC1', true) + return 'layout1' if Session.equals('rtcLayoutmode', 1) flexOpenedRTC2: -> console.log 'layout.helpers flexOpenedRTC2' if window.rocketDebug - return 'layout2' if Session.equals('flexOpenedRTC2', true) + return 'layout2' if (Session.get('rtcLayoutmode') > 1) Template.appLayout.rendered = -> $('html').addClass("noscroll").removeClass "scroll" - + # RTL Support - Need config option on the UI if isRtl localStorage.getItem "userLanguage" $('html').addClass "rtl" diff --git a/client/views/app/room.coffee b/client/views/app/room.coffee index 5571362b9e8fb..fa8342bbc4046 100644 --- a/client/views/app/room.coffee +++ b/client/views/app/room.coffee @@ -272,10 +272,16 @@ Template.room.helpers return Session.get('selfVideoUrl') rtcLayout1: -> - return Session.get('flexOpenedRTC1'); + return (Session.get('rtcLayoutmode') == 1 ? true: false); rtcLayout2: -> - return Session.get('flexOpenedRTC2'); + return (Session.get('rtcLayoutmode') == 2 ? true: false); + + rtcLayout3: -> + return (Session.get('rtcLayoutmode') == 3 ? true: false); + + noRtcLayout: -> + return (!Session.get('rtcLayoutmode') || (Session.get('rtcLayoutmode') == 0) ? true: false); Template.room.events @@ -379,19 +385,33 @@ Template.room.events Session.set('showUserInfo', $(e.currentTarget).data('username')) "click .flex-tab .video-remote" : (e) -> - console.log 'room click .flex-tab .avatar-image' if window.rocketDebug - if (Session.get('flexOpenedRTC2')) - console.log 'resetting both flexOpenedRTC1 and flexOpenedRTC2 to false' if window.rocketDebug - Session.set('flexOpenedRTC1', false) - Session.set('flexOpenedRTC2', false) - else - if (Session.get('flexOpenedRTC1')) - console.log 'flexOpenedRTC2 set to true' if window.rocketDebug - Session.set('flexOpenedRTC2', true) + console.log 'room click .flex-tab .video-remote' if window.rocketDebug + if (Session.get('flexOpened')) + if (!Session.get('rtcLayoutmode')) + Session.set('rtcLayoutmode', 1) + else + t = Session.get('rtcLayoutmode') + t = (t + 1) % 4 + console.log 'setting rtcLayoutmode to ' + t if window.rocketDebug + Session.set('rtcLayoutmode', t) + + "click .flex-tab .video-self" : (e) -> + console.log 'room click .flex-tab .video-self' if window.rocketDebug + if (Session.get('rtcLayoutmode') == 3) + console.log 'video-self clicked in layout3' if window.rocketDebug + i = document.getElementById("fullscreendiv") + if i.requestFullscreen + i.requestFullscreen() else - if (Session.get('flexOpened')) - console.log 'flexOpenedRTC1 set to true' if window.rocketDebug - Session.set('flexOpenedRTC1', true) + if i.webkitRequestFullscreen + i.webkitRequestFullscreen() + else + if i.mozRequestFullScreen + i.mozRequestFullScreen() + else + if i.msRequestFullscreen + i.msRequestFullscreen() + 'click .user-card-message': (e) -> diff --git a/client/views/app/room.html b/client/views/app/room.html index 3a4d98d900535..8f264848c49a4 100644 --- a/client/views/app/room.html +++ b/client/views/app/room.html @@ -162,28 +162,34 @@

{{username}}

{{#with userData}}
- + {{#if selfVideoUrl}} + {{#if rtcLayout3}} +
+ + +
+ {{/if}} {{#if rtcLayout2}} -
- - +
+ +
- {{else}} - {{#if rtcLayout1}} -
+ {{/if}} + {{#if rtcLayout1}} +
-
- {{else}} -
- +
+ {{/if}} + {{#if noRtcLayout}} +
+ -
- {{/if}} +
{{/if}} {{/if}} - +
{{> avatar username=username}}