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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to autoplay videos in gallery #2195

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

aharwood9
Copy link
Contributor

馃幆 Goal

Add the ability to autoplay videos in the gallery. Fixes #2186

馃洜 Implementation details

Adds a new prop to the OverlayProvider called autoPlayVideo - the default is false to match current behaviour. This prop is used to define whether the video should start paused or not.

馃帹 UI Changes

iOS
Screen.Recording.2023-07-24.at.15.24.24.mov
Android
Screen.Recording.2023-07-24.at.15.23.09.mov

馃И Testing

  • Open the Sample App on iOS or Android
  • Go to a Channel with a video and photos being shared
  • Tap on a video and see it maintains the current behaviour of not autoplaying
  • Update the App.tsx in Sample App with the prop autoPlayVideo to true in the OverlayProvider
  • Go back to the channel with photos and videos
  • Open video and see it autoplays, open a photo and see no regression.

鈽戯笍 Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@aharwood9
Copy link
Contributor Author

aharwood9 commented Jul 24, 2023

Hi there 馃憢 I have currently set the autoPlayVideo default to be false to maintain current behaviour but looking at iMessage and WhatsApp they both have videos autoplaying when you tap on the thumbnail. So if you are okay with changing the default behaviour, I personally think this would be better but up to you 馃憤 happy to update this if you want to switch.

Another thought I had while creating this PR was whether I should add a type check to make photos always have a paused value of true. Please let me know if you think having photos paused value to false would be an issue. I couldn't see any regression.

@santhoshvai
Copy link
Member

@aharwood9 many thanks for your contribution 馃挴

@santhoshvai santhoshvai merged commit 88dca0c into GetStream:develop Jul 25, 2023
2 of 3 checks passed
@adenta-grandstand
Copy link

@santhoshvai any idea when a new release will be cut with this feature?

@github-actions github-actions bot mentioned this pull request Aug 4, 2023
6 tasks
@stream-ci-bot
Copy link
Contributor

馃帀 This PR is included in version 5.16.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[馃悰] Bug Report Title - Cant Autoplay
4 participants