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

[video] Fix issues with the event system #28426

Merged
merged 2 commits into from May 1, 2024
Merged

Conversation

behenate
Copy link
Member

@behenate behenate commented Apr 24, 2024

Why

Fixes a few issues I encountered with the expo-video event system.

How

  • VolumeEvent on android used muted instead of isMuted property name
  • Due to double optional the warning VideoPlayer's AVPlayer has been initialized with a AVPlayerItem instead of a VideoPlayerItem was thrown when it wasn't necessary
  • The events can be sent before the AppContext is initialised as the video is loaded early. This would lead to warnings. For now the player won't send events when AppContext is not present. In the future we should consider a more robust solution.

Test Plan

Tested in BareExpo on Android 14 emulatore and iOS 17 device.

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Apr 24, 2024
@expo-bot
Copy link
Collaborator

The Pull Request introduced fingerprint changes against the base commit: 9004f96

Fingerprint diff
[
  {
    "type": "dir",
    "filePath": "../../packages/expo-video/android",
    "reasons": [
      "expoAutolinkingAndroid"
    ],
    "hash": "b8302954174022a4fc935c222f9db95f697f9614"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo-video/ios",
    "reasons": [
      "expoAutolinkingIos"
    ],
    "hash": "621aff951799b82379d5fbe3f95688377b7c8760"
  }
]

Generated by PR labeler 🤖

@behenate behenate marked this pull request as ready for review April 26, 2024 11:18
@lukmccall lukmccall self-requested a review May 1, 2024 06:19
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
packages/expo-video/ios/VideoPlayer.swift Outdated Show resolved Hide resolved
@lukmccall lukmccall merged commit 82f55e9 into main May 1, 2024
3 checks passed
@lukmccall lukmccall deleted the @behenate/video-event-fixes branch May 1, 2024 06:23
@expo-bot
Copy link
Collaborator

expo-bot commented May 1, 2024

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog. Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against 7feb4bd

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.

None yet

3 participants