You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_vertical_filmstrip_overrides.scss 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. /**
  2. * Override other styles to support vertical filmstrip mode.
  3. */
  4. .vertical-filmstrip {
  5. /*
  6. * Firefox sets flex items to min-height: auto and min-width: auto,
  7. * preventing flex children from shrinking like they do on other browsers.
  8. * Setting min-height and min-width 0 is a workaround for the issue so
  9. * Firefox behaves like other browsers.
  10. * https://bugzilla.mozilla.org/show_bug.cgi?id=1043520
  11. */
  12. @mixin minHWAutoFix() {
  13. min-height: 0;
  14. min-width: 0;
  15. }
  16. #etherpad,
  17. #sharedvideo {
  18. text-align: left;
  19. }
  20. &.use-new-toolbox {
  21. /**
  22. * Adjust the height of the filmstrip as the toolbar is displayed.
  23. */
  24. .filmstrip {
  25. top: 0;
  26. transition: height .3s ease-in;
  27. &.reduce-height {
  28. height: calc(100% - #{$newToolbarSizeWithPadding});
  29. }
  30. }
  31. }
  32. .filmstrip {
  33. align-items: flex-end;
  34. box-sizing: border-box;
  35. display: flex;
  36. flex-direction: column-reverse;
  37. height: 100%;
  38. /**
  39. * fixed positioning is necessary for remote menus and tooltips to pop
  40. * out of the scrolling filmstrip. AtlasKit dialogs and tooltips use
  41. * a library called popper which will position its elements fixed if
  42. * any parent is also fixed.
  43. */
  44. position: fixed;
  45. z-index: $filmstripVideosZ;
  46. /**
  47. * Hide videos by making them slight to the right.
  48. */
  49. .filmstrip__videos {
  50. right: 0;
  51. &.hidden {
  52. bottom: auto;
  53. right: -196px;
  54. }
  55. /**
  56. * An id selector is used to match id specificity with existing
  57. * filmstrip styles.
  58. */
  59. &#remoteVideos {
  60. /**
  61. * Remove horizontal filmstrip padding used to prevent videos
  62. * from overlapping getting near the left-side of the screen.
  63. * An id selector is used to match id specificity with filmstrip
  64. * styles.
  65. */
  66. padding-left: 0;
  67. transition: right 2s;
  68. }
  69. }
  70. /**
  71. * Re-styles the local Video to better fit vertical filmstrip layout.
  72. */
  73. #filmstripLocalVideo {
  74. align-self: initial;
  75. bottom: 5px;
  76. display: flex;
  77. flex-direction: column-reverse;
  78. height: auto;
  79. justify-content: flex-start;
  80. }
  81. /**
  82. * Remove unnecssary padding that is normally used to prevent horizontal
  83. * filmstrip from overlapping the left edge of the screen.
  84. */
  85. #filmstripLocalVideo,
  86. #filmstripRemoteVideos {
  87. padding: 0;
  88. }
  89. #filmstripRemoteVideos {
  90. @include minHWAutoFix();
  91. display: flex;
  92. flex: 1;
  93. flex-direction: column;
  94. height: auto;
  95. justify-content: flex-end;
  96. #filmstripRemoteVideosContainer {
  97. flex-direction: column-reverse;
  98. /**
  99. * Add padding as a hack for Firefox not to show scrollbars when
  100. * unnecessary.
  101. */
  102. padding: 1px 0;
  103. overflow-x: hidden;
  104. }
  105. }
  106. /**
  107. * Rotate the hide filmstrip icon so it points towards the right edge
  108. * of the screen.
  109. */
  110. &__toolbar {
  111. transform: rotate(-90deg);
  112. }
  113. /**
  114. * Move the remote video menu trigger to the bottom left of the
  115. * video thumbnail.
  116. */
  117. .remotevideomenu,
  118. .remote-video-menu-trigger {
  119. bottom: 0;
  120. left: 0;
  121. top: auto;
  122. right: auto;
  123. }
  124. .remote-video-menu-trigger {
  125. margin-bottom: 7px;
  126. }
  127. #remoteVideos {
  128. @include minHWAutoFix();
  129. flex-direction: column;
  130. flex-grow: 1;
  131. }
  132. .videocontainer {
  133. /**
  134. * Move status icons to the bottom right of the thumbnail.
  135. */
  136. &__toolbar {
  137. text-align: right;
  138. .right {
  139. float: none;
  140. margin: auto;
  141. }
  142. }
  143. }
  144. }
  145. &.filmstrip-only {
  146. .filmstrip {
  147. flex-direction: row-reverse;
  148. }
  149. .filmstrip__videos-filmstripOnly {
  150. height: 100%;
  151. }
  152. }
  153. /**
  154. * These styles are for the video labels that display on the top right. The
  155. * styles adjust the labels' positioning as the filmstrip itself or
  156. * filmstrip's remote videos appear and disappear.
  157. *
  158. * The class with-filmstrip is for when the filmstrip is visible.
  159. * The class without-filmstrip is for when the filmstrip has been toggled to
  160. * be hidden.
  161. * The class opening is for when the filmstrip is transitioning from hidden
  162. * to visible.
  163. */
  164. .video-state-indicator.moveToCorner {
  165. transition: right 0.5s;
  166. &.with-filmstrip {
  167. &#recordingLabel {
  168. right: 200px;
  169. }
  170. &#videoResolutionLabel {
  171. right: 150px;
  172. }
  173. }
  174. &.with-filmstrip.opening {
  175. transition: 0.9s;
  176. transition-timing-function: ease-in-out;
  177. }
  178. &.without-filmstrip {
  179. transition: 1.2s ease-in-out;
  180. transition-delay: 0.1s;
  181. }
  182. }
  183. /**
  184. * Apply hardware acceleration to prevent flickering on scroll. The
  185. * selectors are specific to icon wrappers to prevent fixed position dialogs
  186. * and tooltips from getting a new location context due to translate3d.
  187. */
  188. .connection-indicator,
  189. .remote-video-menu-trigger,
  190. .indicator-icon-container {
  191. transform: translate3d(0, 0, 0);
  192. }
  193. .indicator-container {
  194. float: none;
  195. }
  196. /**
  197. * FIXME: disable pointer to allow any elements moved below to still be
  198. * clickable. The real fix would to make sure those moved elements are
  199. * actually part of the toolbar instead of positioning being faked.
  200. */
  201. .videocontainer__toolbar {
  202. pointer-events: none;
  203. > div {
  204. pointer-events: none;
  205. }
  206. .toolbar-icon {
  207. pointer-events: all;
  208. }
  209. }
  210. }
  211. /**
  212. * Workarounds for Edge, IE11, and Firefox not handling scrolling properly
  213. * with flex-direction: column-reverse. The remove videos in filmstrip should
  214. * start scrolling from the bottom of the filmstrip, but in those browsers the
  215. * scrolling won't happen. Per W3C spec, scrolling should happen from the
  216. * bottom. As such, use css hacks to get around the css issue, with the intent
  217. * being to remove the hacks as the spec is supported.
  218. */
  219. @mixin undoColumnReverseVideos() {
  220. .vertical-filmstrip {
  221. #remoteVideos #filmstripRemoteVideos #filmstripRemoteVideosContainer {
  222. flex-direction: column;
  223. }
  224. }
  225. }
  226. /** Firefox detection hack **/
  227. @-moz-document url-prefix() {
  228. @include undoColumnReverseVideos();
  229. }
  230. /** IE11 detection hack **/
  231. @media screen and (-ms-high-contrast: active),
  232. screen and (-ms-high-contrast: none) {
  233. @include undoColumnReverseVideos();
  234. }
  235. /** Edge detection hack **/
  236. @supports (-ms-ime-align:auto) {
  237. @include undoColumnReverseVideos();
  238. }