github TheWidlarzGroup/react-native-video v6.20.0

latest release: v7.0.0-beta.15
one hour ago

35 pull requests merged to support/6.x.x since 6.19.3. All of them are fixes; there is no new API. Read "Behaviour changes" before upgrading: six fixes change what an app observes, all towards the documented behaviour.

Behaviour changes

  • iOS: onProgress.currentPlaybackTime is in milliseconds, as documented and as on Android. It was emitted in seconds. If you divided by 1000 only on Android or multiplied on iOS, remove that workaround. (#5059)
  • iOS: disableAudioSessionManagement applies only to the view that sets it. One opted-out <Video> used to switch audio session management off for every player in the app, and it could not skip the view's own first configuration. (#5133)
  • Web: volume and setVolume() use the documented 0.0–1.0 range. Web divided the value by 100, so volume={1} played at 1%. (#5053)
  • Android: the decoder type is reported correctly. hardware and software were swapped. The temporary Widevine MediaDrm instance is now always released. (#5063)
  • Android: DRM sources set with source.drm force a SurfaceView, as the deprecated top-level drm already did. With viewType="texture" / useTextureView and DRM you now get a SurfaceView (affects overlays, animations and screenshots of the video). (#5075)
  • Android: asset sources are opened per request instead of sharing one eagerly opened data source. A broken asset now fails at playback, with Media3's error, instead of at source creation. (#5068)

Fixes

Android

  • Don't crash on a source with contentStartTime (#5238, fixes #5237)
  • Only one player moves into the PiP window; fixes the crash on return from PiP with two <Video> mounted (#5239, fixes #4363)
  • Avoid an NPE in onBuffering after the player is released (#5166)
  • Add a null check for the player in videoLoaded() (#5026, fixes #4902)
  • Build with OkHttp 5: the playback service no longer uses OkHttp's internal list helper (#5174, fixes #5173)
  • Reset the playback service connection on cleanup (#5056)
  • Implement native viewType switching in ExoPlayerView (#4871)
  • Match selectedTextTrack index against the flat track position (#5031)
  • Report the selected track in onTextTracks / onAudioTracks with controls (#4920, fixes #4918)
  • Mark the manifest track lookup as worker-only (#5047, fixes #4885)
  • Isolate source request headers between sources (#5066)
  • Source scheme check works in the Turkish locale (#4770)

iOS

  • Keep playing after seek() when controls are enabled (#5251)
  • Stop IMA ads when the video view is removed; the ad no longer keeps playing after unmount (#5218, fixes #4866)
  • Cancel an in-flight setSrc when the view is removed (#5223, refs #3567)
  • Cancel stale source initialization (#5072)
  • Clean up and replace Now Playing observers (#5060)
  • Tear down the Picture in Picture controller when the view is removed (#5196)

tvOS

  • tvOS RCTPictureInPicture stub conforms to AVPictureInPictureControllerDelegate, fixing the tvOS build (#5182, fixes #5181)

Web

  • Respect resizeMode (#5046, fixes #4297)
  • Handle asynchronous media command failures (#5055)
  • Guard screen.orientation.unlock on browsers without it (#5205)

Windows

  • Keep playback state per view (#5074)
  • Preserve fractional event times (#5073)

Types

  • Accept bundled video asset ids (require('./video.mp4')) as source (#5049, fixes #4901)
  • Expose the current playback time on progress events (#5077)
  • Match the native manager return values (#5078)

Docs and CI

  • List web as a supported platform for resizeMode (#5219)
  • Run Swift-Format on macos-latest (#5222); SwiftFormat 0.63 formatting (#5134); copyright year (#5158)

Thanks

@OskarEichler, @Okelm, @huytdps13400, @roidayan1, @mziolkowskii, @mandeep-ovo, @bnalwalid, @sergeich, @saseungmin, @evoactivity, @janpe, @mjattph, @filipef101, @yocontra, @stychina

Full changelog: v6.19.3...v6.20.0

Don't miss a new react-native-video release

NewReleases is sending notifications on new releases.