From 90b00c7789db918071715b7a4f370c3deb53e24f Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Wed, 9 Apr 2014 14:51:12 +0200 Subject: [PATCH 01/44] Activated and built Japanese language. --- src/i18n/messages-ja.po | 88 ++++++++++++++--------------- static/translation/messages-ja.json | 1 + 2 files changed, 45 insertions(+), 44 deletions(-) create mode 100644 static/translation/messages-ja.json diff --git a/src/i18n/messages-ja.po b/src/i18n/messages-ja.po index c9b595dc..affb5ad4 100644 --- a/src/i18n/messages-ja.po +++ b/src/i18n/messages-ja.po @@ -1,4 +1,4 @@ -# Translations template for Spreed Speak Freely. +# Japanese translations for Spreed Speak Freely. # Copyright (C) 2014 struktur AG # This file is distributed under the same license as the Spreed Speak Freely # project. @@ -8,18 +8,15 @@ msgid "" msgstr "" "Project-Id-Version: Spreed Speak Freely 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-03-20 18:31+0100\n" +"POT-Creation-Date: 2014-04-08 21:20+0200\n" "PO-Revision-Date: 2014-04-09 14:43+0100\n" "Last-Translator: Curt Frisemo \n" "Language-Team: Curt Frisemo \n" +"Plural-Forms: nplurals=1; plural=0\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" -"X-Generator: Poedit 1.6.4\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"Language: ja\n" -"X-Poedit-Bookmarks: -1,107,-1,-1,-1,-1,-1,-1,-1,-1\n" msgid "Share your screen" msgstr "画面を共有する." @@ -114,6 +111,13 @@ msgstr "ルームを出る" msgid "Current room" msgstr "現在のルーム" +#, fuzzy +msgid "Screen sharing options" +msgstr "メディアスクリーン共有" + +msgid "Fit screen." +msgstr "" + msgid "Your picture" msgstr "あなたの写真" @@ -141,30 +145,18 @@ msgstr "カメラ" msgid "Video quality" msgstr "ビデオ画質" -# If this is about the video quality, -# it should be "低画質" instead of "低い". -# "低い" is just a general translation of "Low" msgid "Low" msgstr "低い" -# If this is about the video quality, -# it should be "高画質" instead of "高い". -# "高い" is just a general translation of "High" msgid "High" msgstr "高い" -msgid "720p" -msgstr "720p" - -msgid "1080p" -msgstr "1080p" +msgid "HD" +msgstr "" msgid "Language" msgstr "言語" -msgid "Use browser language" -msgstr "ブラウザの言語を使用" - msgid "Language changes become active on reload." msgstr "言語の変更は再読み込み時に適用となります." @@ -198,12 +190,6 @@ msgstr "ビデオ最高フレームレート" msgid "auto" msgstr "自動" -msgid "Media screen sharing" -msgstr "メディアスクリーン共有" - -msgid "Chrome usermedia screen capture feature is required." -msgstr "Chromeのユーザーメディア・画面キャプチャ機能が必要です." - msgid "Experimental settings" msgstr "試験的に設定" @@ -246,13 +232,9 @@ msgstr "発信中" msgid "Hangup" msgstr "切断" -# In Japanese, the person's name comes in the first place in the sentence. -# '{0}と会話中' msgid "In call with" msgstr "と会話中" -# In Japanese, the person's name comes in the first place in the sentence. -# '{0}と会議中' msgid "Conference with" msgstr "と会議中" @@ -271,8 +253,6 @@ msgstr "エラーが発生しました" msgid "Incoming call" msgstr "着信中" -# In Japanese, the person's name comes in the first place in the sentence. -# '{0}から' msgid "from" msgstr "から" @@ -298,8 +278,8 @@ msgid "Camera / microphone access required." msgstr "カメラ・マイクの接続が必要です." msgid "" -"Please check your browser settings and allow camera and microphone access " -"for this site." +"Please check your browser settings and allow camera and microphone access" +" for this site." msgstr "ブラウザ設定で、このサイトへのカメラ・マイクの接続を許可してください." msgid "Skip check" @@ -312,8 +292,8 @@ msgid "Please set your user details and settings." msgstr "あなたのユーザー情報とセッティングを設定してください." msgid "" -"Please note that some settings require you to reload or to make a new call " -"to become effective." +"Please note that some settings require you to reload or to make a new " +"call to become effective." msgstr "いくつかの設定は、再読み込みもしくは次回の発信から有効です." msgid "Create your room" @@ -397,13 +377,9 @@ msgstr "から電話がありました." msgid "Your browser does not support WebRTC. No calls possible." msgstr "ブラウザがWebRTCをサポートしていない為通話はできません." -# The person's name comes first. -# {0}とチャット msgid "Chat with" msgstr "とチャットする" -# Name of the sender comes first. -# {0}からのメッセージ msgid "Message from " msgstr "からのメッセージ" @@ -414,6 +390,16 @@ msgstr "あなたは%sのルームにいます..." msgid "Your browser does not support file transfer." msgstr "ブラウザがファイル転送をサポートしていません." +msgid "" +"Permission to start screen sharing was denied. Make sure to have enabled " +"screen sharing access for your browser. Copy chrome://flags/#enable-" +"usermedia-screen-capture and open it with your browser and enable the " +"flag on top. Then restart the browser and you are ready to go." +msgstr "" + +msgid "Use browser language" +msgstr "ブラウザの言語を使用" + msgid "Meet with me here:" msgstr "ここで私と会う:" @@ -445,7 +431,21 @@ msgid "Please provide a valid access code." msgstr "有効なアクセスコードを入力してください." msgid "" -"Failed to verify access code. Check your Internet connection and try again." +"Failed to verify access code. Check your Internet connection and try " +"again." +msgstr "アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてください." + +msgid "and %2$s" +msgid_plural "and %1$d others" +msgstr[0] "" + +msgid "User" +msgstr "" + +msgid "Someone" msgstr "" -"アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてく" -"ださい." + +#, fuzzy +msgid "Me" +msgstr "名前" + diff --git a/static/translation/messages-ja.json b/static/translation/messages-ja.json new file mode 100644 index 00000000..2add0192 --- /dev/null +++ b/static/translation/messages-ja.json @@ -0,0 +1 @@ +{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0"},"Share your screen":[null,"画面を共有する."],"Chat":[null,"チャット"],"Mute microphone":[null,"消音"],"Turn camera off":[null,"カメラをオフにする"],"Settings":[null,"設定"],"Your audio level":[null,"あなたの音量"],"Start chat":[null,"チャットを始める"],"Start video call":[null,"テレビ電話を始める"],"Start audio conference":[null,"音声会議を始める"],"No other users online":[null,"オンラインのユーザーはいません"],"Chat sessions":[null,"チャットのセッション"],"Room chat":[null,"ルームチャット"],"Peer to peer":[null,"ピア・ツー・ピア"],"Close chat":[null,"チャットを終える"],"is typing...":[null,"は入力中です..."],"has stopped typing...":[null,"は入力を止めました..."],"Type here to chat...":[null,"ここに入力してチャット開始します..."],"Send":[null,"送信"],"File sharing":[null,"ファイル共有"],"File is no longer available":[null,"ファイルは有効ではありません"],"Download":[null,"ダウンロード"],"Open":[null,"開く"],"Cancel":[null,"キャンセル"],"Unshare":[null,"共有取り消し"],"Retry":[null,"リトライ"],"Download failed.":[null,"ダウンロード失敗."],"Change room":[null,"ルームチェンジ"],"Room":[null,"ルーム"],"Main":[null,"メイン"],"Leave room":[null,"ルームを出る"],"Current room":[null,"現在のルーム"],"Fit screen.":[null,""],"Your picture":[null,"あなたの写真"],"Take picture":[null,"写真を取る"],"Waiting for camera":[null,"カメラ待ち"],"Your name":[null,"あなたの名前"],"Name":[null,"名前"],"Your picture and name are visible to others.":[null,"あなたの写真と名前は公開されています."],"Microphone":[null,"マイク"],"Camera":[null,"カメラ"],"Video quality":[null,"ビデオ画質"],"Low":[null,"低い"],"High":[null,"高い"],"HD":[null,""],"Language":[null,"言語"],"Language changes become active on reload.":[null,"言語の変更は再読み込み時に適用となります."],"Default room":[null,"デフォルト・ルーム"],"Set alternative room to join at start.":[null,"スタート時に別のルームに参加する."],"Desktop notification":[null,"デスクトップ通知"],"Enable":[null,"有効にする"],"Denied - check your browser settings":[null,"拒否 - ブラウザ設定を確認して下さい"],"Allowed":[null,"許可"],"Advanced settings":[null,"詳細設定"],"Stereo audio":[null,"ステレオ・オーディオ"],"Max video frame rate":[null,"ビデオ最高フレームレート"],"auto":[null,"自動"],"Experimental settings":[null,"試験的に設定"],"Show advanced settings":[null,"詳細設定を表示"],"Hide advanced settings":[null,"詳細設定を隠す"],"Remember settings":[null,"設定を保存"],"Apply":[null,"適用"],"Share by Email":[null,"Eメールでシェア"],"Share on Facebook":[null,"フェイスブックでシェア"],"Share on Twitter":[null,"ツィッターでシェア"],"Share on Google Plus":[null,"Google+でシェア"],"Share on XING":[null,"XINGでシェア"],"Initializing":[null,"初期化中"],"Online":[null,"オンライン"],"Calling":[null,"発信中"],"Hangup":[null,"切断"],"In call with":[null,"と会話中"],"Conference with":[null,"と会議中"],"Your are offline":[null,"オフラインです"],"Go online":[null,"オンラインにする"],"Connection interrupted":[null,"接続は中断されました"],"An error occured":[null,"エラーが発生しました"],"Incoming call":[null,"着信中"],"from":[null,"から"],"Accept call":[null,"通話"],"Reject":[null,"拒否"],"Waiting for camera/microphone access":[null,"カメラ・マイクの接続待ち."],"Please wait":[null,"お待ちください"],"Checking camera and microphone access.":[null,"カメラ・マイクの接続確認中."],"Please allow access to your camera and microphone.":[null,"カメラとマイクの接続を許可してください."],"Camera / microphone access required.":[null,"カメラ・マイクの接続が必要です."],"Please check your browser settings and allow camera and microphone access for this site.":[null,"ブラウザ設定で、このサイトへのカメラ・マイクの接続を許可してください."],"Skip check":[null,"チェックをスキップ"],"Click here for help (Google Chrome).":[null,"ここをクリックしてヘルプ表示(Google Chrome)"],"Please set your user details and settings.":[null,"あなたのユーザー情報とセッティングを設定してください."],"Please note that some settings require you to reload or to make a new call to become effective.":[null,"いくつかの設定は、再読み込みもしくは次回の発信から有効です."],"Create your room":[null,"自分のルームを作成する"],"This is your room link:":[null,"あなたのルームへのリンク:"],"Creating room link ...":[null,"ルームへのリンクを作る..."],"Start":[null,"開始"],"Just click start":[null,"クリックして開始"],"Share this URL with the people you want to meet.":[null,"会いたい人とURLをシェアする."],"You can use and re-use this room as many times as you want.":[null,"ルームは何回でも好きなだけ使えます."],"Peer to peer chat active.":[null,"ピア・ツー・ピア・チャットがアクティブです."],"Peer to peer chat is now off.":[null,"ピア・ツー・ピア・チャットがオフです."]," is now offline.":[null,"は今オフラインです"]," is now online.":[null,"は今オンラインです"],"You share file:":[null,"あなたの共有ファイル:"],"Incoming file:":[null,"受信中ファイル:"],"Quit from Spreed Speak Freely?":[null,"Spreed Speak Freelyを終了しますか?"],"Restart required to apply updates. Click ok to restart now.":[null,"アップデート適用のため再起動してください.ここをクリックして再起動する."],"Failed to access camera/microphone.":[null,"カメラ・マイクへの接続に失敗しました."],"Failed to establish peer connection.":[null,"ピアとの接続に失敗しました."],"We are sorry but something went wrong. Boo boo.":[null,"申し訳ないのですが、不具合が生じました。"],"Oops":[null,"しまった"],"Peer connection failed. Check your settings.":[null,"ピア接続に失敗しました.設定を確認してください."],"User hung up because of error.":[null,"エラーのため切断しました."]," is busy. Try again later.":[null,"は話中です.後で掛けなおしてください."]," rejected your call.":[null,"着信拒否されました."]," does not pick up.":[null,"は電話にでません."]," tried to call you.":[null,""]," called you.":[null,"から電話がありました."],"Your browser does not support WebRTC. No calls possible.":[null,"ブラウザがWebRTCをサポートしていない為通話はできません."],"Chat with":[null,"とチャットする"],"Message from ":[null,"からのメッセージ"],"You are now in room %s ...":[null,"あなたは%sのルームにいます..."],"Your browser does not support file transfer.":[null,"ブラウザがファイル転送をサポートしていません."],"Permission to start screen sharing was denied. Make sure to have enabled screen sharing access for your browser. Copy chrome://flags/#enable-usermedia-screen-capture and open it with your browser and enable the flag on top. Then restart the browser and you are ready to go.":[null,""],"Use browser language":[null,"ブラウザの言語を使用"],"Meet with me here:":[null,"ここで私と会う:"],"Error":[null,"エラー"],"Hint":[null,"ヒント"],"Please confirm":[null,"確認して下さい"],"More information required":[null,"さらなる情報が必要です"],"Ok":[null,"OK"],"Close":[null,"閉じる"],"Access code required":[null,"アクセスコードが必要です"],"Access denied":[null,"アクセスが拒否されました"],"Please provide a valid access code.":[null,"有効なアクセスコードを入力してください."],"Failed to verify access code. Check your Internet connection and try again.":[null,"アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてください."],"and %2$s":["and %1$d others",""],"User":[null,""],"Someone":[null,""]}}} \ No newline at end of file From 561fff7ac9f685037f52a1edc3b79e3ed9b67c52 Mon Sep 17 00:00:00 2001 From: Lance Cooper Date: Thu, 17 Apr 2014 14:42:27 -0500 Subject: [PATCH 02/44] Allow Makefile variables CONFIG_FILE and CONFIG_PATH to be set externally. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fa033dee..7054fe64 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ PKG := app/spreed-speakfreely-server EXENAME := spreed-speakfreely-server -CONFIG_FILE := spreed-speakfreely-server.conf -CONFIG_PATH := /etc +CONFIG_FILE ?= spreed-speakfreely-server.conf +CONFIG_PATH ?= /etc VENDOR = "$(CURDIR)/vendor" GOPATH = "$(VENDOR):$(CURDIR)" From 052f768aea7fa44b431856058f1b03e2b9f71562 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 15:10:10 +0200 Subject: [PATCH 03/44] Removed debug. --- static/js/controllers/roomchangecontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/controllers/roomchangecontroller.js b/static/js/controllers/roomchangecontroller.js index 03c4c144..21f6bd70 100644 --- a/static/js/controllers/roomchangecontroller.js +++ b/static/js/controllers/roomchangecontroller.js @@ -23,7 +23,7 @@ define([], function() { // RoomchangeController return ["$scope", "$element", "$window", "$location", "mediaStream", "$http", "$timeout", function($scope, $element, $window, $location, mediaStream, $http, $timeout) { - console.log("Room change controller", $element, $scope.roomdata); + //console.log("Room change controller", $element, $scope.roomdata); var url = mediaStream.url.api("rooms"); From ce186c9168c99f5a2aa209b1618f5b59c55247b2 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 15:45:33 +0200 Subject: [PATCH 04/44] Make sure to handle iceConnectionState completed in addition to connected fixing conference connection issues when all ice candidates work. --- static/js/mediastream/peerconference.js | 4 ++++ static/js/mediastream/webrtc.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/static/js/mediastream/peerconference.js b/static/js/mediastream/peerconference.js index 5bcc1478..4338ce55 100644 --- a/static/js/mediastream/peerconference.js +++ b/static/js/mediastream/peerconference.js @@ -183,12 +183,16 @@ define(['underscore', 'mediastream/peercall'], function(_, PeerCall) { console.log("Conference peer connection state changed", iceConnectionState, currentcall); switch (iceConnectionState) { + case "completed": case "connected": if (!this.callsIn.hasOwnProperty(currentcall.id)) { this.callsIn[currentcall.id] = true; this.pushUpdate(); } break; + case "failed": + console.warn("Conference peer connection state failed", currentcall); + break; } this.webrtc.onConnectionStateChange(iceConnectionState, currentcall); diff --git a/static/js/mediastream/webrtc.js b/static/js/mediastream/webrtc.js index ad61f64f..b930bbba 100644 --- a/static/js/mediastream/webrtc.js +++ b/static/js/mediastream/webrtc.js @@ -443,6 +443,7 @@ define([ xfer.e.on("connectionStateChange", _.bind(function(event, iceConnectionState, currentxfer) { console.log("Xfer state changed", iceConnectionState); switch (iceConnectionState) { + case "completed": case "connected": // Do nothing here, we wait for dataReady. break @@ -516,6 +517,7 @@ define([ peerscreenshare.e.on("connectionStateChange", _.bind(function(event, iceConnectionState, currentscreenshare) { console.log("Screen share state changed", iceConnectionState); switch (iceConnectionState) { + case "completed": case "connected": opts.connected(currentscreenshare); break From 7438f108a660b486589f3f502dd2cea42be808d2 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 15:46:40 +0200 Subject: [PATCH 05/44] Make sure to align videos to the top. --- src/styles/components/_webrtc.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/components/_webrtc.scss b/src/styles/components/_webrtc.scss index 9ba87755..9cb9d56d 100644 --- a/src/styles/components/_webrtc.scss +++ b/src/styles/components/_webrtc.scss @@ -113,7 +113,7 @@ max-width:100%; .remoteVideo { display: inline-block; width:100%; -height:100%; +max-height:100%; vertical-align:bottom; position:relative; visibility:hidden; From ef51f2367b343535e4daef42727e6e99587d528d Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 15:50:27 +0200 Subject: [PATCH 06/44] Do not overlap bar buttons. --- src/styles/components/_bar.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/components/_bar.scss b/src/styles/components/_bar.scss index dd6fd023..10b17f08 100644 --- a/src/styles/components/_bar.scss +++ b/src/styles/components/_bar.scss @@ -90,7 +90,7 @@ font-size:24px; padding:0px; line-height:40px; text-align:center; -margin-left:-8px; +margin-left:-4px; } #bar > .right .btn:focus { border: none; From a5ae2e33bb4402752b44b75b42a476c28323d3c3 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 17:29:07 +0200 Subject: [PATCH 07/44] Make sure to use onepeople renderer when main view is active. --- .../js/controllers/mediastreamcontroller.js | 4 +-- static/js/directives/audiovideo.js | 30 +++++++++++++++++-- static/js/services/videolayout.js | 3 ++ 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/static/js/controllers/mediastreamcontroller.js b/static/js/controllers/mediastreamcontroller.js index 97e25b91..b97e5193 100644 --- a/static/js/controllers/mediastreamcontroller.js +++ b/static/js/controllers/mediastreamcontroller.js @@ -589,7 +589,7 @@ define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigS changed = true; } if (changed) { - $scope.$broadcast("mainresize"); + $scope.$broadcast("mainresize", layout.main); } }); @@ -618,7 +618,7 @@ define(['underscore', 'bigscreen', 'moment', 'webrtc.adapter'], function(_, BigS $element.addClass(makeName("main", layout.main)); } } - $scope.$broadcast("mainresize"); + $scope.$broadcast("mainresize", layout.main); }}() ), true); diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index 0a2c6855..6f85f496 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -241,6 +241,17 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ //scope.rendererName = "conferencekiosk"; scope.rendererName = "onepeople"; + scope.renderersAvailable = videoLayout.layouts(); + + var rendererName = null; + var getRendererName = function() { + // Return name of current renderer. + if (rendererName !== null) { + return rendererName; + } else { + return scope.rendererName; + } + }; var needsResize = false; scope.resize = function() { @@ -252,15 +263,28 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ width: scope.layoutparent.width(), height: scope.layoutparent.height() } - videoLayout.update(scope.rendererName, size, scope, controller); + videoLayout.update(getRendererName(), size, scope, controller); }; + // Make sure we draw on resize. $($window).on("resize", scope.resize); - scope.$on("mainresize", function() { + scope.$on("mainresize", function(event, main) { + if (main) { + // Force onepeople renderer when we have a main view. + rendererName = "onepeople" + } else if (rendererName) { + rendererName = null; + } _.defer(scope.resize); }); scope.resize(); + // Make sure we draw when the renderer was changed. + scope.$watch("rendererName", function() { + _.defer(scope.resize); + }); + + // Update function run in rendering thread. var update = function() { if (needsResize) { needsResize =false; @@ -268,7 +292,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ } requestAnimationFrame(update); } - update(); + _.defer(update); } diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index 07ddd3fd..17449c57 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -261,6 +261,9 @@ define(["jquery", "underscore"], function($, _) { }, register: function(name, impl) { renderers[name] = impl; + }, + layouts: function() { + return _.keys(renderers); } } From 6c4df6eb9226edb83bfcb854e2c6f4d1c3f55bcf Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 17:59:25 +0200 Subject: [PATCH 08/44] Added target to make binary and force compile for already compiled vendor libs. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7054fe64..383f4e23 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,9 @@ binary: binaryrace: GOPATH=$(GOPATH) go build -race -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) +binaryall: + GOPATH=$(GOPATH) go build -a -o $(OUTPUT)/$(EXENAME) -ldflags '$(LDFLAGS)' $(PKG) + fmt: GOPATH=$(GOPATH) go fmt app/... @@ -150,4 +153,4 @@ tarball: distclean release install echo -n $(VERSION) > $(TARPATH)/version.txt tar czf $(DIST)/$(PACKAGE_NAME).tar.gz -C $(DIST) $(PACKAGE_NAME) -.PHONY: clean distclean pristine get build styles javascript release releasetest dist_gopath install gopath binary tarball assets +.PHONY: clean distclean pristine get build styles javascript release releasetest dist_gopath install gopath binary binaryrace binaryall tarball assets From 27695c2a3dab4dfac6723a7dae0d73beaa565541 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 20:43:46 +0200 Subject: [PATCH 09/44] Also start up the default HTTPS handler. --- .gitignore | 4 ++++ src/app/spreed-speakfreely-server/main.go | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e6f51d70..651650c2 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ vendor/* /.sass-cache /extra /src/i18n/*.mo +server.key +server.csr +server.crt +server.pem diff --git a/src/app/spreed-speakfreely-server/main.go b/src/app/spreed-speakfreely-server/main.go index 3eb8cc58..ecdbb333 100644 --- a/src/app/spreed-speakfreely-server/main.go +++ b/src/app/spreed-speakfreely-server/main.go @@ -121,7 +121,7 @@ func handleRoomView(room string, w http.ResponseWriter, r *http.Request) { w.Header().Set("Cache-Control", "private, max-age=0") // Detect if the request was made with SSL. - ssl := false + ssl := r.TLS != nil proto, ok := r.Header["X-Forwarded-Proto"] if ok { ssl = proto[0] == "https" @@ -357,7 +357,14 @@ func runner(runtime phoenix.Runtime) error { } } - runtime.DefaultHTTPHandler(r) + err = runtime.DefaultHTTPHandler(r) + if err != nil { + log.Println("Failed to create HTTP handler", err) + } + err = runtime.DefaultHTTPSHandler(r) + if err != nil { + log.Println("Failed to create HTTPS handler", err) + } return runtime.Start() } From 7c87ec3325e359e9fc5ea7d32db33c7c31a91a3e Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 18 Apr 2014 20:48:11 +0200 Subject: [PATCH 10/44] Added example configuration for https. --- server.conf.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server.conf.in b/server.conf.in index 07bf5f80..8c8388f9 100644 --- a/server.conf.in +++ b/server.conf.in @@ -10,6 +10,14 @@ listen = 127.0.0.1:8080 #stats = true # Provide stats API at /api/v1/stats (do not enable this in production or unprotected!). #pprofListen = 127.0.0.1:6060 # See http://golang.org/pkg/net/http/pprof/ for details +[https] +#listen = 127.0.0.1:8443 +#certificate = server.crt # Full path to certificate. +#key = server.key # Full path to key. +#minVersion = SSLv3 # Minimal supported encryption (SSLv3, TLSv1, TLSv1.1, TLSv1.2). +#readtimeout = 10 +#writetimeout = 10 + [app] #title = Spreed Speak Freely #ver = 1234 # version string to use for static resource From b074e77edd9f0b41d8409116fafb7acd09d9afbd Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 12:54:37 +0200 Subject: [PATCH 11/44] Fixed data channel not ready error by deferring own event triggering. --- static/js/mediastream/webrtc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/mediastream/webrtc.js b/static/js/mediastream/webrtc.js index b930bbba..f0c76d14 100644 --- a/static/js/mediastream/webrtc.js +++ b/static/js/mediastream/webrtc.js @@ -647,7 +647,10 @@ define([ }; WebRTC.prototype.onConnectionStateChange = function(iceConnectionState, currentcall) { - this.e.triggerHandler('statechange', [iceConnectionState, currentcall]); + // Defer this to allow native event handlers to complete before running more stuff. + _.defer(_.bind(function() { + this.e.triggerHandler('statechange', [iceConnectionState, currentcall]); + }, this)); }; WebRTC.prototype.onRemoteStreamAdded = function(stream, currentcall) { From c94bdb457d4f8c0b49c3fc326a544757ddf1d558 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 13:01:57 +0200 Subject: [PATCH 12/44] Removed debug. --- static/js/services/fileupload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/services/fileupload.js b/static/js/services/fileupload.js index 262ffc4e..2faa14c1 100644 --- a/static/js/services/fileupload.js +++ b/static/js/services/fileupload.js @@ -129,7 +129,7 @@ define(["jquery", "underscore", "webrtc.adapter"], function($, _) { }; FileUpload.prototype.bindDrop = function(namespace, element, cb) { - console.log("Binding file upload drop to", namespace, element); + //console.log("Binding file upload drop to", namespace, element); // Helper to allow later modifications. var binder = { From 31f20567d1dc07fd6fe036db19aee77084c8bb8a Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 14:34:28 +0200 Subject: [PATCH 13/44] Use videoLayout service to draw other layout when when a main view is shown. --- src/styles/components/_audiovideo.scss | 33 ++++++++++++-------- static/js/directives/audiovideo.js | 41 +++++++++++++------------ static/js/services/videolayout.js | 42 +++++++++++++++----------- 3 files changed, 68 insertions(+), 48 deletions(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index fd946f97..08d17a2c 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -47,18 +47,6 @@ right:260px; .withBuddylist.withChat #audiovideo { right:520px; } -.mainScreenshare { - #audiovideo { - width:150px; - .remoteVideo .peerlabel { - font-size:12px; - font-weight:bold; - } - .remoteVideo .peeractions i { - font-size:1em; - } - } -} .remoteVideo .peerlabel { -webkit-transition: color 500ms ease-out; @@ -96,6 +84,27 @@ right:520px; border:1px solid #9dd53a; } +.renderer-smally { + width:150px; + #remoteVideos { + padding-bottom: 85px; + } + #mini { + bottom:0px; + left:0px; + right:0px; + max-height:none; + height:85px; + } + .remoteVideo .peerlabel { + font-size:.9em; + font-weight:bold; + } + .remoteVideo .peeractions i { + font-size:1em; + } +} + .renderer-conferencekiosk { #remoteVideos { top:auto; diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index 6f85f496..1e02f0dd 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -82,12 +82,12 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ }); } scope.$emit("active", currentcall); - $scope.resize(); + $scope.redraw(); }, function() { peers[peerid] = scope; console.warn("We did not receive video data for remote stream", currentcall, stream, video); scope.$emit("active", currentcall); - $scope.resize(); + $scope.redraw(); }); scope.doChat = function() { $scope.$emit("startchat", currentcall.id, {autofocus: true, restore: true}); @@ -107,7 +107,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ subscope.element.remove(); } subscope.$destroy(); - $scope.resize(); + $scope.redraw(); } }; @@ -167,7 +167,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ } if ($scope.localVideo.videoWidth > 0) { $scope.localVideo.style.opacity = 1; - $scope.resize(); + $scope.redraw(); } else { count++; if (count < 100) { @@ -239,7 +239,6 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ $(scope.card).on("doubletap dblclick", _.debounce(scope.toggleFullscreen, 100, true)); - //scope.rendererName = "conferencekiosk"; scope.rendererName = "onepeople"; scope.renderersAvailable = videoLayout.layouts(); @@ -253,42 +252,46 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ } }; - var needsResize = false; - scope.resize = function() { - needsResize = true; + var needsRedraw = false; + scope.redraw = function() { + needsRedraw = true; }; - var resize = function() { + var redraw = function() { var size = { width: scope.layoutparent.width(), height: scope.layoutparent.height() } - videoLayout.update(getRendererName(), size, scope, controller); + var again = videoLayout.update(getRendererName(), size, scope, controller); + if (again) { + // Layout needs a redraw. + needsRedraw = true; + } }; // Make sure we draw on resize. - $($window).on("resize", scope.resize); + $($window).on("resize", scope.redraw); scope.$on("mainresize", function(event, main) { if (main) { - // Force onepeople renderer when we have a main view. - rendererName = "onepeople" + // Force smally renderer when we have a main view. + rendererName = "smally" } else if (rendererName) { rendererName = null; } - _.defer(scope.resize); + _.defer(scope.redraw); }); - scope.resize(); + scope.redraw(); // Make sure we draw when the renderer was changed. scope.$watch("rendererName", function() { - _.defer(scope.resize); + _.defer(scope.redraw); }); // Update function run in rendering thread. var update = function() { - if (needsResize) { - needsResize =false; - resize(); + if (needsRedraw) { + needsRedraw =false; + redraw(); } requestAnimationFrame(update); } diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index 17449c57..2af0e3e1 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -42,7 +42,7 @@ define(["jquery", "underscore"], function($, _) { // videoLayout return ["$window", function($window) { - // Video layout with all persons rendered the same size. + // Video layout with all videos rendered the same size. var OnePeople = function(container, scope, controller) { }; @@ -59,15 +59,6 @@ define(["jquery", "underscore"], function($, _) { if (videos.length) { var remoteSize = getRemoteVideoSize(videos, peers); - /*if (videos.length === 1) { - var remoteVideo = peers[videos[0]].element.find("video").get(0); - videoWidth = remoteVideo.videoWidth; - videoHeight = remoteVideo.videoHeight; - console.log("Remote video size: ", videoWidth, videoHeight); - } else { - videoWidth = 1920; - videoHeight = 1080; - }*/ videoWidth = remoteSize.width; videoHeight = remoteSize.height; } @@ -94,8 +85,8 @@ define(["jquery", "underscore"], function($, _) { } var aspectRatio = videoWidth/videoHeight; - var innerHeight = size.height; //scope.layoutparent.height(); - var innerWidth = size.width; //scope.layoutparent.width(); + var innerHeight = size.height; + var innerWidth = size.width; //console.log("resize", innerHeight, innerWidth); //console.log("resize", container, videos.length, aspectRatio, innerHeight, innerWidth); @@ -155,6 +146,17 @@ define(["jquery", "underscore"], function($, _) { }; + + // Smally inherits from OnePeople + var Smally = function(container, scope, controller) { + // Call super. + OnePeople.call(this, container, scope, controller); + } + Smally.prototype = Object.create(OnePeople.prototype); + Smally.prototype.constructor = Smally; + Smally.prototype.name = "smally"; + + // A view with one selectable large video. The others are small. var ConferenceKiosk = function(container, scope, controller) { this.remoteVideos = $(container).find("#remoteVideos"); @@ -228,10 +230,13 @@ define(["jquery", "underscore"], function($, _) { this.remoteVideos = null; }; + // Register renderers. renderers[OnePeople.prototype.name] = OnePeople; + renderers[Smally.prototype.name] = Smally; renderers[ConferenceKiosk.prototype.name] = ConferenceKiosk; + // Public api. var current = null; return { @@ -240,23 +245,26 @@ define(["jquery", "underscore"], function($, _) { var videos = _.keys(controller.peers); var peers = controller.peers; var container = scope.container; + var layoutparent = scope.layoutparent; if (!current) { current = new renderers[name](container, scope, controller) console.log("Created new video layout renderer", name, current); - $(container).addClass("renderer-"+name); + $(layoutparent).addClass("renderer-"+name); + return true; } else { if (current.name !== name) { current.close(container, scope, controller); $(container).removeAttr("style"); - $(container).removeClass("renderer-"+current.name); - current = new renderers[name](container, scope, conroller) - $(container).addClass("renderer-"+name); + $(layoutparent).removeClass("renderer-"+current.name); + current = new renderers[name](container, scope, controller) + $(layoutparent).addClass("renderer-"+name); console.log("Switched to new video layout renderer", name, current); + return true; } } - current.render(container, size, scope, videos, peers); + return current.render(container, size, scope, videos, peers); }, register: function(name, impl) { From 99d4ae4e22258d833f237722d045f782c330c3e1 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 14:44:03 +0200 Subject: [PATCH 14/44] Fixed style typo. --- src/styles/components/_audiovideo.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index 08d17a2c..256169ad 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -24,7 +24,7 @@ left:0px; top:44px; bottom:0px; right:0px; -boder-top:1px solid $bordercolor; +border-top:1px solid $bordercolor; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; From 24b4f5782108f57564f9b13eb2590c3200945075 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 15:00:46 +0200 Subject: [PATCH 15/44] Overflow styles fixed for audioVideo component. --- src/styles/components/_audiovideo.scss | 1 - src/styles/components/_webrtc.scss | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index 256169ad..e71c7e23 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -161,6 +161,5 @@ right:520px; @media only screen and (max-width:590px) { #audiovideo { right:0px; - z-index:12; } } diff --git a/src/styles/components/_webrtc.scss b/src/styles/components/_webrtc.scss index 9cb9d56d..6fb46999 100644 --- a/src/styles/components/_webrtc.scss +++ b/src/styles/components/_webrtc.scss @@ -80,7 +80,7 @@ transition-duration: 0.5s; } #localVideo { width: 100%; -height: 100%; +max-height: 100%; opacity: 0; transition-property: opacity; -webkit-transition-property: opacity; @@ -88,6 +88,7 @@ transition-duration: 2s; -webkit-transition-duration: 2s; background: rgba(0,0,0,0.4); /*background: red;*/ +display:block; } #remoteVideos { position:absolute; @@ -105,10 +106,12 @@ transition-duration: 2s; #remoteVideos video { width:100%; height:100%; +display:block; } #miniVideo { max-height: 100%; max-width:100%; +display:block; } .remoteVideo { display: inline-block; @@ -118,6 +121,7 @@ vertical-align:bottom; position:relative; visibility:hidden; background: rgba(0,0,0,0.4); +overflow:hidden; } .remoteVideo.withvideo { visibility:visible; From e504b26abafd655fea96be35c1d8dcd68585cad7 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 20:17:56 +0200 Subject: [PATCH 16/44] Implemented ui to switch video layout renderers. --- src/styles/components/_audiovideo.scss | 29 ++++++++++++++++++++++++++ src/styles/components/_webrtc.scss | 7 ++++++- static/js/directives/audiovideo.js | 4 ++++ static/js/services/videolayout.js | 4 ++++ static/partials/audiovideo.html | 16 +++++++++----- 5 files changed, 54 insertions(+), 6 deletions(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index e71c7e23..bcfc04c7 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -48,6 +48,34 @@ right:260px; right:520px; } +.audioVideo { + position:relative; + width:100%; + height:100%; +} + +.audioVideo .overlayactions { + position: absolute; + left:0px; + top:0px; + bottom:0px; + height:70px; + margin:auto 0; + width:40px; + opacity:0.5; + padding:3px 0; + background: rgba(0,0,0,0.2); + text-shadow: 0 0 5px black; + z-index:5; + + button { + width:40px; + display: block; + color:#ccc; + cursor:pointer; + } +} + .remoteVideo .peerlabel { -webkit-transition: color 500ms ease-out; -moz-transition: color 500ms ease-out; @@ -112,6 +140,7 @@ right:520px; text-align:center; background:rgba(0,0,0,0.4); padding-right:192px; + min-height:108px; >div { height:108px; width:192px; diff --git a/src/styles/components/_webrtc.scss b/src/styles/components/_webrtc.scss index 6fb46999..3e969b0a 100644 --- a/src/styles/components/_webrtc.scss +++ b/src/styles/components/_webrtc.scss @@ -41,8 +41,9 @@ transition-duration: 2s; -webkit-transition-duration: 2s; transform: rotateY(0deg); -webkit-transform: rotateY(0deg); +z-index:2; } -#card.active { +.active #card { transform: rotateY(180deg); -webkit-transform: rotateY(180deg); } @@ -55,6 +56,7 @@ bottom:0px; transform: scale(-1, 1); -webkit-transform: scale(-1, 1); pointer-events:none; +z-index:2; } #remote { position: absolute; @@ -64,6 +66,8 @@ top:0px; bottom:0px; transform: rotateY(180deg); -webkit-transform: rotateY(180deg); +pointer-events:none; +z-index:2; } #mini { position: absolute; @@ -140,6 +144,7 @@ color:rgba(255,255,255,0.3); text-align:center; font-size:80px; margin-top:-40px; +pointer-events:auto; } .remoteVideo.onlyaudio video { display:none; diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index 1e02f0dd..6c5a0ad2 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -252,6 +252,10 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ } }; + scope.setRenderer = function(name) { + scope.rendererName = name; + }; + var needsRedraw = false; scope.redraw = function() { needsRedraw = true; diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index 2af0e3e1..217bd594 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -225,6 +225,10 @@ define(["jquery", "underscore"], function($, _) { ConferenceKiosk.prototype.close = function(container, scope, controller) { this.closed = true; + if (this.big) { + this.remoteVideos.append(this.big); + } + this.big = null; this.bigVideo.remove() this.bigVideo = null; this.remoteVideos = null; diff --git a/static/partials/audiovideo.html b/static/partials/audiovideo.html index 9a2671e4..2c4e7045 100644 --- a/static/partials/audiovideo.html +++ b/static/partials/audiovideo.html @@ -1,7 +1,8 @@ -
-
- - +
+
+
+ +
@@ -9,4 +10,9 @@
-
+
+
+ + +
+
\ No newline at end of file From efcc414aace004921fe38763f200b1abd74957c1 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 20:21:31 +0200 Subject: [PATCH 17/44] Removed translation debug. --- static/js/app.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index cd3cfe90..2a400e67 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -119,12 +119,7 @@ define([ var domain = "messages"; var catalog = domain + "-" + lang; var bootstrap = function(translationData) { - if (translationData) { - // Set loaded translation data. - translationData.missing_key_callback = function(key) { - console.warn("Missing key " + key + " for " + lang); - }; - } else { + if (!translationData) { // Fallback catalog in case translation could not be loaded. lang = "en"; translationData = {}; From 80dabdf414a8ff847282acb04ea908f48c46bd5d Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sun, 20 Apr 2014 12:27:29 +0200 Subject: [PATCH 18/44] Fixed peeractions hover. --- src/styles/components/_webrtc.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/styles/components/_webrtc.scss b/src/styles/components/_webrtc.scss index 3e969b0a..b97279a4 100644 --- a/src/styles/components/_webrtc.scss +++ b/src/styles/components/_webrtc.scss @@ -164,11 +164,12 @@ transition-property: opacity; -webkit-transition-property: opacity; transition-duration: 0.2s; -webkit-transition-duration: 0.2s; +pointer-events:auto; } .remoteVideo .peeractions i { font-size:3vw; } -.remoteVideo:hover .peeractions { +.peeractions:hover { opacity:.5; } .remoteVideo .peerlabel { From 755b0b386f72de558eba0b544ba629982635c8db Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sun, 20 Apr 2014 12:33:57 +0200 Subject: [PATCH 19/44] Make sure to reset renderer to default renderer when finished. --- static/js/directives/audiovideo.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index 6c5a0ad2..b7a71cf5 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -41,6 +41,9 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ $scope.hasUsermedia = false; $scope.isActive = false; + + $scope.rendererName = $scope.defaultRendererName = "onepeople"; + //console.log("audiovideo", localVideo, miniVideo); $scope.addRemoteStream = function(stream, currentcall) { @@ -204,6 +207,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ scope.$destroy(); delete peers[k]; }); + $scope.rendererName = $scope.defaultRendererName; }); @@ -239,9 +243,6 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ $(scope.card).on("doubletap dblclick", _.debounce(scope.toggleFullscreen, 100, true)); - scope.rendererName = "onepeople"; - scope.renderersAvailable = videoLayout.layouts(); - var rendererName = null; var getRendererName = function() { // Return name of current renderer. From cdae08182d32f672202c20596b7950c6d8cd8ca7 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sun, 20 Apr 2014 13:04:29 +0200 Subject: [PATCH 20/44] Fixed a couple of mouse hover issues due to CSS transitions. --- src/styles/components/_audiovideo.scss | 15 ++++++++++++++- src/styles/components/_webrtc.scss | 5 +---- static/js/directives/audiovideo.js | 7 +++---- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index bcfc04c7..7469774f 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -54,6 +54,11 @@ right:520px; height:100%; } +.audioVideo.active { + perspective: 1000; + -webkit-perspective: 1000; +} + .audioVideo .overlayactions { position: absolute; left:0px; @@ -62,11 +67,11 @@ right:520px; height:70px; margin:auto 0; width:40px; - opacity:0.5; padding:3px 0; background: rgba(0,0,0,0.2); text-shadow: 0 0 5px black; z-index:5; + opacity:0; button { width:40px; @@ -76,6 +81,14 @@ right:520px; } } +.audioVideo.active:hover .overlayactions { + opacity: 0.3; +} + +.audioVideo.active .overlayactions:hover { + opacity: 0.6; +} + .remoteVideo .peerlabel { -webkit-transition: color 500ms ease-out; -moz-transition: color 500ms ease-out; diff --git a/src/styles/components/_webrtc.scss b/src/styles/components/_webrtc.scss index b97279a4..b9446333 100644 --- a/src/styles/components/_webrtc.scss +++ b/src/styles/components/_webrtc.scss @@ -20,9 +20,6 @@ */ #container { position: absolute; -/*margin: 0px auto;*/ -perspective: 1000; --webkit-perspective: 1000; top:0px; left:0px; bottom:0px; @@ -169,7 +166,7 @@ pointer-events:auto; .remoteVideo .peeractions i { font-size:3vw; } -.peeractions:hover { +.remoteVideo .peeractions:hover { opacity:.5; } .remoteVideo .peerlabel { diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index b7a71cf5..d6d04a56 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -30,7 +30,6 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ var peers = {}; var events = $({}); - $scope.card = $element; $scope.container = $element.parent().get(0); $scope.layoutparent = $element.parent().parent(); @@ -136,7 +135,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ if (!$scope.isActive) { $scope.isActive = true; $scope.remoteVideos.style.opacity = 1; - $scope.card.addClass("active"); + $element.addClass("active"); //console.log("active 3"); _.delay(function() { $scope.localVideo.style.opacity = 0; @@ -202,7 +201,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ $scope.mini.removeClass("visible"); $scope.localVideo.style.opacity = 0; $scope.remoteVideos.style.opacity = 0; - $scope.card.removeClass('active'); + $element.removeClass('active'); _.each(peers, function(scope, k) { scope.$destroy(); delete peers[k]; @@ -241,7 +240,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ //console.log("compile", arguments) - $(scope.card).on("doubletap dblclick", _.debounce(scope.toggleFullscreen, 100, true)); + iElement.on("doubletap dblclick", _.debounce(scope.toggleFullscreen, 100, true)); var rendererName = null; var getRendererName = function() { From 93b9c9f08823fea673da146c330362ddce174031 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sun, 20 Apr 2014 13:23:27 +0200 Subject: [PATCH 21/44] Make sure to start video after it was put back into remoteVideos container. --- static/js/services/videolayout.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index 217bd594..a976b028 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -227,6 +227,7 @@ define(["jquery", "underscore"], function($, _) { this.closed = true; if (this.big) { this.remoteVideos.append(this.big); + this.big.find("video").get(0).play(); } this.big = null; this.bigVideo.remove() From 609fb05189e3f5db50e46e3343ecec4f919b0a9e Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sun, 20 Apr 2014 17:24:28 +0200 Subject: [PATCH 22/44] Cleaned up and homogenized styles of audio video component. --- html/main.html | 4 +- src/styles/components/_audiovideo.scss | 265 ++++++++++++++++++++----- src/styles/components/_webrtc.scss | 186 ----------------- src/styles/main.scss | 1 - static/js/directives/audiovideo.js | 16 +- static/js/services/videolayout.js | 2 +- static/partials/audiovideo.html | 20 +- static/partials/audiovideopeer.html | 6 +- 8 files changed, 242 insertions(+), 258 deletions(-) delete mode 100644 src/styles/components/_webrtc.scss diff --git a/html/main.html b/html/main.html index d18f50c6..99c27acb 100644 --- a/html/main.html +++ b/html/main.html @@ -27,9 +27,7 @@
-
- -
+
diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index 7469774f..1ed69a23 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -19,47 +19,221 @@ * */ #audiovideo { -position:absolute; -left:0px; -top:44px; -bottom:0px; -right:0px; -border-top:1px solid $bordercolor; --webkit-user-select: none; --khtml-user-select: none; --moz-user-select: none; --o-user-select: none; -user-select: none; + position:absolute; + left:0px; + top:44px; + bottom:0px; + right:0px; + border-top:1px solid $bordercolor; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; } #audiovideo.fullscreen { -top:0px !important; -right:0px !important; -bottom:0px !important; -left:0px !important; -background:black !important; + top:0px !important; + right:0px !important; + bottom:0px !important; + left:0px !important; + background:black !important; } -#audiovideo.fullscreen .remoteVideo .peeractions { -display:none; +#audiovideo.fullscreen .remoteVideo .peerActions { + display:none; } .withChat #audiovideo, .withBuddylist #audiovideo { -right:260px; + right:260px; } .withBuddylist.withChat #audiovideo { -right:520px; + right:520px; +} + +.audiovideo { + position:absolute; + top:0px; + left:0px; + bottom:0px; + right:0px; } -.audioVideo { +.audiovideo.active { + perspective: 1000; + -webkit-perspective: 1000; +} + +.audiovideo .audiovideoBase { position:relative; width:100%; height:100%; + transition-property: transform; + -webkit-transition-property: -webkit-transform; + transition-duration: 2s; + -webkit-transition-duration: 2s; + transform: rotateY(0deg); + -webkit-transform: rotateY(0deg); + z-index:2; } -.audioVideo.active { - perspective: 1000; - -webkit-perspective: 1000; +.audiovideo.active .audiovideoBase { + transform: rotateY(180deg); + -webkit-transform: rotateY(180deg); +} + +.audiovideo .localContainer { + position: absolute; + left:0px; + right:0px; + top:0px; + bottom:0px; + transform: scale(-1, 1); + -webkit-transform: scale(-1, 1); + pointer-events:none; + z-index:2; +} + +.audiovideo .remoteContainer { + position: absolute; + left:0px; + right:0px; + top:0px; + bottom:0px; + transform: rotateY(180deg); + -webkit-transform: rotateY(180deg); + pointer-events:none; + z-index:2; +} + +.audiovideo .miniContainer { + position: absolute; + max-height: 18%; + bottom: 2px; + right: 2px; + transform: scale(-1, 1); + -webkit-transform: scale(-1, 1); + opacity: 0; + transition-property: opacity; + -webkit-transition-property: opacity; + transition-duration: 0.5s; + -webkit-transition-duration: 0.5s; +} + +.audiovideo .miniContainer.visible { + opacity: 1; +} + +.audiovideo .miniVideo { + max-height: 100%; + max-width:100%; + display:block; +} + +.audiovideo .localVideo { + width: 100%; + max-height: 100%; + opacity: 0; + transition-property: opacity; + -webkit-transition-property: opacity; + transition-duration: 2s; + -webkit-transition-duration: 2s; + background: rgba(0,0,0,0.4); + display:block; +} + +.audiovideo .remoteVideos { + position:absolute; + left:0px; + right:0px; + bottom:0px; + top:0px; + opacity: 0; + transition-property: opacity; + -webkit-transition-property: opacity; + transition-duration: 2s; + -webkit-transition-duration: 2s; + + video { + width:100%; + height:100%; + display:block; + } +} + +.audiovideo { + + .remoteVideo { + display: inline-block; + width:100%; + max-height:100%; + vertical-align:bottom; + position:relative; + visibility:hidden; + background: rgba(0,0,0,0.4); + overflow:hidden; + } + .remoteVideo.withvideo { + visibility:visible; + } + .remoteVideo.onlyaudio { + visibility:visible; + background: #666; + } + .remoteVideo .onlyaudio { + display:none; + position:absolute; + left:0px; + top:45%; + right:0px; + color:rgba(255,255,255,0.3); + text-align:center; + font-size:80px; + margin-top:-40px; + pointer-events:auto; + } + .remoteVideo.onlyaudio video { + display:none; + } + .remoteVideo.onlyaudio .onlyaudio { + display:block; + } + .remoteVideo .peerActions { + position: absolute; + z-index: 10; + left:0px; + right:0px; + bottom:5%; + text-align:center; + opacity:.0; + transition-property: opacity; + -webkit-transition-property: opacity; + transition-duration: 0.2s; + -webkit-transition-duration: 0.2s; + pointer-events:auto; + } + .remoteVideo .peerActions i { + font-size:3vw; + } + .remoteVideo .peerActions:hover { + opacity:.5; + } + .remoteVideo .peerLabel { + position: absolute; + z-index:8; + left:4%; + bottom:4%; + font-size:2.5vw; + color:white; + opacity:.7; + text-shadow: 0px 0px 4px black; + max-width:30%; + overflow:hidden; + white-space:nowrap; + text-overflow:ellipsis; + padding:4px; + } + } -.audioVideo .overlayactions { +.audiovideo .overlayActions { position: absolute; left:0px; top:0px; @@ -81,26 +255,26 @@ right:520px; } } -.audioVideo.active:hover .overlayactions { +.audiovideo.active:hover .overlayActions { opacity: 0.3; } -.audioVideo.active .overlayactions:hover { +.audiovideo.active .overlayActions:hover { opacity: 0.6; } -.remoteVideo .peerlabel { +.remoteVideo .peerLabel { -webkit-transition: color 500ms ease-out; -moz-transition: color 500ms ease-out; -o-transition: color 500ms ease-out; transition: color 500ms ease-out; } -.remoteVideo.talking .peerlabel { +.remoteVideo.talking .peerLabel { color: #9dd53a; } -.remoteVideo .overlaylogo { +.remoteVideo .overlayLogo { position:absolute; right:4%; top:4%; @@ -117,37 +291,37 @@ right:520px; pointer-events: none; } -.localVideo video { +.miniContainer video { border:1px solid transparent; } -.localVideo.talking video { +.miniContainer.talking video { border:1px solid #9dd53a; } .renderer-smally { width:150px; - #remoteVideos { + .remoteVideos { padding-bottom: 85px; } - #mini { + .miniContainer { bottom:0px; left:0px; right:0px; max-height:none; height:85px; } - .remoteVideo .peerlabel { + .remoteVideo .peerLabel { font-size:.9em; font-weight:bold; } - .remoteVideo .peeractions i { + .remoteVideo .peerActions i { font-size:1em; } } .renderer-conferencekiosk { - #remoteVideos { + .remoteVideos { top:auto; bottom:2px; text-align:center; @@ -159,17 +333,17 @@ right:520px; width:192px; cursor:pointer; } - .overlaylogo { + .overlayLogo { display:none; } - .peerlabel, .peeractions i { + .peerLabel, .peerActions i { font-size:1.1em; } - .peerlabel { + .peerLabel { background: rgba(0,0,0,0.9); } } - #mini { + .miniContainer { max-height: none; height:108px; width:192px; @@ -187,14 +361,13 @@ right:520px; transition-duration: 2s; -webkit-transition-duration: 2s; } + .bigVideo video { + width:100%; + height:100%; + } } -.bigVideo video { - width:100%; - height:100%; -} - @media only screen and (max-width: 630px) { .mainScreenshare #audiovideo { display:none; diff --git a/src/styles/components/_webrtc.scss b/src/styles/components/_webrtc.scss deleted file mode 100644 index b9446333..00000000 --- a/src/styles/components/_webrtc.scss +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Spreed Speak Freely. - * Copyright (C) 2013-2014 struktur AG - * - * This file is part of Spreed Speak Freely. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -#container { -position: absolute; -top:0px; -left:0px; -bottom:0px; -right:0px; -} -#container .visible { -opacity:1 !important; -} -#card { -position:relative; -width:100%; -height:100%; -transition-property: transform; --webkit-transition-property: -webkit-transform; -transition-duration: 2s; --webkit-transition-duration: 2s; -transform: rotateY(0deg); --webkit-transform: rotateY(0deg); -z-index:2; -} -.active #card { -transform: rotateY(180deg); --webkit-transform: rotateY(180deg); -} -#local { -position: absolute; -left:0px; -right:0px; -top:0px; -bottom:0px; -transform: scale(-1, 1); --webkit-transform: scale(-1, 1); -pointer-events:none; -z-index:2; -} -#remote { -position: absolute; -left:0px; -right:0px; -top:0px; -bottom:0px; -transform: rotateY(180deg); --webkit-transform: rotateY(180deg); -pointer-events:none; -z-index:2; -} -#mini { -position: absolute; -max-height: 18%; -bottom: 2px; -right: 2px; -transform: scale(-1, 1); --webkit-transform: scale(-1, 1); -opacity: 0; -transition-property: opacity; --webkit-transition-property: opacity; -transition-duration: 0.5s; --webkit-transition-duration: 0.5s; -} -#localVideo { -width: 100%; -max-height: 100%; -opacity: 0; -transition-property: opacity; --webkit-transition-property: opacity; -transition-duration: 2s; --webkit-transition-duration: 2s; -background: rgba(0,0,0,0.4); -/*background: red;*/ -display:block; -} -#remoteVideos { -position:absolute; -left:0px; -right:0px; -bottom:0px; -top:0px; -opacity: 0; -transition-property: opacity; --webkit-transition-property: opacity; -transition-duration: 2s; --webkit-transition-duration: 2s; -/*background: blue;*/ -} -#remoteVideos video { -width:100%; -height:100%; -display:block; -} -#miniVideo { -max-height: 100%; -max-width:100%; -display:block; -} -.remoteVideo { -display: inline-block; -width:100%; -max-height:100%; -vertical-align:bottom; -position:relative; -visibility:hidden; -background: rgba(0,0,0,0.4); -overflow:hidden; -} -.remoteVideo.withvideo { -visibility:visible; -} -.remoteVideo.onlyaudio { -visibility:visible; -background: #666; -} -.remoteVideo .onlyaudio { -display:none; -position:absolute; -left:0px; -top:45%; -right:0px; -color:rgba(255,255,255,0.3); -text-align:center; -font-size:80px; -margin-top:-40px; -pointer-events:auto; -} -.remoteVideo.onlyaudio video { -display:none; -} -.remoteVideo.onlyaudio .onlyaudio { -display:block; -} -.remoteVideo .peeractions { -position: absolute; -z-index: 10; -left:0px; -right:0px; -bottom:5%; -text-align:center; -opacity:.0; -transition-property: opacity; --webkit-transition-property: opacity; -transition-duration: 0.2s; --webkit-transition-duration: 0.2s; -pointer-events:auto; -} -.remoteVideo .peeractions i { -font-size:3vw; -} -.remoteVideo .peeractions:hover { -opacity:.5; -} -.remoteVideo .peerlabel { -position: absolute; -z-index:8; -left:4%; -bottom:4%; -font-size:2.5vw; -color:white; -opacity:.7; -text-shadow: 0px 0px 4px black; -max-width:30%; -overflow:hidden; -white-space:nowrap; -text-overflow:ellipsis; -padding:4px; -} \ No newline at end of file diff --git a/src/styles/main.scss b/src/styles/main.scss index 8415c187..688ab7f4 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -33,7 +33,6 @@ @import "components/rightslide"; @import "components/bar"; -@import "components/webrtc"; @import "components/buddylist"; @import "components/settings"; @import "components/chat"; diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index d6d04a56..033cc826 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -30,13 +30,13 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ var peers = {}; var events = $({}); - $scope.container = $element.parent().get(0); - $scope.layoutparent = $element.parent().parent(); + $scope.container = $element.get(0); + $scope.layoutparent = $element.parent(); - $scope.remoteVideos = $element.find("#remoteVideos").get(0); - $scope.localVideo = $element.find("#localVideo").get(0); - $scope.miniVideo = $element.find("#miniVideo").get(0); - $scope.mini = $element.find("#mini"); + $scope.remoteVideos = $element.find(".remoteVideos").get(0); + $scope.localVideo = $element.find(".localVideo").get(0); + $scope.miniVideo = $element.find(".miniVideo").get(0); + $scope.mini = $element.find(".miniContainer").get(0); $scope.hasUsermedia = false; $scope.isActive = false; @@ -143,7 +143,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ }, 500); _.delay(function() { //console.log("active 4", $scope.mini); - $scope.mini.addClass("visible"); //.style.opacity = 1; + $($scope.mini).addClass("visible"); }, 1000); } @@ -198,7 +198,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ $scope.miniVideo.src = ''; $($scope.remoteVideos).empty(); }, 1500); - $scope.mini.removeClass("visible"); + $($scope.mini).removeClass("visible"); $scope.localVideo.style.opacity = 0; $scope.remoteVideos.style.opacity = 0; $element.removeClass('active'); diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index a976b028..56617ccb 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -159,7 +159,7 @@ define(["jquery", "underscore"], function($, _) { // A view with one selectable large video. The others are small. var ConferenceKiosk = function(container, scope, controller) { - this.remoteVideos = $(container).find("#remoteVideos"); + this.remoteVideos = $(container).find(".remoteVideos"); this.bigVideo = $("
").addClass("bigVideo").get(0); this.remoteVideos.before(this.bigVideo); diff --git a/static/partials/audiovideo.html b/static/partials/audiovideo.html index 2c4e7045..8804203c 100644 --- a/static/partials/audiovideo.html +++ b/static/partials/audiovideo.html @@ -1,17 +1,17 @@ -
-
-
- - +
+
+
+ +
-
-
-
- +
+
+
+
-
+
diff --git a/static/partials/audiovideopeer.html b/static/partials/audiovideopeer.html index 0ef59995..a637d4f1 100644 --- a/static/partials/audiovideopeer.html +++ b/static/partials/audiovideopeer.html @@ -1,9 +1,9 @@
-
{{peerid|displayName}}
-
+
{{peerid|displayName}}
+
- +
\ No newline at end of file From 904cfd0ccf82192f9944467b3ae90d067269ab7d Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Mon, 21 Apr 2014 22:51:33 +0200 Subject: [PATCH 23/44] Use new "websocket.Upgrader" API. This doesn't change functionality for now, but will be required once support for compression has landed in gorilla/websocket. @deathwish: You will have to update the Debian packages of Gorilla to build this. --- src/app/spreed-speakfreely-server/ws.go | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/app/spreed-speakfreely-server/ws.go b/src/app/spreed-speakfreely-server/ws.go index 15eaf7dc..ec7df4ef 100644 --- a/src/app/spreed-speakfreely-server/ws.go +++ b/src/app/spreed-speakfreely-server/ws.go @@ -31,6 +31,23 @@ const ( wsWriteBufSize = 1024 ) +var ( + upgrader = websocket.Upgrader{ + ReadBufferSize: wsReadBufSize, + WriteBufferSize: wsWriteBufSize, + CheckOrigin: func(r *http.Request) bool { + // Allow all connections by default to keep backwards + // compatibility, but we should really check the Origin + // header instead! + // + // NOTE: We can omit "CheckOrigin" if the host in Origin + // must be the same as the host of the request (which + // is probably always the case). + return true + }, + } +) + func makeWsHubHandler(h *Hub) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { @@ -42,9 +59,8 @@ func makeWsHubHandler(h *Hub) http.HandlerFunc { } // Upgrade to Websocket mode. - ws, err := websocket.Upgrade(w, r, nil, wsReadBufSize, wsWriteBufSize) + ws, err := upgrader.Upgrade(w, r, nil) if _, ok := err.(websocket.HandshakeError); ok { - w.WriteHeader(http.StatusBadRequest) return } else if err != nil { log.Println(err) From a8a6022e8cd7901b991339d92f1213934302fd4a Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Mon, 21 Apr 2014 23:31:15 +0200 Subject: [PATCH 24/44] Fixed couple of warnings found with golint. --- src/app/spreed-speakfreely-server/api.go | 1 + .../spreed-speakfreely-server/buffercache.go | 1 + src/app/spreed-speakfreely-server/config.go | 1 + .../spreed-speakfreely-server/connection.go | 1 + src/app/spreed-speakfreely-server/context.go | 1 + src/app/spreed-speakfreely-server/hub.go | 7 +++--- src/app/spreed-speakfreely-server/images.go | 23 ++++++++++++++++++- src/app/spreed-speakfreely-server/main.go | 10 ++++---- src/app/spreed-speakfreely-server/random.go | 1 + src/app/spreed-speakfreely-server/rooms.go | 1 + .../spreed-speakfreely-server/roomworker.go | 1 + src/app/spreed-speakfreely-server/server.go | 1 + src/app/spreed-speakfreely-server/stats.go | 1 + .../tokenprovider.go | 18 +++++++-------- src/app/spreed-speakfreely-server/tokens.go | 1 + src/app/spreed-speakfreely-server/user.go | 1 + src/app/spreed-speakfreely-server/ws.go | 1 + src/app/spreed-speakfreely-server/wsdata.go | 1 + 18 files changed, 54 insertions(+), 18 deletions(-) diff --git a/src/app/spreed-speakfreely-server/api.go b/src/app/spreed-speakfreely-server/api.go index e871f08b..3cc5c18f 100644 --- a/src/app/spreed-speakfreely-server/api.go +++ b/src/app/spreed-speakfreely-server/api.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import () diff --git a/src/app/spreed-speakfreely-server/buffercache.go b/src/app/spreed-speakfreely-server/buffercache.go index ad600dbc..dbb678c5 100644 --- a/src/app/spreed-speakfreely-server/buffercache.go +++ b/src/app/spreed-speakfreely-server/buffercache.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/config.go b/src/app/spreed-speakfreely-server/config.go index 99ffafd5..b5516a55 100644 --- a/src/app/spreed-speakfreely-server/config.go +++ b/src/app/spreed-speakfreely-server/config.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/connection.go b/src/app/spreed-speakfreely-server/connection.go index 0e9d211e..cd667c73 100644 --- a/src/app/spreed-speakfreely-server/connection.go +++ b/src/app/spreed-speakfreely-server/connection.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/context.go b/src/app/spreed-speakfreely-server/context.go index f02ea85e..e9c96472 100644 --- a/src/app/spreed-speakfreely-server/context.go +++ b/src/app/spreed-speakfreely-server/context.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main type Context struct { diff --git a/src/app/spreed-speakfreely-server/hub.go b/src/app/spreed-speakfreely-server/hub.go index 3d138742..0c865495 100644 --- a/src/app/spreed-speakfreely-server/hub.go +++ b/src/app/spreed-speakfreely-server/hub.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( @@ -113,7 +114,7 @@ func (h *Hub) Stat(details bool) *HubStat { rooms := make(map[string][]string) for roomid, room := range h.roomTable { users := make([]string, 0, len(room.connections)) - for id, _ := range room.connections { + for id := range room.connections { users = append(users, id) } rooms[roomid] = users @@ -215,9 +216,9 @@ func (h *Hub) GetGlobalConnections() []*Connection { if room, ok := h.roomTable[h.config.globalRoomid]; ok { h.mutex.RUnlock() return room.GetConnections() - } else { - h.mutex.RUnlock() } + + h.mutex.RUnlock() return make([]*Connection, 0) } diff --git a/src/app/spreed-speakfreely-server/images.go b/src/app/spreed-speakfreely-server/images.go index d7cfe32c..2aaa666a 100644 --- a/src/app/spreed-speakfreely-server/images.go +++ b/src/app/spreed-speakfreely-server/images.go @@ -1,3 +1,24 @@ +/* + * Spreed Speak Freely. + * Copyright (C) 2013-2014 struktur AG + * + * This file is part of Spreed Speak Freely. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + package main import ( @@ -51,7 +72,7 @@ func NewImageCache() ImageCache { } func (self *imageCache) Update(userId string, image string) string { - var mimetype string = "image/x-unknown" + mimetype := "image/x-unknown" pos := strings.Index(image, ";") if pos != -1 { mimetype = image[:pos] diff --git a/src/app/spreed-speakfreely-server/main.go b/src/app/spreed-speakfreely-server/main.go index 3eb8cc58..49e4f4b8 100644 --- a/src/app/spreed-speakfreely-server/main.go +++ b/src/app/spreed-speakfreely-server/main.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( @@ -49,12 +50,12 @@ var templates *template.Template var config *Config // Helper to retrieve languages from request. -func getRequestLanguages(r *http.Request, supported_languages []string) []string { +func getRequestLanguages(r *http.Request, supportedLanguages []string) []string { - accept_language_header, ok := r.Header["Accept-Language"] + acceptLanguageHeader, ok := r.Header["Accept-Language"] var langs []string if ok { - langs = goacceptlanguageparser.ParseAcceptLanguage(accept_language_header[0], supported_languages) + langs = goacceptlanguageparser.ParseAcceptLanguage(acceptLanguageHeader[0], supportedLanguages) } return langs @@ -290,9 +291,8 @@ func runner(runtime phoenix.Runtime) error { templates, err = templates.ParseGlob(path.Join(extraFolder, "*.html")) if err != nil { return fmt.Errorf("Failed to load extra templates: %s", err) - } else { - log.Printf("Loaded extra templates from: %s", extraFolder) } + log.Printf("Loaded extra templates from: %s", extraFolder) } // Create our hub instance. diff --git a/src/app/spreed-speakfreely-server/random.go b/src/app/spreed-speakfreely-server/random.go index 744be5bd..66ee8300 100644 --- a/src/app/spreed-speakfreely-server/random.go +++ b/src/app/spreed-speakfreely-server/random.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/rooms.go b/src/app/spreed-speakfreely-server/rooms.go index c5e49120..f0522ca3 100644 --- a/src/app/spreed-speakfreely-server/rooms.go +++ b/src/app/spreed-speakfreely-server/rooms.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/roomworker.go b/src/app/spreed-speakfreely-server/roomworker.go index 80c15198..c95da059 100644 --- a/src/app/spreed-speakfreely-server/roomworker.go +++ b/src/app/spreed-speakfreely-server/roomworker.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/server.go b/src/app/spreed-speakfreely-server/server.go index bcc84c66..054eae87 100644 --- a/src/app/spreed-speakfreely-server/server.go +++ b/src/app/spreed-speakfreely-server/server.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/stats.go b/src/app/spreed-speakfreely-server/stats.go index cecf1030..5111afee 100644 --- a/src/app/spreed-speakfreely-server/stats.go +++ b/src/app/spreed-speakfreely-server/stats.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/tokenprovider.go b/src/app/spreed-speakfreely-server/tokenprovider.go index 2b609589..855585a6 100644 --- a/src/app/spreed-speakfreely-server/tokenprovider.go +++ b/src/app/spreed-speakfreely-server/tokenprovider.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( @@ -49,19 +50,19 @@ func (tf *TokenFile) ReloadIfModified() error { return nil } -func reload_tokens(tf *TokenFile) { +func reloadRokens(tf *TokenFile) { r, err := os.Open(tf.Path) if err != nil { panic(err) } - csv_reader := csv.NewReader(r) - csv_reader.Comma = ':' - csv_reader.Comment = '#' - csv_reader.TrimLeadingSpace = true + csvReader := csv.NewReader(r) + csvReader.Comma = ':' + csvReader.Comment = '#' + csvReader.TrimLeadingSpace = true - records, err := csv_reader.ReadAll() + records, err := csvReader.ReadAll() if err != nil { panic(err) } @@ -76,15 +77,14 @@ func reload_tokens(tf *TokenFile) { func TokenFileProvider(filename string) TokenProvider { tf := &TokenFile{Path: filename} - tf.Reload = func() { reload_tokens(tf) } + tf.Reload = func() { reloadRokens(tf) } return func(token string) string { tf.ReloadIfModified() _, exists := tf.Tokens[token] if !exists { return "" - } else { - return token } + return token } } diff --git a/src/app/spreed-speakfreely-server/tokens.go b/src/app/spreed-speakfreely-server/tokens.go index 1854415c..7f3f550b 100644 --- a/src/app/spreed-speakfreely-server/tokens.go +++ b/src/app/spreed-speakfreely-server/tokens.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/user.go b/src/app/spreed-speakfreely-server/user.go index 593ef7f8..ac40823e 100644 --- a/src/app/spreed-speakfreely-server/user.go +++ b/src/app/spreed-speakfreely-server/user.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/ws.go b/src/app/spreed-speakfreely-server/ws.go index 15eaf7dc..a5b0d26b 100644 --- a/src/app/spreed-speakfreely-server/ws.go +++ b/src/app/spreed-speakfreely-server/ws.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main import ( diff --git a/src/app/spreed-speakfreely-server/wsdata.go b/src/app/spreed-speakfreely-server/wsdata.go index bc65b161..fe2691a8 100644 --- a/src/app/spreed-speakfreely-server/wsdata.go +++ b/src/app/spreed-speakfreely-server/wsdata.go @@ -18,6 +18,7 @@ * along with this program. If not, see . * */ + package main type DataHello struct { From 0a3246d6952f7f8fdd47297f37e09b1b14ec7460 Mon Sep 17 00:00:00 2001 From: cfrisemo Date: Thu, 24 Apr 2014 09:20:45 +0200 Subject: [PATCH 25/44] Update of Japanese language file. --- src/i18n/messages-ja.po | 50 ++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/i18n/messages-ja.po b/src/i18n/messages-ja.po index affb5ad4..80b01fde 100644 --- a/src/i18n/messages-ja.po +++ b/src/i18n/messages-ja.po @@ -9,14 +9,16 @@ msgstr "" "Project-Id-Version: Spreed Speak Freely 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" "POT-Creation-Date: 2014-04-08 21:20+0200\n" -"PO-Revision-Date: 2014-04-09 14:43+0100\n" +"PO-Revision-Date: 2014-04-23 22:25+0100\n" "Last-Translator: Curt Frisemo \n" "Language-Team: Curt Frisemo \n" -"Plural-Forms: nplurals=1; plural=0\n" +"Plural-Forms: nplurals=1; plural=0;\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" +"Language: ja\n" +"X-Generator: Poedit 1.6.4\n" msgid "Share your screen" msgstr "画面を共有する." @@ -111,12 +113,11 @@ msgstr "ルームを出る" msgid "Current room" msgstr "現在のルーム" -#, fuzzy msgid "Screen sharing options" -msgstr "メディアスクリーン共有" +msgstr "画面共有オプション" msgid "Fit screen." -msgstr "" +msgstr "画面に合わせる" msgid "Your picture" msgstr "あなたの写真" @@ -152,7 +153,7 @@ msgid "High" msgstr "高い" msgid "HD" -msgstr "" +msgstr "HD" msgid "Language" msgstr "言語" @@ -278,8 +279,8 @@ msgid "Camera / microphone access required." msgstr "カメラ・マイクの接続が必要です." msgid "" -"Please check your browser settings and allow camera and microphone access" -" for this site." +"Please check your browser settings and allow camera and microphone access " +"for this site." msgstr "ブラウザ設定で、このサイトへのカメラ・マイクの接続を許可してください." msgid "Skip check" @@ -289,11 +290,11 @@ msgid "Click here for help (Google Chrome)." msgstr "ここをクリックしてヘルプ表示(Google Chrome)" msgid "Please set your user details and settings." -msgstr "あなたのユーザー情報とセッティングを設定してください." +msgstr "あなたのプロフィールとアプリの動作を設定してください." msgid "" -"Please note that some settings require you to reload or to make a new " -"call to become effective." +"Please note that some settings require you to reload or to make a new call " +"to become effective." msgstr "いくつかの設定は、再読み込みもしくは次回の発信から有効です." msgid "Create your room" @@ -369,7 +370,7 @@ msgid " does not pick up." msgstr "は電話にでません." msgid " tried to call you." -msgstr "" +msgstr "は電話しようとしました." msgid " called you." msgstr "から電話がありました." @@ -393,9 +394,13 @@ msgstr "ブラウザがファイル転送をサポートしていません." msgid "" "Permission to start screen sharing was denied. Make sure to have enabled " "screen sharing access for your browser. Copy chrome://flags/#enable-" -"usermedia-screen-capture and open it with your browser and enable the " -"flag on top. Then restart the browser and you are ready to go." +"usermedia-screen-capture and open it with your browser and enable the flag " +"on top. Then restart the browser and you are ready to go." msgstr "" +"画面共有は拒否されました.ブラウザの画面共有の設定を確認して下さい. Chromeのア" +"ドレスバーに chrome://flags/#enable-usermedia-screen-capture を入力して開き、" +"スクリーンキャプチャのサポートを有効にしてください。その後ブラウザを再起動し" +"てください。" msgid "Use browser language" msgstr "ブラウザの言語を使用" @@ -431,21 +436,20 @@ msgid "Please provide a valid access code." msgstr "有効なアクセスコードを入力してください." msgid "" -"Failed to verify access code. Check your Internet connection and try " -"again." -msgstr "アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてください." +"Failed to verify access code. Check your Internet connection and try again." +msgstr "" +"アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてく" +"ださい." msgid "and %2$s" msgid_plural "and %1$d others" -msgstr[0] "" +msgstr[0] "と %2" msgid "User" -msgstr "" +msgstr "ユーザー" msgid "Someone" -msgstr "" +msgstr "誰か" -#, fuzzy msgid "Me" -msgstr "名前" - +msgstr "私" From a6cdd389d4e781e4ed1e1fb7b27e023d9ea363cc Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 15:56:13 +0200 Subject: [PATCH 26/44] Updated to final phoenix TLS API. --- src/app/spreed-speakfreely-server/main.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/app/spreed-speakfreely-server/main.go b/src/app/spreed-speakfreely-server/main.go index ecdbb333..57ff7896 100644 --- a/src/app/spreed-speakfreely-server/main.go +++ b/src/app/spreed-speakfreely-server/main.go @@ -357,14 +357,8 @@ func runner(runtime phoenix.Runtime) error { } } - err = runtime.DefaultHTTPHandler(r) - if err != nil { - log.Println("Failed to create HTTP handler", err) - } - err = runtime.DefaultHTTPSHandler(r) - if err != nil { - log.Println("Failed to create HTTPS handler", err) - } + runtime.DefaultHTTPHandler(r) + runtime.DefaultHTTPSHandler(r) return runtime.Start() } From 3768be607a2326bd568bf07bdecd20ce42cb2ee8 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 16:15:14 +0200 Subject: [PATCH 27/44] Updated and rebuilt Japanese (ja) translation. --- src/i18n/messages-ja.po | 43 +++++++++++++++-------------- static/translation/messages-ja.json | 2 +- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/i18n/messages-ja.po b/src/i18n/messages-ja.po index 80b01fde..a59cb35c 100644 --- a/src/i18n/messages-ja.po +++ b/src/i18n/messages-ja.po @@ -8,17 +8,15 @@ msgid "" msgstr "" "Project-Id-Version: Spreed Speak Freely 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-04-08 21:20+0200\n" +"POT-Creation-Date: 2014-04-14 16:16+0200\n" "PO-Revision-Date: 2014-04-23 22:25+0100\n" "Last-Translator: Curt Frisemo \n" "Language-Team: Curt Frisemo \n" -"Plural-Forms: nplurals=1; plural=0;\n" +"Plural-Forms: nplurals=1; plural=0\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" -"Language: ja\n" -"X-Generator: Poedit 1.6.4\n" msgid "Share your screen" msgstr "画面を共有する." @@ -279,8 +277,8 @@ msgid "Camera / microphone access required." msgstr "カメラ・マイクの接続が必要です." msgid "" -"Please check your browser settings and allow camera and microphone access " -"for this site." +"Please check your browser settings and allow camera and microphone access" +" for this site." msgstr "ブラウザ設定で、このサイトへのカメラ・マイクの接続を許可してください." msgid "Skip check" @@ -293,8 +291,8 @@ msgid "Please set your user details and settings." msgstr "あなたのプロフィールとアプリの動作を設定してください." msgid "" -"Please note that some settings require you to reload or to make a new call " -"to become effective." +"Please note that some settings require you to reload or to make a new " +"call to become effective." msgstr "いくつかの設定は、再読み込みもしくは次回の発信から有効です." msgid "Create your room" @@ -394,13 +392,12 @@ msgstr "ブラウザがファイル転送をサポートしていません." msgid "" "Permission to start screen sharing was denied. Make sure to have enabled " "screen sharing access for your browser. Copy chrome://flags/#enable-" -"usermedia-screen-capture and open it with your browser and enable the flag " -"on top. Then restart the browser and you are ready to go." +"usermedia-screen-capture and open it with your browser and enable the " +"flag on top. Then restart the browser and you are ready to go." msgstr "" -"画面共有は拒否されました.ブラウザの画面共有の設定を確認して下さい. Chromeのア" -"ドレスバーに chrome://flags/#enable-usermedia-screen-capture を入力して開き、" -"スクリーンキャプチャのサポートを有効にしてください。その後ブラウザを再起動し" -"てください。" +"画面共有は拒否されました.ブラウザの画面共有の設定を確認して下さい. Chromeのアドレスバーに chrome://flags/#enable-" +"usermedia-screen-capture " +"を入力して開き、スクリーンキャプチャのサポートを有効にしてください。その後ブラウザを再起動してください。" msgid "Use browser language" msgstr "ブラウザの言語を使用" @@ -436,14 +433,17 @@ msgid "Please provide a valid access code." msgstr "有効なアクセスコードを入力してください." msgid "" -"Failed to verify access code. Check your Internet connection and try again." -msgstr "" -"アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてく" -"ださい." +"Failed to verify access code. Check your Internet connection and try " +"again." +msgstr "アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてください." -msgid "and %2$s" -msgid_plural "and %1$d others" -msgstr[0] "と %2" +#, fuzzy, python-format +msgid "and %s" +msgstr "と %2" + +#, python-format +msgid "and %d others" +msgstr "" msgid "User" msgstr "ユーザー" @@ -453,3 +453,4 @@ msgstr "誰か" msgid "Me" msgstr "私" + diff --git a/static/translation/messages-ja.json b/static/translation/messages-ja.json index 73e8f764..71f1d2e6 100644 --- a/static/translation/messages-ja.json +++ b/static/translation/messages-ja.json @@ -1 +1 @@ -{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0"},"Share your screen":[null,"画面を共有する."],"Chat":[null,"チャット"],"Mute microphone":[null,"消音"],"Turn camera off":[null,"カメラをオフにする"],"Settings":[null,"設定"],"Your audio level":[null,"あなたの音量"],"Start chat":[null,"チャットを始める"],"Start video call":[null,"テレビ電話を始める"],"Start audio conference":[null,"音声会議を始める"],"No other users online":[null,"オンラインのユーザーはいません"],"Chat sessions":[null,"チャットのセッション"],"Room chat":[null,"ルームチャット"],"Peer to peer":[null,"ピア・ツー・ピア"],"Close chat":[null,"チャットを終える"],"is typing...":[null,"は入力中です..."],"has stopped typing...":[null,"は入力を止めました..."],"Type here to chat...":[null,"ここに入力してチャット開始します..."],"Send":[null,"送信"],"File sharing":[null,"ファイル共有"],"File is no longer available":[null,"ファイルは有効ではありません"],"Download":[null,"ダウンロード"],"Open":[null,"開く"],"Cancel":[null,"キャンセル"],"Unshare":[null,"共有取り消し"],"Retry":[null,"リトライ"],"Download failed.":[null,"ダウンロード失敗."],"Change room":[null,"ルームチェンジ"],"Room":[null,"ルーム"],"Main":[null,"メイン"],"Leave room":[null,"ルームを出る"],"Current room":[null,"現在のルーム"],"Fit screen.":[null,""],"Your picture":[null,"あなたの写真"],"Take picture":[null,"写真を取る"],"Waiting for camera":[null,"カメラ待ち"],"Your name":[null,"あなたの名前"],"Name":[null,"名前"],"Your picture and name are visible to others.":[null,"あなたの写真と名前は公開されています."],"Microphone":[null,"マイク"],"Camera":[null,"カメラ"],"Video quality":[null,"ビデオ画質"],"Low":[null,"低い"],"High":[null,"高い"],"HD":[null,""],"Language":[null,"言語"],"Language changes become active on reload.":[null,"言語の変更は再読み込み時に適用となります."],"Default room":[null,"デフォルト・ルーム"],"Set alternative room to join at start.":[null,"スタート時に別のルームに参加する."],"Desktop notification":[null,"デスクトップ通知"],"Enable":[null,"有効にする"],"Denied - check your browser settings":[null,"拒否 - ブラウザ設定を確認して下さい"],"Allowed":[null,"許可"],"Advanced settings":[null,"詳細設定"],"Stereo audio":[null,"ステレオ・オーディオ"],"Max video frame rate":[null,"ビデオ最高フレームレート"],"auto":[null,"自動"],"Experimental settings":[null,"試験的に設定"],"Show advanced settings":[null,"詳細設定を表示"],"Hide advanced settings":[null,"詳細設定を隠す"],"Remember settings":[null,"設定を保存"],"Apply":[null,"適用"],"Share by Email":[null,"Eメールでシェア"],"Share on Facebook":[null,"フェイスブックでシェア"],"Share on Twitter":[null,"ツィッターでシェア"],"Share on Google Plus":[null,"Google+でシェア"],"Share on XING":[null,"XINGでシェア"],"Initializing":[null,"初期化中"],"Online":[null,"オンライン"],"Calling":[null,"発信中"],"Hangup":[null,"切断"],"In call with":[null,"と会話中"],"Conference with":[null,"と会議中"],"Your are offline":[null,"オフラインです"],"Go online":[null,"オンラインにする"],"Connection interrupted":[null,"接続は中断されました"],"An error occured":[null,"エラーが発生しました"],"Incoming call":[null,"着信中"],"from":[null,"から"],"Accept call":[null,"通話"],"Reject":[null,"拒否"],"Waiting for camera/microphone access":[null,"カメラ・マイクの接続待ち."],"Please wait":[null,"お待ちください"],"Checking camera and microphone access.":[null,"カメラ・マイクの接続確認中."],"Please allow access to your camera and microphone.":[null,"カメラとマイクの接続を許可してください."],"Camera / microphone access required.":[null,"カメラ・マイクの接続が必要です."],"Please check your browser settings and allow camera and microphone access for this site.":[null,"ブラウザ設定で、このサイトへのカメラ・マイクの接続を許可してください."],"Skip check":[null,"チェックをスキップ"],"Click here for help (Google Chrome).":[null,"ここをクリックしてヘルプ表示(Google Chrome)"],"Please set your user details and settings.":[null,"あなたのユーザー情報とセッティングを設定してください."],"Please note that some settings require you to reload or to make a new call to become effective.":[null,"いくつかの設定は、再読み込みもしくは次回の発信から有効です."],"Create your room":[null,"自分のルームを作成する"],"This is your room link:":[null,"あなたのルームへのリンク:"],"Creating room link ...":[null,"ルームへのリンクを作る..."],"Start":[null,"開始"],"Just click start":[null,"クリックして開始"],"Share this URL with the people you want to meet.":[null,"会いたい人とURLをシェアする."],"You can use and re-use this room as many times as you want.":[null,"ルームは何回でも好きなだけ使えます."],"Peer to peer chat active.":[null,"ピア・ツー・ピア・チャットがアクティブです."],"Peer to peer chat is now off.":[null,"ピア・ツー・ピア・チャットがオフです."]," is now offline.":[null,"は今オフラインです"]," is now online.":[null,"は今オンラインです"],"You share file:":[null,"あなたの共有ファイル:"],"Incoming file:":[null,"受信中ファイル:"],"Quit from Spreed Speak Freely?":[null,"Spreed Speak Freelyを終了しますか?"],"Restart required to apply updates. Click ok to restart now.":[null,"アップデート適用のため再起動してください.ここをクリックして再起動する."],"Failed to access camera/microphone.":[null,"カメラ・マイクへの接続に失敗しました."],"Failed to establish peer connection.":[null,"ピアとの接続に失敗しました."],"We are sorry but something went wrong. Boo boo.":[null,"申し訳ないのですが、不具合が生じました。"],"Oops":[null,"しまった"],"Peer connection failed. Check your settings.":[null,"ピア接続に失敗しました.設定を確認してください."],"User hung up because of error.":[null,"エラーのため切断しました."]," is busy. Try again later.":[null,"は話中です.後で掛けなおしてください."]," rejected your call.":[null,"着信拒否されました."]," does not pick up.":[null,"は電話にでません."]," tried to call you.":[null,""]," called you.":[null,"から電話がありました."],"Your browser does not support WebRTC. No calls possible.":[null,"ブラウザがWebRTCをサポートしていない為通話はできません."],"Chat with":[null,"とチャットする"],"Message from ":[null,"からのメッセージ"],"You are now in room %s ...":[null,"あなたは%sのルームにいます..."],"Your browser does not support file transfer.":[null,"ブラウザがファイル転送をサポートしていません."],"Permission to start screen sharing was denied. Make sure to have enabled screen sharing access for your browser. Copy chrome://flags/#enable-usermedia-screen-capture and open it with your browser and enable the flag on top. Then restart the browser and you are ready to go.":[null,""],"Use browser language":[null,"ブラウザの言語を使用"],"Meet with me here:":[null,"ここで私と会う:"],"Error":[null,"エラー"],"Hint":[null,"ヒント"],"Please confirm":[null,"確認して下さい"],"More information required":[null,"さらなる情報が必要です"],"Ok":[null,"OK"],"Close":[null,"閉じる"],"Access code required":[null,"アクセスコードが必要です"],"Access denied":[null,"アクセスが拒否されました"],"Please provide a valid access code.":[null,"有効なアクセスコードを入力してください."],"Failed to verify access code. Check your Internet connection and try again.":[null,"アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてください."],"and %s":[null,""],"and %d others":[null,""],"User":[null,""],"Someone":[null,""]}}} \ No newline at end of file +{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0"},"Share your screen":[null,"画面を共有する."],"Chat":[null,"チャット"],"Mute microphone":[null,"消音"],"Turn camera off":[null,"カメラをオフにする"],"Settings":[null,"設定"],"Your audio level":[null,"あなたの音量"],"Start chat":[null,"チャットを始める"],"Start video call":[null,"テレビ電話を始める"],"Start audio conference":[null,"音声会議を始める"],"No other users online":[null,"オンラインのユーザーはいません"],"Chat sessions":[null,"チャットのセッション"],"Room chat":[null,"ルームチャット"],"Peer to peer":[null,"ピア・ツー・ピア"],"Close chat":[null,"チャットを終える"],"is typing...":[null,"は入力中です..."],"has stopped typing...":[null,"は入力を止めました..."],"Type here to chat...":[null,"ここに入力してチャット開始します..."],"Send":[null,"送信"],"File sharing":[null,"ファイル共有"],"File is no longer available":[null,"ファイルは有効ではありません"],"Download":[null,"ダウンロード"],"Open":[null,"開く"],"Cancel":[null,"キャンセル"],"Unshare":[null,"共有取り消し"],"Retry":[null,"リトライ"],"Download failed.":[null,"ダウンロード失敗."],"Change room":[null,"ルームチェンジ"],"Room":[null,"ルーム"],"Main":[null,"メイン"],"Leave room":[null,"ルームを出る"],"Current room":[null,"現在のルーム"],"Screen sharing options":[null,"画面共有オプション"],"Fit screen.":[null,"画面に合わせる"],"Your picture":[null,"あなたの写真"],"Take picture":[null,"写真を取る"],"Waiting for camera":[null,"カメラ待ち"],"Your name":[null,"あなたの名前"],"Name":[null,"名前"],"Your picture and name are visible to others.":[null,"あなたの写真と名前は公開されています."],"Microphone":[null,"マイク"],"Camera":[null,"カメラ"],"Video quality":[null,"ビデオ画質"],"Low":[null,"低い"],"High":[null,"高い"],"HD":[null,"HD"],"Language":[null,"言語"],"Language changes become active on reload.":[null,"言語の変更は再読み込み時に適用となります."],"Default room":[null,"デフォルト・ルーム"],"Set alternative room to join at start.":[null,"スタート時に別のルームに参加する."],"Desktop notification":[null,"デスクトップ通知"],"Enable":[null,"有効にする"],"Denied - check your browser settings":[null,"拒否 - ブラウザ設定を確認して下さい"],"Allowed":[null,"許可"],"Advanced settings":[null,"詳細設定"],"Stereo audio":[null,"ステレオ・オーディオ"],"Max video frame rate":[null,"ビデオ最高フレームレート"],"auto":[null,"自動"],"Experimental settings":[null,"試験的に設定"],"Show advanced settings":[null,"詳細設定を表示"],"Hide advanced settings":[null,"詳細設定を隠す"],"Remember settings":[null,"設定を保存"],"Apply":[null,"適用"],"Share by Email":[null,"Eメールでシェア"],"Share on Facebook":[null,"フェイスブックでシェア"],"Share on Twitter":[null,"ツィッターでシェア"],"Share on Google Plus":[null,"Google+でシェア"],"Share on XING":[null,"XINGでシェア"],"Initializing":[null,"初期化中"],"Online":[null,"オンライン"],"Calling":[null,"発信中"],"Hangup":[null,"切断"],"In call with":[null,"と会話中"],"Conference with":[null,"と会議中"],"Your are offline":[null,"オフラインです"],"Go online":[null,"オンラインにする"],"Connection interrupted":[null,"接続は中断されました"],"An error occured":[null,"エラーが発生しました"],"Incoming call":[null,"着信中"],"from":[null,"から"],"Accept call":[null,"通話"],"Reject":[null,"拒否"],"Waiting for camera/microphone access":[null,"カメラ・マイクの接続待ち."],"Please wait":[null,"お待ちください"],"Checking camera and microphone access.":[null,"カメラ・マイクの接続確認中."],"Please allow access to your camera and microphone.":[null,"カメラとマイクの接続を許可してください."],"Camera / microphone access required.":[null,"カメラ・マイクの接続が必要です."],"Please check your browser settings and allow camera and microphone access for this site.":[null,"ブラウザ設定で、このサイトへのカメラ・マイクの接続を許可してください."],"Skip check":[null,"チェックをスキップ"],"Click here for help (Google Chrome).":[null,"ここをクリックしてヘルプ表示(Google Chrome)"],"Please set your user details and settings.":[null,"あなたのプロフィールとアプリの動作を設定してください."],"Please note that some settings require you to reload or to make a new call to become effective.":[null,"いくつかの設定は、再読み込みもしくは次回の発信から有効です."],"Create your room":[null,"自分のルームを作成する"],"This is your room link:":[null,"あなたのルームへのリンク:"],"Creating room link ...":[null,"ルームへのリンクを作る..."],"Start":[null,"開始"],"Just click start":[null,"クリックして開始"],"Share this URL with the people you want to meet.":[null,"会いたい人とURLをシェアする."],"You can use and re-use this room as many times as you want.":[null,"ルームは何回でも好きなだけ使えます."],"Peer to peer chat active.":[null,"ピア・ツー・ピア・チャットがアクティブです."],"Peer to peer chat is now off.":[null,"ピア・ツー・ピア・チャットがオフです."]," is now offline.":[null,"は今オフラインです"]," is now online.":[null,"は今オンラインです"],"You share file:":[null,"あなたの共有ファイル:"],"Incoming file:":[null,"受信中ファイル:"],"Quit from Spreed Speak Freely?":[null,"Spreed Speak Freelyを終了しますか?"],"Restart required to apply updates. Click ok to restart now.":[null,"アップデート適用のため再起動してください.ここをクリックして再起動する."],"Failed to access camera/microphone.":[null,"カメラ・マイクへの接続に失敗しました."],"Failed to establish peer connection.":[null,"ピアとの接続に失敗しました."],"We are sorry but something went wrong. Boo boo.":[null,"申し訳ないのですが、不具合が生じました。"],"Oops":[null,"しまった"],"Peer connection failed. Check your settings.":[null,"ピア接続に失敗しました.設定を確認してください."],"User hung up because of error.":[null,"エラーのため切断しました."]," is busy. Try again later.":[null,"は話中です.後で掛けなおしてください."]," rejected your call.":[null,"着信拒否されました."]," does not pick up.":[null,"は電話にでません."]," tried to call you.":[null,"は電話しようとしました."]," called you.":[null,"から電話がありました."],"Your browser does not support WebRTC. No calls possible.":[null,"ブラウザがWebRTCをサポートしていない為通話はできません."],"Chat with":[null,"とチャットする"],"Message from ":[null,"からのメッセージ"],"You are now in room %s ...":[null,"あなたは%sのルームにいます..."],"Your browser does not support file transfer.":[null,"ブラウザがファイル転送をサポートしていません."],"Permission to start screen sharing was denied. Make sure to have enabled screen sharing access for your browser. Copy chrome://flags/#enable-usermedia-screen-capture and open it with your browser and enable the flag on top. Then restart the browser and you are ready to go.":[null,"画面共有は拒否されました.ブラウザの画面共有の設定を確認して下さい. Chromeのアドレスバーに chrome://flags/#enable-usermedia-screen-capture を入力して開き、スクリーンキャプチャのサポートを有効にしてください。その後ブラウザを再起動してください。"],"Use browser language":[null,"ブラウザの言語を使用"],"Meet with me here:":[null,"ここで私と会う:"],"Error":[null,"エラー"],"Hint":[null,"ヒント"],"Please confirm":[null,"確認して下さい"],"More information required":[null,"さらなる情報が必要です"],"Ok":[null,"OK"],"Close":[null,"閉じる"],"Access code required":[null,"アクセスコードが必要です"],"Access denied":[null,"アクセスが拒否されました"],"Please provide a valid access code.":[null,"有効なアクセスコードを入力してください."],"Failed to verify access code. Check your Internet connection and try again.":[null,"アクセスコードの確認に失敗しました.インターネット接続を確認してリトライしてください."],"and %s":[null,"と %2"],"and %d others":[null,""],"User":[null,"ユーザー"],"Someone":[null,"誰か"],"Me":[null,"私"]}}} \ No newline at end of file From eb8f98c3fdb5721725b5fb2b891900358211aa95 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 16:37:00 +0200 Subject: [PATCH 28/44] Fixed text shadow in overlayAction buttons. --- src/styles/components/_audiovideo.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index 1ed69a23..4337d6cc 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -159,7 +159,7 @@ } .audiovideo { - + .remoteVideo { display: inline-block; width:100%; @@ -243,7 +243,6 @@ width:40px; padding:3px 0; background: rgba(0,0,0,0.2); - text-shadow: 0 0 5px black; z-index:5; opacity:0; @@ -252,6 +251,7 @@ display: block; color:#ccc; cursor:pointer; + text-shadow: 0 0 5px black; } } From 36fcf3a4626ad65e17b21bce08cc391becbb323b Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 17:04:31 +0200 Subject: [PATCH 29/44] Updated dynamic styles to work with new renderer styles. --- src/styles/components/_audiovideo.scss | 4 ++++ static/js/services/videolayout.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index 4337d6cc..ecb3e273 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -163,6 +163,7 @@ .remoteVideo { display: inline-block; width:100%; + max-width:100%; max-height:100%; vertical-align:bottom; position:relative; @@ -320,6 +321,9 @@ } } +.renderer-onepeople { +} + .renderer-conferencekiosk { .remoteVideos { top:auto; diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index 56617ccb..3dcef9c0 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -125,7 +125,7 @@ define(["jquery", "underscore"], function($, _) { container.style.width = newContainerWidth + "px"; container.style.left = ((innerWidth - newContainerWidth) / 2) + 'px'; extraCSS = { - "#remoteVideos": { + ".renderer-onepeople .remoteVideos": { ">div": { width: singleVideoWidth+"px", height: singleVideoHeight+"px" From d215a037064837466509491055ba64ed91d9342b Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 17:14:47 +0200 Subject: [PATCH 30/44] Onlye hangup call when really onloading and not before. --- static/js/mediastream/webrtc.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/static/js/mediastream/webrtc.js b/static/js/mediastream/webrtc.js index f0c76d14..85101913 100644 --- a/static/js/mediastream/webrtc.js +++ b/static/js/mediastream/webrtc.js @@ -90,18 +90,12 @@ define([ this.api.e.bind("received.offer received.candidate received.answer received.bye received.conference", _.bind(this.processReceived, this)); - window.onbeforeunload = _.bind(function() { - if (this.currentcall) { - this.currentcall.close(); - this.api.sendBye(this.currentcall.id); - } - if (this.currentconference) { - this.currentconference.close(); - } + $(window).on("unload", _.bind(function() { + this.doHangup("unload"); if (this.api.connector) { this.api.connector.disabled = true; } - }, this); + }, this)); // Create default media (audio/video). this.usermedia = new UserMedia(); From 7d8ebcc35afcd0818088ec72cd7a5c5588057157 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 17:15:31 +0200 Subject: [PATCH 31/44] Brought back pointer events in remote videos on kiosk view. --- src/styles/components/_audiovideo.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index ecb3e273..de9f9598 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -332,6 +332,7 @@ background:rgba(0,0,0,0.4); padding-right:192px; min-height:108px; + pointer-events:auto; >div { height:108px; width:192px; From 579d124707b20be6ab198541a33ea94a7178c4b1 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 17:24:36 +0200 Subject: [PATCH 32/44] Improved visibility of overlay actions. --- src/styles/components/_audiovideo.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index de9f9598..dd57764b 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -243,7 +243,7 @@ margin:auto 0; width:40px; padding:3px 0; - background: rgba(0,0,0,0.2); + background: rgba(0,0,0,0.9); z-index:5; opacity:0; @@ -253,6 +253,7 @@ color:#ccc; cursor:pointer; text-shadow: 0 0 5px black; + outline: 0; } } From 6d228f5dcfc4f9e31ef5eadd490908e84baf4199 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 17:58:19 +0200 Subject: [PATCH 33/44] Make sure that there is enough room for videos in kiosk mode and scroll if there isnt. --- src/styles/components/_audiovideo.scss | 2 +- static/js/services/videolayout.js | 20 +++++++++++++++++++- static/partials/audiovideo.html | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index dd57764b..38e61900 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -331,9 +331,9 @@ bottom:2px; text-align:center; background:rgba(0,0,0,0.4); - padding-right:192px; min-height:108px; pointer-events:auto; + white-space:nowrap; >div { height:108px; width:192px; diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index 3dcef9c0..1fd36af2 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -90,13 +90,13 @@ define(["jquery", "underscore"], function($, _) { //console.log("resize", innerHeight, innerWidth); //console.log("resize", container, videos.length, aspectRatio, innerHeight, innerWidth); + var extraCSS = {}; if (videos.length === 1) { var newVideoWidth = innerWidth < aspectRatio * innerHeight ? innerWidth : aspectRatio * innerHeight; var newVideoHeight = innerHeight < innerWidth / aspectRatio ? innerHeight : innerWidth / aspectRatio; container.style.width = newVideoWidth + 'px'; container.style.left = ((innerWidth - newVideoWidth) / 2) + 'px'; - var extraCSS = {}; } else { var space = innerHeight*innerWidth; // square pixels var videoSpace = space/videos.length; @@ -166,6 +166,7 @@ define(["jquery", "underscore"], function($, _) { this.big = null; this.remoteVideos.on("click", ".remoteVideo", _.bind(function(event) { if ($(event.currentTarget).hasClass("remoteVideo")) { + event.stopPropagation(); this.makeBig($(event.currentTarget)); } }, this)); @@ -214,6 +215,7 @@ define(["jquery", "underscore"], function($, _) { var aspectRatio = remoteSize.width/remoteSize.height; var innerHeight = size.height - 110; var innerWidth = size.width; + var extraCSS = {}; var bigVideoWidth = innerWidth < aspectRatio * innerHeight ? innerWidth : aspectRatio * innerHeight; var bigVideoHeight = innerHeight < innerWidth / aspectRatio ? innerHeight : innerWidth / aspectRatio; @@ -221,6 +223,22 @@ define(["jquery", "underscore"], function($, _) { this.bigVideo.style.width = bigVideoWidth + 'px'; this.bigVideo.style.height = bigVideoHeight + 'px'; + // Make space for own video on the right if width goes low. + if (((size.width - (videos.length-1) * 192) / 2) < 192) { + extraCSS = { + ".renderer-conferencekiosk .remoteVideos": { + "margin-right": "192px", + "overflow-x": "auto", + "overflow-y": "hidden" + } + }; + } + + $.injectCSS(extraCSS, { + truncateFirst: true, + containerName: dynamicCSSContainer + }); + }; ConferenceKiosk.prototype.close = function(container, scope, controller) { diff --git a/static/partials/audiovideo.html b/static/partials/audiovideo.html index 8804203c..87105c09 100644 --- a/static/partials/audiovideo.html +++ b/static/partials/audiovideo.html @@ -5,7 +5,7 @@
-
+
From 1f875e728c98382ce7ba7971a9558a72352d449c Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 24 Apr 2014 18:05:41 +0200 Subject: [PATCH 34/44] Prepare for 0.17.4 release. --- debian/changelog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index 768200bf..22da6bac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +spreed-speakfreely-server (0.17.4) precise; urgency=low + + * Updated Japanese translation. + * Allow Makefile variables CONFIG_FILE and CONFIG_PATH. + * Fixed a possible conference connection issue when all ICE connected were successfull. + * Videos are now properly aligned to window top. + * Top bar buttons no longer overlap. + * Use onepeople audio video renderer per default. + * Added support for native HTTPS server. + * Fixed a data channel not ready error. + * Use new video layout implementation to draw when there is a main view. + * Added UI controls to switch video layout. + * Made the conferencekiosk renderer mode working and enabled it in Ui. + * Use new websocket.Upgraded API. + * No longer hang up on reload when not confirmed. + + -- Simon Eisenmann Thu, 24 Apr 2014 17:59:05 +0200 + spreed-speakfreely-server (0.17.3) precise; urgency=low * Buddy images are now loaded with seperate URL calls. From 270cf9e3df0cf72eee02a53e7b2f269de87ccf34 Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Fri, 25 Apr 2014 15:47:33 +0200 Subject: [PATCH 35/44] Move colors to variables. --- src/styles/global/{_colors.scss => _variables.scss} | 12 ++++++++++++ src/styles/main.scss | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) rename src/styles/global/{_colors.scss => _variables.scss} (86%) diff --git a/src/styles/global/_colors.scss b/src/styles/global/_variables.scss similarity index 86% rename from src/styles/global/_colors.scss rename to src/styles/global/_variables.scss index d19e2208..592160e3 100644 --- a/src/styles/global/_colors.scss +++ b/src/styles/global/_variables.scss @@ -29,3 +29,15 @@ $bordercolor: #ccc; $actioncolor1: rgb(132,184,25); $actioncolor2: rgb(0,149,52); +//rgba(0,0,0,.4) +//rgba(0,0,0,.3) +//rgba(0,0,0,.2) +//#ccc +//#222 +//#db4f39 +//#84b819 + +$breakpoint-small: 480px; +$breakpoint-medium: 700px; +$breakpoint-large: 1280px; + diff --git a/src/styles/main.scss b/src/styles/main.scss index 688ab7f4..a310e18d 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -23,7 +23,8 @@ @import "libs/libs"; -@import "global/colors"; +@import "global/variables"; +@import "global/mixins"; @import "global/base"; @import "global/angular"; From 596dfc31480f836168218f932c55497d8b13d45b Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Fri, 25 Apr 2014 15:48:07 +0200 Subject: [PATCH 36/44] Required mixins. --- src/styles/global/_mixins.scss | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/styles/global/_mixins.scss diff --git a/src/styles/global/_mixins.scss b/src/styles/global/_mixins.scss new file mode 100644 index 00000000..ff34e400 --- /dev/null +++ b/src/styles/global/_mixins.scss @@ -0,0 +1,23 @@ + +@mixin breakpt($pt) { + @media (max-width: $pt) { + @content; + } +} + +@mixin user-select($select) { + -khtml-user-select: $select; + -moz-user-select: $select; + -ms-user-select: $select; + -webkit-user-select: $select; + user-select: $select; +} + +@mixin touch-callout($callout) { + -webkit-touch-callout: $callout; +} + +@mixin box-shadow($shadow) { + -webkit-box-shadow: $shadow; + box-shadow: $shadow; +} From 21218a0a30b9550cc3397ef94bdff32e0eb9f19a Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Fri, 25 Apr 2014 15:49:19 +0200 Subject: [PATCH 37/44] Use mixins and format css. --- src/styles/components/_bar.scss | 326 +++++++++++++++++--------------- 1 file changed, 172 insertions(+), 154 deletions(-) diff --git a/src/styles/components/_bar.scss b/src/styles/components/_bar.scss index 10b17f08..9c8c296c 100644 --- a/src/styles/components/_bar.scss +++ b/src/styles/components/_bar.scss @@ -18,167 +18,185 @@ * along with this program. If not, see . * */ + #bar { --webkit-box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2); -box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2); -position: absolute; -top: 0; -left: 0; -right: 0; -min-height: 44px; -background-color: $componentbg; -color: $componentfg1; -font-size: 1em; -font-weight: bold; -line-height: 40px; -text-align: center; --webkit-touch-callout: none; --webkit-user-select: none; --khtml-user-select: none; --moz-user-select: none; --ms-user-select: none; -user-select: none; -z-index:5; -} -#bar > .left { -position: absolute; -left:0px; -top:0px; -bottom:0px; -padding-left:12px; -} -#bar .logo { -font-size:11px; -line-height:11px; -font-weight:normal; -color:black; -width:90px; -height:32px; -background-size:100%; -background-repeat:no-repeat; -background-image:url(../img/logo-small.png); -display:inline-block; -text-align:left; -} -#bar .logo > span { -position: relative; -left: 38px; -top: 26px; -font-style: italic; -} -#bar .logo > span a { -color:#222; -} -#bar > .right { -position: absolute; -right:0px; -top:1px; -bottom:1px; -padding-right:8px; -} -#bar > .left > *, #bar > .right > * { -vertical-align: middle; -} -#bar > .right .btn { -border-color:transparent; -background:transparent; -color:rgba(0,0,0,0.3); -height:42px; -width:42px; -display: inline-block; -font-size:24px; -padding:0px; -line-height:40px; -text-align:center; -margin-left:-4px; -} -#bar > .right .btn:focus { -border: none; -box-shadow: 0; -outline: none; -} -#bar > .right .btn:hover { -border-color: #ccc; -background-color:none; -color:rgba(0,0,0,0.4); -} -#bar > .right .btn.active { -border-color: #ccc; -background-color:none; -color:rgba(0,0,0,0.4); -} -#bar > .right .btn.active.amutebtn { -background-color: #db4f39; -border-color: #db4f39; -color: white; -} -#bar > .right .btn.active.aenablebtn { -background-color: #84b819; -border-color: #84b819; -color: white; -} -#bar .btn { -position:relative; -} -#bar .badge { -background-color: #84b819; -font-size:.4em; -position:absolute; -right:0px; -top:2px; -border:1px solid white; -} -#bar .userpicture { -margin:-5px 0.5em 0px 0.5em; -width:46px; -height:46px; -border-radius:2px; -display:inline-block; -} -#bar > .middle { -z-index:5; -background-color: $componentbg; -display:inline-block; -padding:0 1em; -position:relative; -min-height: 44px; -vertical-align:middle; -margin-left:-70px; + position: absolute; + top: 0; + left: 0; + right: 0; + min-height: 44px; + background-color: $componentbg; + color: $componentfg1; + font-size: 1em; + font-weight: bold; + line-height: 40px; + text-align: center; + z-index: 5; + @include box-shadow(0 2px 10px 0 rgba(0,0,0,.2)); + @include touch-callout(none); + @include user-select(none); + > .left { + position: absolute; + left: 0; + top: 0; + bottom: 0; + padding-left: 12px; + // TODO(theurere): cleanup + > *, #bar > .right > * { + vertical-align: middle; + } + } + .logo { + font-size: 11px; + line-height: 11px; + font-weight:normal; + color: black; + width: 90px; + height: 32px; + background-size: 100%; + background-repeat: no-repeat; + background-image: url(../img/logo-small.png); + display: inline-block; + text-align: left; + > span { + position: relative; + left: 38px; + top: 26px; + font-style: italic; + } + > span a { + color: #222; + } + } } -@media all and (max-width: 700px) { - #bar { - z-index:40; - -webkit-box-shadow: none; - box-shadow: none; +#bar { + > .right { + position: absolute; + right: 0; + top: 1px; + bottom: 1px; + padding-right: 8px; + .btn { + border-color: transparent; + background: transparent; + color: rgba(0,0,0,.3); + height: 42px; + width: 42px; + display: inline-block; + font-size: 24px; + padding: 0; + line-height: 40px; + text-align: center; + margin-left: -4px; } - #bar > .middle.status-connecting, #bar > .middle.status-closed, #bar > .middle.status-reconnecting, #bar > .middle.status-error, #bar > .middle.status-ringing { - max-width:100%; - border-bottom:1px solid $bordercolor; - .actions { - display: block; - padding:.2em 0 .8em 0; - } - min-height: 45px; + .btn:focus { + border: none; + box-shadow: 0; + outline: none; } - #bar > .middle.status-connected, #bar > .middle.status-conference { - position:absolute; - left:0px; - right:0px; - max-width:100%; + .btn:hover { + border-color: #ccc; + background-color: none; + color: rgba(0,0,0,.4); } - #bar > .middle { - display:block; - max-width:40%; - overflow:hidden; - text-overflow:ellipsis; - white-space:nowrap; - margin-left:0px; - - img { - display:none; - } + .btn.active { + border-color: #ccc; + background-color: none; + color: rgba(0,0,0,.4); + } + .btn.active.amutebtn { + background-color: #db4f39; + border-color: #db4f39; + color: white; } + .btn.active.aenablebtn { + background-color: #84b819; + border-color: #84b819; + color: white; + } + } +} +#bar { + .btn { + position: relative; + } + .badge { + background-color: #84b819; + font-size: .4em; + position: absolute; + right: 0; + top: 2px; + border: 1px solid white; + } + .userpicture { + margin: -5px .5em 0 .5em; + width: 46px; + height: 46px; + border-radius: 2px; + display: inline-block; + } + > .middle { + z-index: 5; + background-color: $componentbg; + display: inline-block; + padding: 0 1em; + position: relative; + min-height: 44px; + vertical-align: middle; + margin-left: -70px; + @include breakpt($breakpoint-medium) { + display: block; + max-width: 40%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-left: 0px; + } + } } +#bar { + @include breakpt($breakpoint-medium) { + z-index: 40; + -webkit-box-shadow: none; + box-shadow: none; + } + > .middle img { + @include breakpt($breakpoint-medium) { + display: none; + } + } + > .middle.status-connected, + > .middle.status-conference { + @include breakpt($breakpoint-medium) { + position: absolute; + left: 0; + right: 0; + max-width: 100%; + } + } + > .middle.status-connecting, + > .middle.status-closed, + > .middle.status-reconnecting, + > .middle.status-error, + > .middle.status-ringing { + @include breakpt($breakpoint-medium) { + max-width: 100%; + border-bottom: 1px solid $bordercolor; + min-height: 45px; + } + } + // TODO(theurere): cleanup + > .middle.status-connecting .actions, + > .middle.status-closed .actions, + > .middle.status-reconnecting .actions, + > .middle.status-error .actions, + > .middle.status-ringing .actions { + @include breakpt($breakpoint-medium) { + display: block; + padding: .2em 0 .8em 0; + } + } +} From f5a54b264fb4c93d853f7ddfc48292a7dae54f76 Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Fri, 25 Apr 2014 16:21:31 +0200 Subject: [PATCH 38/44] Color pallete of site to easily compare color values. --- src/styles/color-pallete.html | 90 +++++++++++++++++++++++++++++++ src/styles/global/_variables.scss | 6 +-- 2 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 src/styles/color-pallete.html diff --git a/src/styles/color-pallete.html b/src/styles/color-pallete.html new file mode 100644 index 00000000..f5de250d --- /dev/null +++ b/src/styles/color-pallete.html @@ -0,0 +1,90 @@ + +CSS site color pallete + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ $background: #e5e5e5 + + $componentbg: #f5f5f5 + + $componentfg1: #262626 +
+ $componentfg2: rgba(0,0,0,.5) + + $componentfg3: rgba(0,0,0,.2) + + $componentfg4: #737373 +
+ $sidepanebg: white + + $bordercolor: #ccc + + $actioncolor1: rgb(132,184,25) +
+ $actioncolor2: rgb(0,149,52) + + none: #222 + + none: #db4f39 +
+ none: #84b819 +
diff --git a/src/styles/global/_variables.scss b/src/styles/global/_variables.scss index 592160e3..2fb1c417 100644 --- a/src/styles/global/_variables.scss +++ b/src/styles/global/_variables.scss @@ -22,6 +22,8 @@ $background: #e5e5e5; $componentbg: #f5f5f5; $componentfg1: #262626; $componentfg2: rgba(0,0,0,.5); +//rgba(0,0,0,.4) +//rgba(0,0,0,.3) $componentfg3: rgba(0,0,0,.2); $componentfg4: #737373; $sidepanebg: white; @@ -29,10 +31,6 @@ $bordercolor: #ccc; $actioncolor1: rgb(132,184,25); $actioncolor2: rgb(0,149,52); -//rgba(0,0,0,.4) -//rgba(0,0,0,.3) -//rgba(0,0,0,.2) -//#ccc //#222 //#db4f39 //#84b819 From 5667210a72ef8a3b4751969e723cb9245a5919cb Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Fri, 25 Apr 2014 17:00:33 +0200 Subject: [PATCH 39/44] Create color variables. --- src/styles/color-pallete.html | 12 +++++++++++- src/styles/components/_bar.scss | 20 ++++++++++---------- src/styles/global/_variables.scss | 23 +++++++++++------------ 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/src/styles/color-pallete.html b/src/styles/color-pallete.html index f5de250d..aa31808f 100644 --- a/src/styles/color-pallete.html +++ b/src/styles/color-pallete.html @@ -3,13 +3,15 @@ @@ -83,8 +85,16 @@ none: #84b819 + + none: rgba(0,0,0,.4) + + + none: rgba(0,0,0,.3) + + + diff --git a/src/styles/components/_bar.scss b/src/styles/components/_bar.scss index 9c8c296c..5ea8604f 100644 --- a/src/styles/components/_bar.scss +++ b/src/styles/components/_bar.scss @@ -32,7 +32,7 @@ line-height: 40px; text-align: center; z-index: 5; - @include box-shadow(0 2px 10px 0 rgba(0,0,0,.2)); + @include box-shadow(0 2px 10px 0 $componentfg3); @include touch-callout(none); @include user-select(none); > .left { @@ -65,7 +65,7 @@ font-style: italic; } > span a { - color: #222; + color: $dgrey; } } } @@ -80,7 +80,7 @@ .btn { border-color: transparent; background: transparent; - color: rgba(0,0,0,.3); + color: $grey3; height: 42px; width: 42px; display: inline-block; @@ -98,21 +98,21 @@ .btn:hover { border-color: #ccc; background-color: none; - color: rgba(0,0,0,.4); + color: $grey4; } .btn.active { border-color: #ccc; background-color: none; - color: rgba(0,0,0,.4); + color: $grey4; } .btn.active.amutebtn { - background-color: #db4f39; - border-color: #db4f39; + background-color: $red; + border-color: $red; color: white; } .btn.active.aenablebtn { - background-color: #84b819; - border-color: #84b819; + background-color: $actioncolor1; + border-color: $actioncolor1; color: white; } } @@ -123,7 +123,7 @@ position: relative; } .badge { - background-color: #84b819; + background-color: $actioncolor1; font-size: .4em; position: absolute; right: 0; diff --git a/src/styles/global/_variables.scss b/src/styles/global/_variables.scss index 2fb1c417..c5870cca 100644 --- a/src/styles/global/_variables.scss +++ b/src/styles/global/_variables.scss @@ -18,22 +18,21 @@ * along with this program. If not, see . * */ -$background: #e5e5e5; -$componentbg: #f5f5f5; -$componentfg1: #262626; +$background: rgb(229, 229, 229); +$componentbg: rgb(245, 245, 245); +$componentfg1: rgb(38, 38, 38); $componentfg2: rgba(0,0,0,.5); -//rgba(0,0,0,.4) -//rgba(0,0,0,.3) -$componentfg3: rgba(0,0,0,.2); -$componentfg4: #737373; +$componentfg3: rgba(0,0,0,.2); //#ccc +$componentfg4: rgb(115, 115, 115); $sidepanebg: white; -$bordercolor: #ccc; -$actioncolor1: rgb(132,184,25); +$bordercolor: $componentfg3; +$actioncolor1: rgb(132,184,25); //#84b819 $actioncolor2: rgb(0,149,52); -//#222 -//#db4f39 -//#84b819 +$grey3: rgba(0,0,0,.3); +$grey4: rgba(0,0,0,.4); +$dgrey: rgb(34,34,34); +$red: rgb(219,79,57); $breakpoint-small: 480px; $breakpoint-medium: 700px; From 4682fd1a94b57e11c4e9e947e30b38018bd3933a Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Mon, 28 Apr 2014 10:14:18 +0200 Subject: [PATCH 40/44] Create font variable. --- src/styles/global/_base.scss | 4 ++-- src/styles/global/_variables.scss | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/styles/global/_base.scss b/src/styles/global/_base.scss index 38e493e0..ab4a0176 100644 --- a/src/styles/global/_base.scss +++ b/src/styles/global/_base.scss @@ -22,7 +22,7 @@ html, body { background-color: $background; background-clip: padding-box; height: 100%; -font: normal 13px "Helvetica Neue",Helvetica,Arial,sans-serif; +font: normal $base-font-size $font-sans-serif; } body { margin: 0; @@ -125,4 +125,4 @@ z-index:0; text-shadow: 0 0 5px black; font-size:1.1em; margin-top:80px; -} \ No newline at end of file +} diff --git a/src/styles/global/_variables.scss b/src/styles/global/_variables.scss index c5870cca..5c7afc38 100644 --- a/src/styles/global/_variables.scss +++ b/src/styles/global/_variables.scss @@ -38,3 +38,5 @@ $breakpoint-small: 480px; $breakpoint-medium: 700px; $breakpoint-large: 1280px; +$font-sans-serif: "Helvetica Neue",Helvetica,Arial,sans-serif; +$base-font-size: 13px; From 6f70e2904f5496450a2892a568f28f765863d37b Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Mon, 28 Apr 2014 10:22:59 +0200 Subject: [PATCH 41/44] Improved ordering. --- src/styles/components/_bar.scss | 72 ++++++++++++++++----------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/styles/components/_bar.scss b/src/styles/components/_bar.scss index 5ea8604f..d1e7a474 100644 --- a/src/styles/components/_bar.scss +++ b/src/styles/components/_bar.scss @@ -20,49 +20,49 @@ */ #bar { - position: absolute; - top: 0; - left: 0; - right: 0; - min-height: 44px; background-color: $componentbg; color: $componentfg1; font-size: 1em; font-weight: bold; line-height: 40px; + left: 0; + min-height: 44px; + position: absolute; + right: 0; + top: 0; text-align: center; z-index: 5; @include box-shadow(0 2px 10px 0 $componentfg3); @include touch-callout(none); @include user-select(none); > .left { - position: absolute; + bottom: 0; left: 0; top: 0; - bottom: 0; padding-left: 12px; + position: absolute; // TODO(theurere): cleanup > *, #bar > .right > * { vertical-align: middle; } } .logo { - font-size: 11px; - line-height: 11px; - font-weight:normal; - color: black; - width: 90px; - height: 32px; background-size: 100%; background-repeat: no-repeat; background-image: url(../img/logo-small.png); display: inline-block; + color: black; + font-size: 11px; + font-weight:normal; + height: 32px; + line-height: 11px; text-align: left; + width: 90px; > span { - position: relative; + font-style: italic; left: 38px; + position: relative; top: 26px; - font-style: italic; } > span a { color: $dgrey; @@ -72,23 +72,23 @@ #bar { > .right { + bottom: 1px; + padding-right: 8px; position: absolute; right: 0; top: 1px; - bottom: 1px; - padding-right: 8px; .btn { - border-color: transparent; background: transparent; + border-color: transparent; color: $grey3; - height: 42px; - width: 42px; display: inline-block; font-size: 24px; - padding: 0; + height: 42px; line-height: 40px; - text-align: center; margin-left: -4px; + padding: 0; + text-align: center; + width: 42px; } .btn:focus { border: none; @@ -96,13 +96,13 @@ outline: none; } .btn:hover { - border-color: #ccc; background-color: none; + border-color: #ccc; color: $grey4; } .btn.active { - border-color: #ccc; background-color: none; + border-color: #ccc; color: $grey4; } .btn.active.amutebtn { @@ -124,44 +124,44 @@ } .badge { background-color: $actioncolor1; + border: 1px solid white; font-size: .4em; position: absolute; right: 0; top: 2px; - border: 1px solid white; } .userpicture { - margin: -5px .5em 0 .5em; - width: 46px; - height: 46px; border-radius: 2px; display: inline-block; + height: 46px; + margin: -5px .5em 0 .5em; + width: 46px; } > .middle { - z-index: 5; background-color: $componentbg; display: inline-block; + min-height: 44px; padding: 0 1em; position: relative; - min-height: 44px; - vertical-align: middle; margin-left: -70px; + vertical-align: middle; + z-index: 5; @include breakpt($breakpoint-medium) { display: block; + margin-left: 0px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - margin-left: 0px; } } } #bar { @include breakpt($breakpoint-medium) { - z-index: 40; -webkit-box-shadow: none; box-shadow: none; + z-index: 40; } > .middle img { @include breakpt($breakpoint-medium) { @@ -171,10 +171,10 @@ > .middle.status-connected, > .middle.status-conference { @include breakpt($breakpoint-medium) { - position: absolute; + max-width: 100%; left: 0; + position: absolute; right: 0; - max-width: 100%; } } > .middle.status-connecting, @@ -183,8 +183,8 @@ > .middle.status-error, > .middle.status-ringing { @include breakpt($breakpoint-medium) { - max-width: 100%; border-bottom: 1px solid $bordercolor; + max-width: 100%; min-height: 45px; } } From 2dbe2cefecb754c3fc9c7101b8a4ad8ff95492c9 Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Mon, 28 Apr 2014 10:27:28 +0200 Subject: [PATCH 42/44] Replace box-shadow instances with mixin. --- src/styles/components/_bar.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/styles/components/_bar.scss b/src/styles/components/_bar.scss index d1e7a474..6ac88b19 100644 --- a/src/styles/components/_bar.scss +++ b/src/styles/components/_bar.scss @@ -92,7 +92,7 @@ } .btn:focus { border: none; - box-shadow: 0; + @include box-shadow(0); outline: none; } .btn:hover { @@ -159,9 +159,8 @@ #bar { @include breakpt($breakpoint-medium) { - -webkit-box-shadow: none; - box-shadow: none; z-index: 40; + @include box-shadow(none); } > .middle img { @include breakpt($breakpoint-medium) { From f41b36b0e7748cfcc220b43002bbf74858c62547 Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Mon, 28 Apr 2014 10:35:17 +0200 Subject: [PATCH 43/44] Compact font and background. --- src/styles/components/_bar.scss | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/styles/components/_bar.scss b/src/styles/components/_bar.scss index 6ac88b19..e68caede 100644 --- a/src/styles/components/_bar.scss +++ b/src/styles/components/_bar.scss @@ -22,9 +22,7 @@ #bar { background-color: $componentbg; color: $componentfg1; - font-size: 1em; - font-weight: bold; - line-height: 40px; + font: bold 1em/40px $font-sans-serif; left: 0; min-height: 44px; position: absolute; @@ -47,15 +45,12 @@ } } .logo { + background: url(../img/logo-small.png) no-repeat; background-size: 100%; - background-repeat: no-repeat; - background-image: url(../img/logo-small.png); display: inline-block; color: black; - font-size: 11px; - font-weight:normal; + font: normal 11px/11px $font-sans-serif; height: 32px; - line-height: 11px; text-align: left; width: 90px; > span { @@ -82,9 +77,8 @@ border-color: transparent; color: $grey3; display: inline-block; - font-size: 24px; + font: 24px/40px $font-sans-serif; height: 42px; - line-height: 40px; margin-left: -4px; padding: 0; text-align: center; From 736096161798b48df74c497736e75a0b68fd805d Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Mon, 28 Apr 2014 10:41:44 +0200 Subject: [PATCH 44/44] Revert to original color declaration type. --- src/styles/global/_variables.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/styles/global/_variables.scss b/src/styles/global/_variables.scss index 5c7afc38..a4774256 100644 --- a/src/styles/global/_variables.scss +++ b/src/styles/global/_variables.scss @@ -18,15 +18,15 @@ * along with this program. If not, see . * */ -$background: rgb(229, 229, 229); -$componentbg: rgb(245, 245, 245); -$componentfg1: rgb(38, 38, 38); +$background: #e5e5e5; +$componentbg: #f5f5f5; +$componentfg1: #262626; $componentfg2: rgba(0,0,0,.5); $componentfg3: rgba(0,0,0,.2); //#ccc -$componentfg4: rgb(115, 115, 115); +$componentfg4: #737373; $sidepanebg: white; -$bordercolor: $componentfg3; -$actioncolor1: rgb(132,184,25); //#84b819 +$bordercolor: #ccc; +$actioncolor1: rgb(132,184,25); $actioncolor2: rgb(0,149,52); $grey3: rgba(0,0,0,.3);