VideoView Listeners are not triggered in Android (Native Module)
オープン
まだ誰も着手していません。
Issue: Author Provided Repro
Platform: Android
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
I wrote a VideoPlayer in Java which uses Android's VideoView but the VideoView listeners like onPrepared, onError etc are not triggered at all.
I understand the following from the logs:
- Uri was set successfully.
- Request Focus was successful
There are no errors in the logs.
Steps to reproduce
- npm i
- npm run android
This will launch the VideoPlayer Component straight away.
React Native Version
0.76.5
Affected Platforms
Runtime - Android
Output of npx react-native info
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M3
Memory: 96.98 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.4
path: ~/.nvm/versions/node/v18.20.4/bin/node
Yarn:
version: 3.6.4
path: ~/.nvm/versions/node/v18.20.4/bin/yarn
npm:
version: 10.7.0
path: ~/.nvm/versions/node/v18.20.4/bin/npm
Watchman:
version: 2024.12.02.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12700392
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: false
Stacktrace or Logs
There's no crash or failure.
Reproducer
https://github.com/mathews-cometchat/reproducer-video-view
Screenshots and Videos
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、リンクされた再現用アプリを npm i と npm run android で実行し、その Java ネイティブモジュール VideoPlayer と Android VideoView の使用箇所を調べます。欠落している onPrepared コールバックと onError コールバックを再現して、期待される動作を特定します。関連するリスナーがエラーなしで確実にトリガーされれば、issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, java, react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100