Bug 1101378 - self-image can be cropped, meaning the user doesn't see the entire sent images, r=NiKo` a=lsblakk
authorDan Mosedale <dmose@meer.net>
Fri, 12 Dec 2014 11:01:27 -0800
changeset 242445 9d18b94c716efdd0a98f4e6a2396a88a2a9d0d99
parent 242444 0891d8dfe59452f6761c0679f189b759ef5c4b23
child 242446 fa86f0e36b598558a15299816400ccef1494f783
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNiKo, lsblakk
bugs1101378
milestone36.0a2
Bug 1101378 - self-image can be cropped, meaning the user doesn't see the entire sent images, r=NiKo` a=lsblakk
browser/components/loop/content/shared/css/conversation.css
--- a/browser/components/loop/content/shared/css/conversation.css
+++ b/browser/components/loop/content/shared/css/conversation.css
@@ -507,16 +507,46 @@
 .local-stream-audio .OT_publisher .OT_video-poster {
   background-image: url("../img/audio-call-avatar.svg");
   background-repeat: no-repeat;
   background-color: #4BA6E7;
   background-size: contain;
   background-position: center;
 }
 
+/*
+ * Ensure that the publisher (i.e. local) video is never cropped, so that it's
+ * not possible for someone to be presented with a picture that displays
+ * (for example) a person from the neck up, even though the camera is capturing
+ * and transmitting a picture of that person from the waist up.
+ *
+ * The !importants are necessary to override the SDK attempts to avoid
+ * letterboxing entirely.
+ *
+ * If we could easily use test video streams with the SDK (eg if initPublisher
+ * supported something like a "testMediaToStreamURI" parameter that it would
+ * use to source the stream rather than the output of gUM, it wouldn't be too
+ * hard to generate a video with a 1 pixel border at the edges that one could
+ * at least visually see wasn't being cropped.
+ *
+ * Another less ugly possibility would be to work with Ted Mielczarek to use
+ * the fake camera drivers he has for Linux.
+ */
+.room-conversation .OT_publisher .OT_video-container {
+  height: 100% !important;
+  width: 100% !important;
+  top: 0 !important;
+  left: 0 !important;
+  background-color: transparent; /* avoid visually obvious letterboxing */
+}
+
+.room-conversation .OT_publisher .OT_video-container video {
+  background-color: transparent; /* avoid visually obvious letterboxing */
+}
+
 .fx-embedded .media.nested {
   min-height: 200px;
 }
 
 .fx-embedded-call-identifier {
   display: inline;
   width: 100%;
   padding: 1.2em;