mirror of
git://jb55.com/damus
synced 2024-09-29 00:10:43 +00:00
79fef51f68
The DamusAVPlayerView (along with other classes) play or pause based on their Y position relative to the user's viewport. This is ideal for a vertical feed of notes. However, this does not work well on a horizontal carousel, such as when viewing videos on the full-screen carousel and swiping left/right. This commit adds a new tracking method based on onAppear/onDisappear triggers from a lazy stack (which only loads when it is visible), and applied it to videos shown on a full screen carousel, so that videos pause when we swipe away from the video. Incidentally, this also fixes an issue I was seeing where a full screen video would disappear as soon as I rotated the phone to landscape mode. Testing -------- Device: iPhone 13 Mini iOS: 17.3.1 Damus: This version Coverage: 1. Scroll down a feed full of videos and make sure videos still autoplay when passing through them. PASS 2. Check videos on the feed are muted by default. PASS 3. Check mute button on the video still works. PASS 4. Check clicking on the video brings it to a full-screen carousel view. PASS 5. Check that videos play unmuted by default on full-screen carousel view. PASS 6. Check that all playback controls work on the full-screen carousel view. PASS 7. Check that clicking outside the video shows/hides the carousel overlays. PASS 8. Check that a summary of the note shows up. PASS 9. Check that clicking on that note takes the user to the thread view. PASS 10. Check that changing phone orientation between portrait and landscape on both full-screen carousel AND full-screen video modes will work as expected. PASS 11. Check close button on full-screen carousel works. PASS 12. Check that swiping the video away exits full-screen carousel. PASS 13. Check that full-screen carousel works with images. PASS 14. Check that a carousel with multiple images/videos can be swiped left and right. PASS 15. Check that swiping away from a video on a full-screen carousel will pause it. PASS 16. Check that clicking on an unmuted video on the feed won't cause double-audio issues. PASS 17. Check that full-screen carousel view looks good on both dark and light modes. PASS Closes: https://github.com/damus-io/damus/issues/1530 Signed-off-by: Daniel D’Aquino <daniel@daquino.me> Link: 20240318222048.14226-6-daniel@daquino.me Signed-off-by: William Casarin <jb55@jb55.com> |
||
---|---|---|
.. | ||
project.xcworkspace | ||
xcshareddata/xcschemes | ||
project.pbxproj |