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.

BottomToolbar.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* global $ */
  2. var PanelToggler = require("../side_pannels/SidePanelToggler");
  3. var buttonHandlers = {
  4. "bottom_toolbar_contact_list": function () {
  5. BottomToolbar.toggleContactList();
  6. },
  7. "bottom_toolbar_film_strip": function () {
  8. BottomToolbar.toggleFilmStrip();
  9. },
  10. "bottom_toolbar_chat": function () {
  11. BottomToolbar.toggleChat();
  12. }
  13. };
  14. var BottomToolbar = (function (my) {
  15. my.init = function () {
  16. for(var k in buttonHandlers)
  17. $("#" + k).click(buttonHandlers[k]);
  18. };
  19. my.toggleChat = function() {
  20. PanelToggler.toggleChat();
  21. };
  22. my.toggleContactList = function() {
  23. PanelToggler.toggleContactList();
  24. };
  25. my.toggleFilmStrip = function() {
  26. var filmstrip = $("#remoteVideos");
  27. filmstrip.toggleClass("hidden");
  28. };
  29. $(document).bind("remotevideo.resized", function (event, width, height) {
  30. var bottom = (height - $('#bottomToolbar').outerHeight())/2 + 18;
  31. $('#bottomToolbar').css({bottom: bottom + 'px'});
  32. });
  33. return my;
  34. }(BottomToolbar || {}));
  35. module.exports = BottomToolbar;