iOS Question [SOLVED] VideoPlayer problem/bug

JackKirk

Well-Known Member
Licensed User
Longtime User
I have successfully used the VideoPlayer (https://www.b4x.com/android/forum/threads/videoplayer-replaces-videoview.86643/) in my B4I app.

My ..._Complete event is:
B4X:
Private Sub Videoplayer1_Complete
   
    'Clean up
    Videoplayer_page.RootPanel.RemoveAllViews

    'Return to previous page
    Main.NavControl.RemoveCurrentPage
   
End Sub

Everything works fine EXCEPT:

1. If I tap the "full screen" control on the bottom right of the video player (2 diagonal arrows pointing out) so that the video is full screen.
2. Leave it in this state until the video completes.

The ..._Complete event executes but the video panel does not go away and nothing will get rid of it short of hitting the Home button and starting the app all over again.

This is a real ugly look.

As a work around, is it possible to hide the "full screen" control - its buried in a custom control and I can't figure a way to get rid of it.

Thanks in anticipation...
 

JackKirk

Well-Known Member
Licensed User
Longtime User
Does the video exits full screen mode automatically if you remove this code?
Short answer: no.

If I take out both statements and:

1. If I tap the "full screen" control on the bottom right of the video player (2 diagonal arrows pointing out) so that the video is full screen.
2. Leave it in this state until the video completes.

The screen ends up black with the Videoplayer controls visible - I can then tap the "anti full screen" control (2 diagonal arrows pointing in) and the screen will revert to the blank Videoplayer_page - I can then tap the Back button I have on this page to escape.

This is decidedly ugly and rather Machiavellian - the videos I'm playing are help videos showing the user how to use the app.

If I only take out either one of the statements I am back to the state in post #1

I have tried various CallSubDelayed schemes, all to no avail.

I would be quite happy just to be able to suppress the "full screen" control - I realise I can suppress all controls but this again is ugly - and not compatible with the sister B4A app.

I really need a solution to this - both apps are published.
 
Last edited:
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
You can hide the controls by setting ShowControls = False
Yes, I acknowledged this possibility in my last post:
I realise I can suppress all controls but this again is ugly - and not compatible with the sister B4A app.

It is not possible to only hide the full screen button.
Correct me if I'm wrong but the full screen button is in the customview? - therfor is changeable if you have the customview source?

I consider the behaviour I am observing is a bug, do you need any further proof or hold a contrary opinion?
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Correct me if I'm wrong but the full screen button is in the customview?
No. It is part of the native video player.

I consider the behaviour I am observing is a bug, do you need any further proof or hold a contrary opinion?
This is the behavior of the native player. If you think that it is a bug then you need to report it to Apple.
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
I have found a way around the issue.

Instead of putting the video player on a screen with a status bar and navigation bar I put it on a totally nude page - so the video player is full screen.

The full screen button does not appear - problem solved.

This however created 2 issues:

1. There is no Done button - the user can't escape the video until it ends - solved that by overlaying a <Back button of my own in top LH corner - bit clunky but it works.
2. The fast forward and fast back buttons in the video player controls don't seem to work - I thought Cook said iOS was much higher quality than Android.

I can live with 2.
 
Upvote 0
Top