Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes blurred videos are unopenable in universe view #1247

Closed
alltheseas opened this issue Jun 4, 2023 · 3 comments
Closed

Sometimes blurred videos are unopenable in universe view #1247

alltheseas opened this issue Jun 4, 2023 · 3 comments
Assignees
Labels
bug Something is not working, or not working as intended video

Comments

@alltheseas
Copy link
Collaborator

alltheseas commented Jun 4, 2023

WIP

Example blurred videos

trim.7F0F101C-6B16-4153-955B-83CE4201578F.MOV

https://damus.io/note167feyf9tgyp96u4g5zh9rw35nm5v3pvfj88g4qhdfqf9ryyjh5uqmpn5nm

https://damus.io/note1al257h7ryzme59nmlvn68ytefgzwww4h37v6yd59acpfruxsavaqmgjujw

@bryanmontz

@alltheseas alltheseas changed the title Sometimes blurred images or gifs are unopenable Sometimes blurred images or gifs are unopenable in universe view [bug] Jun 4, 2023
@alltheseas alltheseas changed the title Sometimes blurred images or gifs are unopenable in universe view [bug] Sometimes blurred gifs are unopenable in universe view [bug] Jun 4, 2023
@alltheseas
Copy link
Collaborator Author

@alltheseas alltheseas changed the title Sometimes blurred gifs are unopenable in universe view [bug] Sometimes blurred videos are unopenable in universe view [bug] Jun 5, 2023
@alltheseas alltheseas added the bug Something is not working, or not working as intended label Jun 26, 2023
@jb55 jb55 added the video label Aug 4, 2023
@jb55 jb55 self-assigned this Aug 4, 2023
@alltheseas alltheseas changed the title Sometimes blurred videos are unopenable in universe view [bug] Sometimes blurred videos are unopenable in universe view Aug 11, 2023
@danieldaquino
Copy link
Contributor

I will try to write a fix for this one 👍

@danieldaquino
Copy link
Contributor

danieldaquino commented Sep 13, 2023

I was able to create a fix for this, by slightly changing the blur layer behaviour.

I also setup the iOS 17 SDKs on my dev environment (had to free up some disk space for that LOL) so that I can start testing Damus on both OS versions, since iOS 17 is coming up soon.

Issue repro

iOS: 16.4 (iPhone 14 Pro simulator)
Damus: 1.6 (17) b1e0a6210987da97f0b3c66ce58ef85b6cb3c3d1 (Current tip of master)
Steps:

  1. Go to search tab
  2. Search for note167feyf9tgyp96u4g5zh9rw35nm5v3pvfj88g4qhdfqf9ryyjh5uqmpn5nm
  3. Tap the blurred video

Ideal behaviour: Video should become viewable
Actual behaviour: Video stays blurred and is not viewable

Root cause and fix

Damus uses a ZStack with a non-clickable Blur layer on top to hide certain media.

  • When the media is a picture, clicking the blurry picture opens a fullscreen view, where the user can view the image.
  • However, fullscreen videos are not yet supported. so clicking on a blurry video does not do anything.

To fix this, I changed the behaviour a little bit:

  • Users can now click on the blurry image/video to reveal it.
  • On pictures, users can click on it a second time to open the fullscreen image view
  • The blurry layer returns as soon as the note view is unloaded and reloaded (e.g. If the user switches to a different tab, or if Damus is restarted)

Although the behaviour is changed a bit, I believe it's still very intuitive, and brings the additional advantage that one can go through a list of blurry notes faster (Since they only need to tap them once to reveal, instead of tapping and then tapping on "close" to go back to the feed)

Patch

The patch can be found at: https://groups.google.com/a/damus.io/g/patches/c/GR1cArW_UZo

Testing of the patch

PASS

iOS:

  • 17.0 (iPhone 14 Pro simulator)
  • 16.4 (iPhone 14 Pro simulator)

Damus: 1.6 (17) 704dc5ad71e839f18912a0169488caf0e374795b (New patch)
Steps:

  1. Go to search/universe tab
  2. Search for note167feyf9tgyp96u4g5zh9rw35nm5v3pvfj88g4qhdfqf9ryyjh5uqmpn5nm
  3. Tap the blurred video to unblur (Should unblur)
  4. Look for other blurred images in the search/universe tab
  5. Tap them to unblur (Should unblur)
  6. Tap them once again for the fullscreen view (Should become fullscreen)
  7. Go to the home tab
  8. Go back to the search/universe tab
  9. Search for the same note: note167feyf9tgyp96u4g5zh9rw35nm5v3pvfj88g4qhdfqf9ryyjh5uqmpn5nm
  10. Check that video is blurred (Should be blurred)

Results: The behaviour matches expectations above on both iOS versions tested.

@jb55 jb55 closed this as completed in 510432b Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working, or not working as intended video
Projects
Archived in project
Development

No branches or pull requests

3 participants