Note: Generic Bids will be ignored. Please read it fully and share your solution, what do you purpose.
We are searching for a developer who can help us out to tackle an issue we are experiencing with our Android video player in React Native.
The problem we are facing is the following:
We create the player controls dynamically.
This means that we're able to add/remove controls while the player is active.
This works fine on Android (native), however when we use our Android SDK via React Native the controls do not appear.
We are creating the player UI (FrameLayout and other Views) in the createViewInstance call.
We have a property to define a streamId and after a valid streamId is set we create another internal View, we inflate a layout into an existing FrameLayout.
The inflated layout have size 0 x 0 and this is the problem.
If we inflate the same layout when the Player is created it has a size, although elements seem not to be in the correct position once the player shows.
This is the repository and branch that contains the react native project: [login to view URL]
The example folder contains a demo app that should be able to play back the live stream and demonstrate the issue when running on Android.
The branch use-only-playerview has a LiveryPlayerView and LiveryPlayerControlView which are used instead of the views in our native SDK. This is a smaller test case which allows you to test and fix the issue without the need to work within our native SDK.
As mentioned above we know that creating the controls view and showing it when the PlayerView is constructed works but this is not what we are looking for.
We need to keep the controls view gone (not invisible) and show it when tapping on the player view. The click event is being handled by the controls view, the controls view is set to visible/gone but its size is always 0x0.
The fix we are looking for is the controls view to show with the correct size when tapping without having to make it visible in the PlayerView constructor.
Also we noticed that rotating the device makes the controls to have the proper size. Seems that the configuration update when rotating the device makes the controls view to be updated while setting it to visible does not.
We have tested the following cases:
1. create LiveryPlayerView with gone LiveryPlayerControlView on createViewInstance and start playing on createViewInstance DOES NOT WORK: controls visible but with size 0x0 and this is the problem
2. create LiveryPlayerView and start playing on createViewInstance works: controls are visible, LiveryPlayerControlView are set to visible and the problem is when setting to visible outside createViewInstance method
3. create LiveryPlayerView with visible LiveryPlayerControlView on createViewInstance and start playing on setStreamId: controls are visible however this is not what we are looking for (explained above)
4. create LiveryPlayerView with invisible (not gone) LiveryPlayerControlView on createViewInstance and start playing on setStreamId: controls are visible on tap however this is not what we are looking for (explained above)
5. create FrameLayout on createViewInstance and create LiveryPlayerView and LiveryPlayerControlView on setStreamId and start playing: nothing is visible, only FrameLayout
In case 5. after rotating the device the player appears. If you tap a odd number of times the control is set to visible and after a device rotation they appear
In case 1 after device rotation the controls appear as long as they are visible.