Open ng-ha opened 1 month ago
Did you have a look to the logcat ? maybe you will have more information inside this log...
This happens when inserting another prop into a loaded player. It looks like Android media3 issue, and I was expecting it would be fixed in #3784 But it still seems to happen. Tricky fix is to pass source an integer(not decimal) greater than 0 for startPosition, such as 1 on Android. (currently there is a bug in media3 where it buffers indefinitely if you treat it as 0 or null)
This happens when inserting another prop into a loaded player. It looks like Android media3 issue, and I was expecting it would be fixed in #3784 But it still seems to happen. Tricky fix is to pass source an integer(not decimal) greater than 0 for startPosition, such as 1 on Android. (currently there is a bug in media3 where it buffers indefinitely if you treat it as 0 or null)
Thanks for the temporary fix! This works for me, for now.
This issue is stale because it has been open for 30 days with no activity. If there won't be any activity in the next 14 days, this issue will be closed automatically.
Version
6.3.0, 6.4.1
What platforms are you having the problem on?
Android
System Version
Android 14
On what device are you experiencing the issue?
Real device
Architecture
Old architecture
What happened?
Package works as expected in simulator.
But on real device (Pixel 6), after re-setState source, some "file:///" source cannot be load. onLoad, onReadyForDisplay doesn't get called. isBuffering is stuck at true.
First source logs:
LOG source {"uri": "file:///data/user/0/com.my.app/cache/244_d1baa119-05d9-4605-9d23-564fe94aaafb/2023121815451718545158505.mp4"} LOG onIdle LOG onLoadStart {} LOG onBuffer {"isBuffering": true} LOG onLoadStart {} LOG onVideoTracks {"videoTracks": [{"bitrate": 0, "codecs": "avc1.4D402A", "height": 1034, "index": 0, "rotation": 0, "selected": false, "trackId": "1", "width": 640}]} LOG onPlaybackStateChanged {"isPlaying": true} LOG onReadyForDisplay LOG onBuffer {"isBuffering": false} LOG onLoad {"audioTracks": [{"bitrate": 128000, "index": 0, "language": "und", "selected": true, "title": null, "type": "audio/mp4a-latm"}], "canPlayFastForward": true, "canPlayReverse": true, "canPlaySlowForward": true, "canPlaySlowReverse": true, "canStepBackward": true, "canStepForward": true, "currentTime": 0, "duration": 26.024, "naturalSize": {"height": 1034, "orientation": "portrait", "width": 640}, "textTracks": [], "trackId": "1", "videoTracks": [{"bitrate": 0, "codecs": "avc1.4D402A", "height": 1034, "index": 0, "rotation": 0, "selected": false, "trackId": "1", "width": 640}]}
Then, set second source, that second one can't be played. Second source logs:
LOG source {"uri": "file:///data/user/0/com.my.app/cache/244_d1baa119-05d9-4605-9d23-564fe94aaafb/1720928478104.mp4"} LOG onBuffer {"isBuffering": true} LOG onVideoTracks {"videoTracks": []} LOG onLoadStart {} LOG onVideoTracks {"videoTracks": [{"bitrate": 0, "codecs": "avc1.4D0029", "height": 868, "index": 0, "rotation": 0, "selected": false, "trackId": "1", "width": 640}]}
If i set that second source first ( as initial source), video is played as intended. Or i change the first source to another video, then re-set source to second one, both are played as intended. Very strange behaviour.
Reproduction
repository link
Reproduction