Skip to content

[HOLD for payment 2024-04-05] HIGH: [Video] [$500] Can not pause or play video on full screen mode #37803

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.47-6
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: vdargentotest+web030424@gmail.comhttps://expensify.testrail.io/index.php?/tests/view/4378376
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Pre-requisite: the user must be logged in

  1. Go to any chat
  2. Send a video
  3. Open it on full screen mode (important step)
  4. Click on the video to play or pause
  5. Verify the video is not played or paused

Expected Result:

The video should be played or paused when clicked on it

Actual Result:

The video does not play or pause when the user clicks on it

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6403438_1709676948610.bandicam_2024-03-04_21-36-47-411.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013d32a95574e162d0
  • Upwork Job ID: 1767124547020718080
  • Last Price Increase: 2024-03-18
  • Automatic offers:
    • ShridharGoel | Contributor | 0

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 5, 2024
  2. melvin-bot commented on Mar 5, 2024

    @melvin-bot

    Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. lanitochka17 commented on Mar 5, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-vsp
    CC @quinthar

  4. lanitochka17 commented on Mar 5, 2024

    @lanitochka17
    Author

    @dylanexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  5. dylanexpensify commented on Mar 6, 2024

    @dylanexpensify
    Contributor

    Apologies, I've been OOO sick, but getting to this today!

  6. ShridharGoel commented on Mar 7, 2024

    @ShridharGoel
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Can not pause or play video on full screen mode.

    What is the root cause of that problem?

    For full screen mode, play and pause methods are being called from two places - togglePlayCurrentVideo and the internal implementation of full screen video player in av-expo.

    For non-fullscreen view, we have custom logic in togglePlayCurrentVideo, but that is not needed for the full screen view.

    const togglePlayCurrentVideo = useCallback(() => {
    videoResumeTryNumber.current = 0;
    if (!isCurrentlyURLSet) {
    updateCurrentlyPlayingURL(url);
    } else if (isPlaying) {
    pauseVideo();
    } else {
    playVideo();
    }
    }, [isCurrentlyURLSet, isPlaying, pauseVideo, playVideo, updateCurrentlyPlayingURL, url]);

    What changes do you think we should make in order to solve the problem?

    In togglePlayCurrentVideo, there should be a check for full screen mode. If video is playing in full screen mode, then play and pause should not be called from that method since that is already being handled by av-expo's full screen APIs.

    A state called isFullscreen can be created (actual code can be more polished):

    const [isFullscreen, setIsFullscreen] = useState(false)
    
    const togglePlayCurrentVideo = useCallback(() => {
        videoResumeTryNumber.current = 0;
        if (!isCurrentlyURLSet) {
            updateCurrentlyPlayingURL(url);
        } else if (isPlaying && !isFullscreen) {
            pauseVideo();
        } else if (!isFullscreen) {
            playVideo();
        }
    }, [isCurrentlyURLSet, isPlaying, pauseVideo, playVideo, updateCurrentlyPlayingURL, url, isFullscreen]);
    

    This logic to update fullscreen status can be added in handleFullscreenUpdate:

    setIsFullscreen(e.fullscreenUpdate === VideoFullscreenUpdate.PLAYER_DID_PRESENT)
    
    Screen.Recording.2024-03-07.at.1.04.53.PM.mov

    Optional

    If we want to toggle full screen mode on long press or double tap, we can include that.

    const enterFullScreenMode = useCallback(() => {
        updateCurrentlyPlayingURL(url);
        videoPlayerRef.current.presentFullscreenPlayer();
    }, [updateCurrentlyPlayingURL, url, videoPlayerRef]);
    

    Then, inside PressableWithoutFeedback in BaseVideoPlayer, include onLongPress:

    <PressableWithoutFeedback
        accessibilityRole="button"
        onPress={() => {
            togglePlayCurrentVideo();
        }}
        onLongPress={enterFullScreenMode}
        style={styles.flex1}
    >
    

    Double tap can be handled using gestures.

  7. dylanexpensify commented on Mar 8, 2024

    @dylanexpensify
    Contributor

    Posted here to confirm in vsb!

  8. dylanexpensify commented on Mar 11, 2024

    @dylanexpensify
    Contributor

    Agreed, HIGH!

  9. 42 remaining items

  10. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 29, 2024
  11. changed the title [-]HIGH: [Video] [$500] Can not pause or play video on full screen mode[/-] [+][HOLD for payment 2024-04-05] HIGH: [Video] [$500] Can not pause or play video on full screen mode[/+] on Mar 29, 2024
  12. melvin-bot commented on Mar 29, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Mar 29, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-04-05. 🎊

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Mar 29, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
    • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@sobitneupane] Determine if we should create a regression test for this bug.
    • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@dylanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. dylanexpensify commented on Apr 9, 2024

    @dylanexpensify
    Contributor

    Payment summary:

    Please apply/request!

  16. dylanexpensify commented on Apr 9, 2024

    @dylanexpensify
    Contributor

    Done!

  17. JmillsExpensify commented on Apr 11, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @sobitneupane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions