TheWidlarzGroup / react-native-video

A <Video /> component for react-native
http://thewidlarzgroup.github.io/react-native-video/
MIT License
7.15k stars 2.88k forks source link

[BUG]: In iOS, seek is working perfect in portrait mode but when i rotate my device in landscape then on seek i am getting JSON value '0' of type NSNumber cannot be converted to NSDictionary #3547

Closed GuruReactDev closed 1 month ago

GuruReactDev commented 7 months ago

Version

v5 (Stable)

What platforms are you having the problem on?

iOS

Architecture

Old architecture

What happened?

I am working on project which includes video player, orientation and many more integrations. In portrait mode when i click on seek then it's working fine but when in rotate my device in landscape and then try to seek then i am getting JSON value '0' of type NSNumber cannot be converted to NSDictionary and app get crashed.

ref.current.seek(parseInt(progress.currentTime) - 10);

this is my code for backword which works fine in android in both modes but in iOS it's getting crashed in landscape mode

Reproduction

Step to reproduce this bug are:

Open app-> go to play list -> click on any video -> click on rotate device -> click on seek (forword/backword) . It's getting crashed

KrzysztofMoch commented 7 months ago

Hey @GuruReactDev, cloud you check if this issue is also in v6 (beta) ?

GuruReactDev commented 7 months ago

Hey @GuruReactDev, cloud you check if this issue is also in v6 (beta) ?

I tried v6(beta) but here i am getting error before app splash screen.

Screenshot 2024-02-28 at 3 34 12 PM
CodeBrewLabs7 commented 7 months ago

Hey @GuruReactDev, if I forcefully change the orientation of the app and play a video in fullscreen, it still remains in portrait mode. It should remain landscape. I'm facing this issue on the iOS side. If you have any clues, please suggest them to me.

GuruReactDev commented 7 months ago

Hey @GuruReactDev, if I forcefully change the orientation of the app and play a video in fullscreen, it still remains in portrait mode. It should remain landscape. I'm facing this issue on the iOS side. If you have any clues, please suggest them to me.

@CodeBrewLabs7 i am facing the same issue with orientation in iOS and trying to find a way to do it but didn't find any solution yet

KrzysztofMoch commented 7 months ago

I wasn't able to reproduce issue with seek and with installation on v6

Dav2015 commented 6 months ago

Hey @GuruReactDev, cloud you check if this issue is also in v6 (beta) ?

I am build a TV app that uses React Native Video testing in Android, having issues, with the seek operation. On V5 after some seek operations, the video freezes and the audio continues. On V6 after some seek operations, the frame jumps back then forward, creating some distortions on the image.

On V6 works everything well on the Android Emulator, but on real AndroidTV this issues happen.

I will be opening a ticket with more information.

GuruReactDev commented 6 months ago

I wasn't able to reproduce issue with seek and with installation on v6

I have installed this packages in my project, Maybe any package conflict

"dependencies": { "@joaosousa/react-native-progress-steps": "^0.4.0", "@miblanchard/react-native-slider": "^2.2.0", "@react-native-async-storage/async-storage": "^1.17.11", "@react-native-camera-roll/camera-roll": "^7.4.1", "@react-native-clipboard/clipboard": "^1.11.1", "@react-native-community/netinfo": "^9.3.7", "@react-navigation/native": "^6.1.1", "@react-navigation/native-stack": "^6.9.7", "apisauce": "^2.1.6", "lodash": "^4.17.21", "moment": "^2.29.4", "react": "18.1.0", "react-native": "0.70.6", "react-native-awesome-alerts": "^2.0.0", "react-native-calendars": "^1.1293.0", "react-native-circular-progress-indicator": "^4.4.2", "react-native-device-info": "^10.3.0", "react-native-document-picker": "^8.1.3", "react-native-gesture-handler": "^2.9.0", "react-native-image-picker": "^5.0.2", "react-native-indicators": "^0.17.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-keyboard-aware-view": "^0.0.14", "react-native-linear-gradient": "^2.6.2", "react-native-orientation-locker": "^1.6.0", "react-native-pell-rich-editor": "^1.9.0", "react-native-popover-view": "^5.1.7", "react-native-progress": "^5.0.1", "react-native-progress-steps": "^1.3.4", "react-native-reanimated": "^2.14.4", "react-native-reanimated-carousel": "^3.3.0", "react-native-render-html": "^6.3.4", "react-native-responsive-dimensions": "^3.1.1", "react-native-responsive-screen": "^1.4.2", "react-native-safe-area-context": "^4.4.1", "react-native-screens": "^3.18.2", "react-native-step-indicator": "^1.0.3", "react-native-svg": "^15.0.0", "react-native-toast-message": "^2.2.0", "react-native-vector-icons": "^9.2.0", "react-native-video": "^5.2.1", "react-native-video-controls": "^2.8.1", "react-native-video-player": "^0.14.0", "react-native-view-pdf": "^0.14.0", "react-native-walkthrough-tooltip": "^1.5.0", "react-native-webview": "^13.6.2", "react-native-youtube-iframe": "^2.3.0", "rn-fetch-blob": "^0.12.0" }, "devDependencies": { "@babel/core": "^7.12.9", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^2.0.0", "babel-jest": "^26.6.3", "eslint": "^7.32.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "0.72.3", "react-test-renderer": "18.1.0" },

freeboub commented 4 months ago

Hey @GuruReactDev, cloud you check if this issue is also in v6 (beta) ?

I am build a TV app that uses React Native Video testing in Android, having issues, with the seek operation. On V5 after some seek operations, the video freezes and the audio continues. On V6 after some seek operations, the frame jumps back then forward, creating some distortions on the image.

On V6 works everything well on the Android Emulator, but on real AndroidTV this issues happen.

I will be opening a ticket with more information.

I had similar issue yesterday on a real device. I fixed it by disabling texture View: useTextureView={false} Let me know if it is better with that please ?

freeboub commented 4 months ago

@GuruReactDev were you able to upgrade to V6.0.0 ?