Bug 1101378 - self-image can be cropped, meaning the user doesn't see the entire sent images, r=NiKo`
authorDan Mosedale <dmose@meer.net>
Fri, 12 Dec 2014 11:01:27 -0800
changeset 219396 4cdd32ea6f7daa37948020e468038a2242d94e6e
parent 219395 e4e65a1c0dd6ae9298cb0a72464ce584cfc09845
child 219397 26ec6656f074e2af1ad09623276e9dcfc30d8291
push id10382
push userdmosedale@mozilla.com
push dateFri, 12 Dec 2014 19:02:32 +0000
treeherderfx-team@4cdd32ea6f7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNiKo
bugs1101378
milestone37.0a1
Bug 1101378 - self-image can be cropped, meaning the user doesn't see the entire sent images, r=NiKo`
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;