Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.42k forks source link

Orientation of pinned photos different for different people #3306

Open BethanyWinslow opened 3 years ago

BethanyWinslow commented 3 years ago

Description I pinned photos using the upload feature while in several different ones of my Mozilla Hubs rooms. (I was not in Spoke.) While this worked well for about 30 photos I had 2 that I could not orient correctly, they display horizontal/landscape instead of vertical/portrait orientation. I tried a bunch of times to fix them, even changing the orientation in the folder on my desktop before uploading them again. The orientation button when in the room only flips the image over so that it's in reverse (like flipping a card on a table from face down to face up.)

When I met with my colleague over the weekend he could also see them displaying incorrectly. (He was on a Mac Book Pro laptop , and used both Safari and Chrome browsers.) I have gone in with both Firefox and Chrome on my Windows desktop, on my android phone, and on my Oculus Rift. I saw them display correctly just once on my phone this morning, but clicking on the links from an email on my phone I think opens in Chrome, by default and I have crashed that browser a couple times. When I go to the room in Firefox browser on my phone I don't have trouble, but the photos display incorrectly. (But I swear I saw them correctly just the one this morning on the phone, and I think that was via a direct link that opens the default browser on an Android Galaxy S9.)

Last night, however, my same colleague joined me in the room and reported that both photos display correctly for him now! I had him take a screenshot of me standing by the photo and I took a selfie/screenshot at the same time.

There is a another photo that does the same thing, it's on the other wall in this gallery. I should also mention, that before I created the room (link below) where these photos are, I had created a single larger Hubs room. (There were way too many images, it crashes on a phone), and in that Hubs room the same 2 images are also horizonal.

Expected behavior I expect both of us to see the same thing in the room, when we're in there at the same time. I also expect to be able to have images to be orientated correctly or be able to fix them manually if they are not.

Screenshots DrCheersSeesCorrectly CrookedforMe The first screenshot shows my avatar standing next to the end photo on the wall, displayed correctly that my friend took. My selfie screenshot shows the the photo is horizontal.

Hardware

Additional context Here's a direct link to this room - https://hubs.mozilla.com/7N4HKja/cheers-gallery-room-2/

Thank you for all your help. I LOVE Mozilla Hubs and Spoke!

┆Issue is synchronized with this Jira Task

johnshaughnessy commented 3 years ago

It looks like we are misusing (or not using) the orientation that comes baked into the photo. For anyone who looks into this issue, these lines seem relevant: https://github.com/mozilla/hubs/blob/master/src/utils/media-utils.js#L200-L208 https://github.com/mozilla/hubs/blob/master/src/utils/media-utils.js#L81-L118 https://github.com/mozilla/hubs/blob/master/src/utils/media-utils.js#L237

On an unrelated note -- FYI @BethanyWinslow the rotate button can be clicked once to flip something 180°, clicked-and-held to rotated something around the up-down and left-right axes, or clicked-and-held with shift to rotate freely. (Though it's difficult to place things precisely with these controls. This has been an issue for a long time https://github.com/mozilla/hubs/issues/2231 )