expo-video 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/video/FullscreenPlayerActivity.kt +1 -1
  4. package/android/src/main/res/layout/fullscreen_player_activity.xml +3 -1
  5. package/build/VideoView.types.d.ts +2 -0
  6. package/build/VideoView.types.d.ts.map +1 -1
  7. package/build/VideoView.types.js.map +1 -1
  8. package/expo-module.config.json +1 -1
  9. package/ios/VideoManager.swift +3 -6
  10. package/ios/VideoPlayer.swift +0 -17
  11. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.4/expo.modules.video-3.0.4-sources.jar → 3.0.5/expo.modules.video-3.0.5-sources.jar} +0 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5-sources.jar.md5 +1 -0
  13. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5-sources.jar.sha1 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5-sources.jar.sha256 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5-sources.jar.sha512 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.aar +0 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.aar.md5 +1 -0
  18. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.aar.sha1 +1 -0
  19. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.aar.sha256 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.aar.sha512 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.4/expo.modules.video-3.0.4.module → 3.0.5/expo.modules.video-3.0.5.module} +22 -22
  22. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.module.md5 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.module.sha1 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.module.sha256 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.module.sha512 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.4/expo.modules.video-3.0.4.pom → 3.0.5/expo.modules.video-3.0.5.pom} +1 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.pom.md5 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.pom.sha1 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.pom.sha256 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.5/expo.modules.video-3.0.5.pom.sha512 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml +4 -4
  32. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.md5 +1 -1
  33. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha1 +1 -1
  34. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha256 +1 -1
  35. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha512 +1 -1
  36. package/package.json +2 -2
  37. package/src/VideoView.types.ts +2 -0
  38. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.md5 +0 -1
  39. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.sha1 +0 -1
  40. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.sha256 +0 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.sha512 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar +0 -0
  43. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.md5 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.sha1 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.sha256 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.sha512 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.md5 +0 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.sha1 +0 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.sha256 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.sha512 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.md5 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.sha1 +0 -1
  53. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.sha256 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 3.0.5 — 2025-08-25
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - [Android] Always keep the native controls always enabled in fullscreen mode to mimic iOS. ([#39015](https://github.com/expo/expo/pull/39015) by [@behenate](https://github.com/behenate))
18
+
13
19
  ## 3.0.4 — 2025-08-21
14
20
 
15
21
  ### 🎉 New features
@@ -20,6 +26,7 @@
20
26
 
21
27
  - [iOS] Fix `sourceLoad` event not being emitted. ([#39023](https://github.com/expo/expo/pull/39023) by [@behenate](https://github.com/behenate))
22
28
  - [Web] Fix audio not playing due to conflicting CORS and AudioNode settings. ([#39039](https://github.com/expo/expo/pull/39039) by [@behenate](https://github.com/behenate))
29
+ - [iOS] Background mode playback fix. ([#33706](https://github.com/expo/expo/pull/33706) by [@hromovp](https://github.com/hromovp))
23
30
 
24
31
  ## 3.0.3 — 2025-08-21
25
32
 
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '3.0.4'
7
+ version = '3.0.5'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.video"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName '3.0.4'
13
+ versionName '3.0.5'
14
14
  }
15
15
  }
16
16
 
@@ -124,7 +124,7 @@ class FullscreenPlayerActivity : Activity() {
124
124
 
125
125
  override fun onResume() {
126
126
  orientationHelper.startOrientationEventListener()
127
- playerView.useController = videoView.useNativeControls
127
+ playerView.useController = true
128
128
  // Reconfigure subtitles when resuming (handles returning from settings)
129
129
  SubtitleUtils.configureSubtitleView(playerView, this)
130
130
  super.onResume()
@@ -1,6 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
3
  xmlns:tools="http://schemas.android.com/tools"
4
+ xmlns:app="http://schemas.android.com/apk/res-auto"
4
5
  android:id="@+id/enclosing_layout"
5
6
  android:layout_width="match_parent"
6
7
  android:layout_height="match_parent"
@@ -13,6 +14,7 @@
13
14
  android:layout_width="match_parent"
14
15
  android:layout_height="match_parent"
15
16
  android:background="@android:color/black"
16
- android:keepScreenOn="true"/>
17
+ android:keepScreenOn="true"
18
+ app:use_controller="true" />
17
19
 
18
20
  </FrameLayout>
@@ -23,6 +23,8 @@ export interface VideoViewProps extends ViewProps {
23
23
  player: VideoPlayer;
24
24
  /**
25
25
  * Determines whether native controls should be displayed or not.
26
+ *
27
+ * > **Note**: Due to platform limitations, the native controls are always enabled in fullscreen mode.
26
28
  * @default true
27
29
  */
28
30
  nativeControls?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"VideoView.types.d.ts","sourceRoot":"","sources":["../src/VideoView.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,aAAa,CAAC;AAExD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;;OAIG;IACH,eAAe,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,M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gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE9B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEhC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAE9C;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,UAAU,GACV,YAAY,GACZ,cAAc,GACd,WAAW,GACX,eAAe,GACf,gBAAgB,CAAC;AAErB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VideoView.types.js","sourceRoot":"","sources":["../src/VideoView.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewProps } from 'react-native';\n\nimport type { VideoPlayer } from './VideoPlayer.types';\n\n/**\n * Describes how a video should be scaled to fit in a container.\n * - `contain`: The video maintains its aspect ratio and fits inside the container, with possible letterboxing/pillarboxing.\n * - `cover`: The video maintains its aspect ratio and covers the entire container, potentially cropping some portions.\n * - `fill`: The video stretches/squeezes to completely fill the container, potentially causing distortion.\n */\nexport type VideoContentFit = 'contain' | 'cover' | 'fill';\n\n/**\n * Describes the type of the surface used to render the video.\n * - `surfaceView`: Uses the `SurfaceView` to render the video. This value should be used in the majority of cases. Provides significantly lower power consumption, better performance, and more features.\n * - `textureView`: Uses the `TextureView` to render the video. Should be used in cases where the SurfaceView is not supported or causes issues (for example, overlapping video views).\n *\n * You can learn more about surface types in the official [ExoPlayer documentation](https://developer.android.com/media/media3/ui/playerview#surfacetype).\n * @platform android\n */\nexport type SurfaceType = 'textureView' | 'surfaceView';\n\nexport interface VideoViewProps extends ViewProps {\n /**\n * A video player instance. Use [`useVideoPlayer()`](#usevideoplayersource-setup) hook to create one.\n */\n player: VideoPlayer;\n\n /**\n * Determines whether native controls should be displayed or not.\n * @default true\n */\n nativeControls?: boolean;\n\n /**\n * Describes how the video should be scaled to fit in the container.\n * Options are `'contain'`, `'cover'`, and `'fill'`.\n * @default 'contain'\n */\n contentFit?: VideoContentFit;\n\n /**\n * Determines whether fullscreen mode is allowed or not.\n *\n * > Note: This option has been deprecated in favor of the `fullscreenOptions` prop and will be disabled in the future.\n * @default true\n */\n allowsFullscreen?: boolean;\n\n /**\n * Determines the fullscreen mode options.\n */\n fullscreenOptions?: FullscreenOptions;\n\n /**\n * Determines whether the timecodes should be displayed or not.\n * @default true\n * @platform ios\n */\n showsTimecodes?: boolean;\n\n /**\n * Determines whether the player allows the user to skip media content.\n * @default false\n * @platform android\n * @platform ios\n */\n requiresLinearPlayback?: boolean;\n\n /**\n * Determines the type of the surface used to render the video.\n * > This prop should not be changed at runtime.\n * @default 'surfaceView'\n * @platform android\n */\n surfaceType?: SurfaceType;\n\n /**\n * Determines the position offset of the video inside the container.\n * @default { dx: 0, dy: 0 }\n * @platform ios\n */\n contentPosition?: { dx?: number; dy?: number };\n\n /**\n * A callback to call after the video player enters Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios\n * @platform web\n */\n onPictureInPictureStart?: () => void;\n\n /**\n * A callback to call after the video player exits Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios\n * @platform web\n */\n onPictureInPictureStop?: () => void;\n\n /**\n * Determines whether the player allows Picture in Picture (PiP) mode.\n * > **Note:** The `supportsPictureInPicture` property of the [config plugin](#configuration-in-app-config)\n * > has to be configured for the PiP to work.\n * @platform android\n * @platform ios\n * @platform web\n */\n allowsPictureInPicture?: boolean;\n\n /**\n * Determines whether a video should be played \"inline\", that is, within the element's playback area.\n * @platform web\n */\n playsInline?: boolean;\n\n /**\n * Determines whether the player should start Picture in Picture (PiP) automatically when the app is in the background.\n * > **Note:** Only one player can be in Picture in Picture (PiP) mode at a time.\n *\n * > **Note:** The `supportsPictureInPicture` property of the [config plugin](#configuration-in-app-config)\n * > has to be configured for the PiP to work.\n *\n * @default false\n * @platform android 12+\n * @platform ios\n */\n startsPictureInPictureAutomatically?: boolean;\n\n /**\n * Specifies whether to perform video frame analysis (Live Text in videos).\n * Check official [Apple documentation](https://developer.apple.com/documentation/avkit/avplayerviewcontroller/allowsvideoframeanalysis) for more details.\n * @default true\n * @platform ios 16.0+\n */\n allowsVideoFrameAnalysis?: boolean;\n\n /**\n * A callback to call after the video player enters fullscreen mode.\n */\n onFullscreenEnter?: () => void;\n\n /**\n * A callback to call after the video player exits fullscreen mode.\n */\n onFullscreenExit?: () => void;\n\n /**\n * A callback to call after the mounted `VideoPlayer` has rendered the first frame into the `VideoView`.\n * This event can be used to hide any cover images that conceal the initial loading of the player.\n * > **Note:** This event may also be called during playback when the current video track changes (for example when the player switches video quality).\n */\n onFirstFrameRender?: () => void;\n\n /**\n * Determines whether the player should use the default ExoPlayer shutter that covers the `VideoView` before the first video frame is rendered.\n * Setting this property to `false` makes the Android behavior the same as iOS.\n *\n * @platform android\n * @default false\n */\n useExoShutter?: boolean;\n\n /**\n * Determines the [cross origin policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/crossorigin) used by the underlying native view on web.\n * If `undefined` (default), does not use CORS at all. If set to `'anonymous'`, the video will be loaded with CORS enabled.\n * Note that some videos may not play if CORS is enabled, depending on the CDN settings.\n * If you encounter issues, consider adjusting the `crossOrigin` property.\n *\n *\n * @platform web\n * @default undefined\n */\n crossOrigin?: 'anonymous' | 'use-credentials';\n\n /**\n * Use Audio Nodes for sound playback. When the same player is playing in multiple video views the audio won't increase in volume\n * as the number of players increases.\n *\n * > **Note**: This property is experimental, when enabled it is known to break audio for some sources. Do not change this property at runtime.\n *\n * @experimental\n * @default false\n * @platform web\n */\n useAudioNodePlayback?: boolean;\n}\n\n/**\n * Describes the orientation of the video in fullscreen mode. Available values are:\n * - `default`: The video is displayed in any of the available device rotations.\n * - `portrait`: The video is displayed in one of two available portrait orientations and rotates between them.\n * - `portraitUp`: The video is displayed in the portrait orientation - the notch of the phone points upwards.\n * - `portraitDown`: The video is displayed in the portrait orientation - the notch of the phone points downwards.\n * - `landscape`: The video is displayed in one of two available landscape orientations and rotates between them.\n * - `landscapeLeft`: The video is displayed in the left landscape orientation - the notch of the phone is in the left palm of the user.\n * - `landscapeRight`: The video is displayed in the right landscape orientation - the notch of the phone is in the right palm of the user.\n */\nexport type FullscreenOrientation =\n | 'default'\n | 'portrait'\n | 'portraitUp'\n | 'portraitDown'\n | 'landscape'\n | 'landscapeLeft'\n | 'landscapeRight';\n\n/**\n * Describes the options for fullscreen video mode.\n */\nexport type FullscreenOptions = {\n /**\n * Specifies whether the fullscreen mode should be available to the user. When `false`, the fullscreen button will be hidden in the player.\n * Equivalent to the `allowsFullscreen` prop.\n * @default true\n */\n enable: boolean;\n /**\n * Specifies the orientation of the video in fullscreen mode.\n * @default 'default'\n * @platform android\n * @platform ios\n */\n orientation?: FullscreenOrientation;\n /**\n * Specifies whether the app should exit fullscreen mode when the device is rotated to a different orientation than the one specified in the `orientation` prop.\n * For example, if the `orientation` prop is set to `landscape` and the device is rotated to `portrait`, the app will exit fullscreen mode.\n *\n * > This prop will have no effect if the `orientation` prop is set to `default`.\n * > The `VideoView` will never auto-exit fullscreen when the device auto-rotate feature has been disabled in settings.\n *\n * @default false\n * @platform android\n * @platform ios\n */\n autoExitOnRotate?: boolean;\n};\n"]}
1
+ {"version":3,"file":"VideoView.types.js","sourceRoot":"","sources":["../src/VideoView.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewProps } from 'react-native';\n\nimport type { VideoPlayer } from './VideoPlayer.types';\n\n/**\n * Describes how a video should be scaled to fit in a container.\n * - `contain`: The video maintains its aspect ratio and fits inside the container, with possible letterboxing/pillarboxing.\n * - `cover`: The video maintains its aspect ratio and covers the entire container, potentially cropping some portions.\n * - `fill`: The video stretches/squeezes to completely fill the container, potentially causing distortion.\n */\nexport type VideoContentFit = 'contain' | 'cover' | 'fill';\n\n/**\n * Describes the type of the surface used to render the video.\n * - `surfaceView`: Uses the `SurfaceView` to render the video. This value should be used in the majority of cases. Provides significantly lower power consumption, better performance, and more features.\n * - `textureView`: Uses the `TextureView` to render the video. Should be used in cases where the SurfaceView is not supported or causes issues (for example, overlapping video views).\n *\n * You can learn more about surface types in the official [ExoPlayer documentation](https://developer.android.com/media/media3/ui/playerview#surfacetype).\n * @platform android\n */\nexport type SurfaceType = 'textureView' | 'surfaceView';\n\nexport interface VideoViewProps extends ViewProps {\n /**\n * A video player instance. Use [`useVideoPlayer()`](#usevideoplayersource-setup) hook to create one.\n */\n player: VideoPlayer;\n\n /**\n * Determines whether native controls should be displayed or not.\n *\n * > **Note**: Due to platform limitations, the native controls are always enabled in fullscreen mode.\n * @default true\n */\n nativeControls?: boolean;\n\n /**\n * Describes how the video should be scaled to fit in the container.\n * Options are `'contain'`, `'cover'`, and `'fill'`.\n * @default 'contain'\n */\n contentFit?: VideoContentFit;\n\n /**\n * Determines whether fullscreen mode is allowed or not.\n *\n * > Note: This option has been deprecated in favor of the `fullscreenOptions` prop and will be disabled in the future.\n * @default true\n */\n allowsFullscreen?: boolean;\n\n /**\n * Determines the fullscreen mode options.\n */\n fullscreenOptions?: FullscreenOptions;\n\n /**\n * Determines whether the timecodes should be displayed or not.\n * @default true\n * @platform ios\n */\n showsTimecodes?: boolean;\n\n /**\n * Determines whether the player allows the user to skip media content.\n * @default false\n * @platform android\n * @platform ios\n */\n requiresLinearPlayback?: boolean;\n\n /**\n * Determines the type of the surface used to render the video.\n * > This prop should not be changed at runtime.\n * @default 'surfaceView'\n * @platform android\n */\n surfaceType?: SurfaceType;\n\n /**\n * Determines the position offset of the video inside the container.\n * @default { dx: 0, dy: 0 }\n * @platform ios\n */\n contentPosition?: { dx?: number; dy?: number };\n\n /**\n * A callback to call after the video player enters Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios\n * @platform web\n */\n onPictureInPictureStart?: () => void;\n\n /**\n * A callback to call after the video player exits Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios\n * @platform web\n */\n onPictureInPictureStop?: () => void;\n\n /**\n * Determines whether the player allows Picture in Picture (PiP) mode.\n * > **Note:** The `supportsPictureInPicture` property of the [config plugin](#configuration-in-app-config)\n * > has to be configured for the PiP to work.\n * @platform android\n * @platform ios\n * @platform web\n */\n allowsPictureInPicture?: boolean;\n\n /**\n * Determines whether a video should be played \"inline\", that is, within the element's playback area.\n * @platform web\n */\n playsInline?: boolean;\n\n /**\n * Determines whether the player should start Picture in Picture (PiP) automatically when the app is in the background.\n * > **Note:** Only one player can be in Picture in Picture (PiP) mode at a time.\n *\n * > **Note:** The `supportsPictureInPicture` property of the [config plugin](#configuration-in-app-config)\n * > has to be configured for the PiP to work.\n *\n * @default false\n * @platform android 12+\n * @platform ios\n */\n startsPictureInPictureAutomatically?: boolean;\n\n /**\n * Specifies whether to perform video frame analysis (Live Text in videos).\n * Check official [Apple documentation](https://developer.apple.com/documentation/avkit/avplayerviewcontroller/allowsvideoframeanalysis) for more details.\n * @default true\n * @platform ios 16.0+\n */\n allowsVideoFrameAnalysis?: boolean;\n\n /**\n * A callback to call after the video player enters fullscreen mode.\n */\n onFullscreenEnter?: () => void;\n\n /**\n * A callback to call after the video player exits fullscreen mode.\n */\n onFullscreenExit?: () => void;\n\n /**\n * A callback to call after the mounted `VideoPlayer` has rendered the first frame into the `VideoView`.\n * This event can be used to hide any cover images that conceal the initial loading of the player.\n * > **Note:** This event may also be called during playback when the current video track changes (for example when the player switches video quality).\n */\n onFirstFrameRender?: () => void;\n\n /**\n * Determines whether the player should use the default ExoPlayer shutter that covers the `VideoView` before the first video frame is rendered.\n * Setting this property to `false` makes the Android behavior the same as iOS.\n *\n * @platform android\n * @default false\n */\n useExoShutter?: boolean;\n\n /**\n * Determines the [cross origin policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/crossorigin) used by the underlying native view on web.\n * If `undefined` (default), does not use CORS at all. If set to `'anonymous'`, the video will be loaded with CORS enabled.\n * Note that some videos may not play if CORS is enabled, depending on the CDN settings.\n * If you encounter issues, consider adjusting the `crossOrigin` property.\n *\n *\n * @platform web\n * @default undefined\n */\n crossOrigin?: 'anonymous' | 'use-credentials';\n\n /**\n * Use Audio Nodes for sound playback. When the same player is playing in multiple video views the audio won't increase in volume\n * as the number of players increases.\n *\n * > **Note**: This property is experimental, when enabled it is known to break audio for some sources. Do not change this property at runtime.\n *\n * @experimental\n * @default false\n * @platform web\n */\n useAudioNodePlayback?: boolean;\n}\n\n/**\n * Describes the orientation of the video in fullscreen mode. Available values are:\n * - `default`: The video is displayed in any of the available device rotations.\n * - `portrait`: The video is displayed in one of two available portrait orientations and rotates between them.\n * - `portraitUp`: The video is displayed in the portrait orientation - the notch of the phone points upwards.\n * - `portraitDown`: The video is displayed in the portrait orientation - the notch of the phone points downwards.\n * - `landscape`: The video is displayed in one of two available landscape orientations and rotates between them.\n * - `landscapeLeft`: The video is displayed in the left landscape orientation - the notch of the phone is in the left palm of the user.\n * - `landscapeRight`: The video is displayed in the right landscape orientation - the notch of the phone is in the right palm of the user.\n */\nexport type FullscreenOrientation =\n | 'default'\n | 'portrait'\n | 'portraitUp'\n | 'portraitDown'\n | 'landscape'\n | 'landscapeLeft'\n | 'landscapeRight';\n\n/**\n * Describes the options for fullscreen video mode.\n */\nexport type FullscreenOptions = {\n /**\n * Specifies whether the fullscreen mode should be available to the user. When `false`, the fullscreen button will be hidden in the player.\n * Equivalent to the `allowsFullscreen` prop.\n * @default true\n */\n enable: boolean;\n /**\n * Specifies the orientation of the video in fullscreen mode.\n * @default 'default'\n * @platform android\n * @platform ios\n */\n orientation?: FullscreenOrientation;\n /**\n * Specifies whether the app should exit fullscreen mode when the device is rotated to a different orientation than the one specified in the `orientation` prop.\n * For example, if the `orientation` prop is set to `landscape` and the device is rotated to `portrait`, the app will exit fullscreen mode.\n *\n * > This prop will have no effect if the `orientation` prop is set to `default`.\n * > The `VideoView` will never auto-exit fullscreen when the device auto-rotate feature has been disabled in settings.\n *\n * @default false\n * @platform android\n * @platform ios\n */\n autoExitOnRotate?: boolean;\n};\n"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.video",
11
- "version": "3.0.4",
11
+ "version": "3.0.5",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -44,11 +44,7 @@ class VideoManager {
44
44
  videoViews.remove(videoView)
45
45
  }
46
46
 
47
- func onAppForegrounded() {
48
- for videoPlayer in videoPlayers.allObjects {
49
- videoPlayer.setTracksEnabled(true)
50
- }
51
- }
47
+ func onAppForegrounded() {}
52
48
 
53
49
  func onAppBackgrounded() {
54
50
  for videoView in videoViews.allObjects {
@@ -56,8 +52,9 @@ class VideoManager {
56
52
  continue
57
53
  }
58
54
  if player.staysActiveInBackground == true {
59
- player.setTracksEnabled(videoView.playerViewController.isInPictureInPicture)
55
+ player.ref.audiovisualBackgroundPlaybackPolicy = .continuesIfPossible
60
56
  } else if !videoView.playerViewController.isInPictureInPicture {
57
+ player.ref.audiovisualBackgroundPlaybackPolicy = .pauses
61
58
  player.ref.pause()
62
59
  }
63
60
  }
@@ -272,23 +272,6 @@ internal final class VideoPlayer: SharedRef<AVPlayer>, Hashable, VideoPlayerObse
272
272
  return
273
273
  }
274
274
 
275
- /**
276
- * iOS automatically pauses videos when the app enters the background. Only way to avoid this is to detach the player from the playerLayer.
277
- * Typical way of doing this for `AVPlayerViewController` is setting `playerViewController.player = nil`, but that makes the
278
- * video invisible for around a second after foregrounding, disabling the tracks requires more code, but works a lot faster.
279
- */
280
- func setTracksEnabled(_ enabled: Bool) {
281
- ref.currentItem?.tracks.forEach({ track in
282
- guard let assetTrack = track.assetTrack else {
283
- return
284
- }
285
-
286
- if assetTrack.hasMediaCharacteristic(AVMediaCharacteristic.visual) {
287
- track.isEnabled = enabled
288
- }
289
- })
290
- }
291
-
292
275
  private func getBufferedPosition() -> Double {
293
276
  guard let currentItem = ref.currentItem else {
294
277
  return -1
@@ -0,0 +1 @@
1
+ 707670539287daf062917fc2972343114fad995d67511c24c60c76fb620c3ee0
@@ -0,0 +1 @@
1
+ d1e577ae947ac37201cd33fe428a6fd9b5ca6fb098380f47ab7f137ee30110b22ba12331bf191c6e43b9b92251171b2c388366013b132d7b5a1e9921aa5d148f
@@ -0,0 +1 @@
1
+ 337e11f92cc2dab64cf71f71cd3ce0a5f9a60f84
@@ -0,0 +1 @@
1
+ 81ef4fc0a33ec845e113a0d85b0476dae1d73ad71e7c2964d07fd28fcad908d0
@@ -0,0 +1 @@
1
+ 4b623b1039f7264c3a34bdb697580be1daad931b0ffd795cf7e2c3543f88bfb171ed3f2e1b8ae297633a3fef8e0c00fcaea8ba7214a829692d264ea889155c52
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.video",
6
- "version": "3.0.4",
6
+ "version": "3.0.5",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.video-3.0.4.aar",
28
- "url": "expo.modules.video-3.0.4.aar",
29
- "size": 485680,
30
- "sha512": "41f22ad6a39595ee69984b0365d34d9f055dafa5ddd10136f8bc504f49f6e6187027d312098b332e3ac0e9291793691e9c6fb1788876cecee1bb70817b465efa",
31
- "sha256": "cb96a0042965654c89f6adce47927f90b45c68af138bf2b2716a5fa92487f49a",
32
- "sha1": "15b7f8125dbc04b715c20812de0eef5d016bbafd",
33
- "md5": "94525837f9ac35c3290ea3f2d51898e8"
27
+ "name": "expo.modules.video-3.0.5.aar",
28
+ "url": "expo.modules.video-3.0.5.aar",
29
+ "size": 485712,
30
+ "sha512": "4b623b1039f7264c3a34bdb697580be1daad931b0ffd795cf7e2c3543f88bfb171ed3f2e1b8ae297633a3fef8e0c00fcaea8ba7214a829692d264ea889155c52",
31
+ "sha256": "81ef4fc0a33ec845e113a0d85b0476dae1d73ad71e7c2964d07fd28fcad908d0",
32
+ "sha1": "337e11f92cc2dab64cf71f71cd3ce0a5f9a60f84",
33
+ "md5": "83ecaeb95367a58583f6e14bc69406f9"
34
34
  }
35
35
  ]
36
36
  },
@@ -113,13 +113,13 @@
113
113
  ],
114
114
  "files": [
115
115
  {
116
- "name": "expo.modules.video-3.0.4.aar",
117
- "url": "expo.modules.video-3.0.4.aar",
118
- "size": 485680,
119
- "sha512": "41f22ad6a39595ee69984b0365d34d9f055dafa5ddd10136f8bc504f49f6e6187027d312098b332e3ac0e9291793691e9c6fb1788876cecee1bb70817b465efa",
120
- "sha256": "cb96a0042965654c89f6adce47927f90b45c68af138bf2b2716a5fa92487f49a",
121
- "sha1": "15b7f8125dbc04b715c20812de0eef5d016bbafd",
122
- "md5": "94525837f9ac35c3290ea3f2d51898e8"
116
+ "name": "expo.modules.video-3.0.5.aar",
117
+ "url": "expo.modules.video-3.0.5.aar",
118
+ "size": 485712,
119
+ "sha512": "4b623b1039f7264c3a34bdb697580be1daad931b0ffd795cf7e2c3543f88bfb171ed3f2e1b8ae297633a3fef8e0c00fcaea8ba7214a829692d264ea889155c52",
120
+ "sha256": "81ef4fc0a33ec845e113a0d85b0476dae1d73ad71e7c2964d07fd28fcad908d0",
121
+ "sha1": "337e11f92cc2dab64cf71f71cd3ce0a5f9a60f84",
122
+ "md5": "83ecaeb95367a58583f6e14bc69406f9"
123
123
  }
124
124
  ]
125
125
  },
@@ -133,13 +133,13 @@
133
133
  },
134
134
  "files": [
135
135
  {
136
- "name": "expo.modules.video-3.0.4-sources.jar",
137
- "url": "expo.modules.video-3.0.4-sources.jar",
138
- "size": 60487,
139
- "sha512": "dda0c9694adade347184346c490319c08eabc8a4f3d19043c73b55184462cde86041b3bd7bd46bf7cc9fd11e2682ec529ba267cc7eaf050abeb54547239e7270",
140
- "sha256": "5d422bb36f52c3620f86f594da1452999395789a361dd1c53d16a3e1e6c746fa",
141
- "sha1": "ab68fa1a321f5c256a72a70f5709ea397d171c02",
142
- "md5": "b7ab1c01aacdaee7b47f6c90d37a3bfa"
136
+ "name": "expo.modules.video-3.0.5-sources.jar",
137
+ "url": "expo.modules.video-3.0.5-sources.jar",
138
+ "size": 60488,
139
+ "sha512": "d1e577ae947ac37201cd33fe428a6fd9b5ca6fb098380f47ab7f137ee30110b22ba12331bf191c6e43b9b92251171b2c388366013b132d7b5a1e9921aa5d148f",
140
+ "sha256": "707670539287daf062917fc2972343114fad995d67511c24c60c76fb620c3ee0",
141
+ "sha1": "3f3a9dcecfb36423985ba8b616a1eb7a810093af",
142
+ "md5": "40a4a05e1ef8a63054f66fb03902dea4"
143
143
  }
144
144
  ]
145
145
  }
@@ -0,0 +1 @@
1
+ d6260dd4678cbbd039726f571f72ce563b0bc808fa00a27caf0521a4d36b79a3
@@ -0,0 +1 @@
1
+ aa8d382e81017c1bcf3360212c31808e518de5f95536687da6e5ae34f676a4c90f433c41d73dbc7a5d48c3591ad5be0031a77007edbe1f74d2c4f2fbc68396e1
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.video</artifactId>
12
- <version>3.0.4</version>
12
+ <version>3.0.5</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.video</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ afe1ec2253892a5187cc232eb94fce7d8c1963ed
@@ -0,0 +1 @@
1
+ 4e98712c9f8b1581bfe0e2c3f0bd8ec3640bf25c7354a46b03e2ff03ee66d9ff
@@ -0,0 +1 @@
1
+ b30f6c043c6c4a8459e851a6d4880a5323a1c75fdaaaaf50b86a8ab4f83733ab3aaef4df8961e3aba9482c8612cda24de2909ed01d562d9cb4480c5f61814018
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.video</artifactId>
5
5
  <versioning>
6
- <latest>3.0.4</latest>
7
- <release>3.0.4</release>
6
+ <latest>3.0.5</latest>
7
+ <release>3.0.5</release>
8
8
  <versions>
9
- <version>3.0.4</version>
9
+ <version>3.0.5</version>
10
10
  </versions>
11
- <lastUpdated>20250821234728</lastUpdated>
11
+ <lastUpdated>20250825161907</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- d5308a2ebd0e16005c5e94b1784c12df
1
+ fdf42c6d80bb0bd41b987f33be178d17
@@ -1 +1 @@
1
- c526c0d80bf832f377a6cd6b378d6d51880f41ca
1
+ 547a42db6e869ca392a5ad09f5c1cc41808df351
@@ -1 +1 @@
1
- e89bf3f45f791fdc45ced91305a6cf194ae3cb43a65362775605fd9c32a0aae3
1
+ 42b3d9562bad2c78f503e7df76169c01e2d86b8dcdb78ad0ff80b3f77ab5ad0e
@@ -1 +1 @@
1
- 9099a6f51e9c674e1154f74a704650252c2a8cf20fe71dab4be1acf063c4aaf02398e0ff34926c717c25d7380121e789920b4eceee61b02a00626b66ee700c01
1
+ a4cd3be51cd93e40bb8ba9489fcbb9734f6b156a7d5cf58f86c192de40ff6351926b889ff289e3565c3cefa7d7924e35ef53ce1c476f706f802fb365582010aa
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-video",
3
3
  "title": "Expo Video",
4
- "version": "3.0.4",
4
+ "version": "3.0.5",
5
5
  "description": "A cross-platform, performant video component for React Native and Expo with Web support",
6
6
  "main": "build/index.js",
7
7
  "types": "build/index.d.ts",
@@ -38,5 +38,5 @@
38
38
  "react": "*",
39
39
  "react-native": "*"
40
40
  },
41
- "gitHead": "f2270a4447fa0939e0d6f95c92bf5238e7162a73"
41
+ "gitHead": "ef0b9ecf9645d3e93587d5ee5030dbfcbf735bbd"
42
42
  }
@@ -28,6 +28,8 @@ export interface VideoViewProps extends ViewProps {
28
28
 
29
29
  /**
30
30
  * Determines whether native controls should be displayed or not.
31
+ *
32
+ * > **Note**: Due to platform limitations, the native controls are always enabled in fullscreen mode.
31
33
  * @default true
32
34
  */
33
35
  nativeControls?: boolean;
@@ -1 +0,0 @@
1
- 5d422bb36f52c3620f86f594da1452999395789a361dd1c53d16a3e1e6c746fa
@@ -1 +0,0 @@
1
- dda0c9694adade347184346c490319c08eabc8a4f3d19043c73b55184462cde86041b3bd7bd46bf7cc9fd11e2682ec529ba267cc7eaf050abeb54547239e7270
@@ -1 +0,0 @@
1
- 15b7f8125dbc04b715c20812de0eef5d016bbafd
@@ -1 +0,0 @@
1
- cb96a0042965654c89f6adce47927f90b45c68af138bf2b2716a5fa92487f49a
@@ -1 +0,0 @@
1
- 41f22ad6a39595ee69984b0365d34d9f055dafa5ddd10136f8bc504f49f6e6187027d312098b332e3ac0e9291793691e9c6fb1788876cecee1bb70817b465efa
@@ -1 +0,0 @@
1
- d4cf9d519b23ca0ffea9410404bc18961b64e1bd
@@ -1 +0,0 @@
1
- 598d722e63d1084e421ceb47b6b4f6ac2ea7c4a3cbad394f27eb543118628df4
@@ -1 +0,0 @@
1
- 3704b79c3c105a92ef277abb1e38abeea50a64c338843412c734da80c710952e590b332c4ff5e829fe59a5f390ba026785aa155fcc9cc955a7b17c3bfdecce4b
@@ -1 +0,0 @@
1
- 3c2d78ad0117afdf62531e90b82b1b50c819d877
@@ -1 +0,0 @@
1
- 04c6ec20d229daa781d3f217697aa67a0a9b628bb87b11e8ce88c9b26803fc89
@@ -1 +0,0 @@
1
- bc4827d9d8192e68bce33daaaeaca6e9abca679364f03e623f5f25d620ca3b1d1e1d75ef54ebe8980fd99aa64e70f0cdca62ce776281b5b48e1e32c691da573c