Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Tap to fullscreen


Hi there, I want to be able to go into the fullscreen with the JWPlayer iOS SDK on a user's tap. Unfortunately when I listen to the onDisplayClick() delegate and programmatically enter the fullscreen with enterFullScreen() there are two errors that occur:
1. when I am in fullscreen and I double tap the player is not visible anymore (only a black view where the normal size player was) and the sound continues to play
2. when someone double taps on the normal size video the player gets also into the state of 1.

I tested your demo file and my implementation and the error occurs in both cases. I read that I could hide the controls but this is not an option for me. I tried to activate and deactivate the controls at some points but this forces me to load the config into the player which reloads the player, also not a desired behavior.

func onDisplayClick() {
player.enterFullScreen()
}

12 Community Answers

k...

User  
0 rated :

I also tried to to disable the controls and enable them again. However this also seems to be broken. When I disable the controls with player.controls = false, I can not enable them anymore with player.controls = true. It is especially buggy when entering the fullscreen.

Daniel Berger

JW Player Support Agent  
0 rated :

Hi,

Thank you for the question. Here is a demo that properly handles tap gestures:
http://qa.jwplayer.com.s3.amazonaws.com/~daniel/JWPlayer-Demo.zip

Please note that if you set controls to false, the expected behavior is for gestures to be ignored.

Let me know your thoughts.

k...

User  
0 rated :

Hi Daniel,

thanks fur your answer but this example does not help and is just a default implementation with all the delegates implemented. I would be glad if you could give me a solution/answer to my specific question.

Daniel Berger

JW Player Support Agent  
0 rated :

You are welcome. I don’t know exactly how you set up your project other than what you stated above. Can you please edit my project so that it reproduces your issue? Thanks.

k...

User  
0 rated :

Hi Daniel, sure as I wrote before: i just added the line of code in the onDisplayClick delegate method. It makes the player go into fullscreen. This is the project: https://wetransfer.com/downloads/686eba1e91a7fb536be1479b8174f4e220170505192559/52899679d81a390c5543ad06d82604f720170505192559/8744b0

You can see both problems I mentioned in my first post.

Daniel Berger

JW Player Support Agent  
0 rated :

Thank you. I am able to reproduce your issue. However, can I ask why your desired behavior is different than the default behavior. In other words, without implementing an special fullscreen behavior, if you double tap the player it goes to full screen. Why then are your trying to implement enterFullScreen with onDisplayClick. It seems redundant. Thanks again.

k...

User  
0 rated :

Not redundant. Just a feature I need to implement. When the user taps on the video it should go to fullscreen.

Daniel Berger

JW Player Support Agent  
0 rated :

Thanks. The current expected behavior of our iOS SDK is that when a user double taps the player it goes to full screen (both in portrait and landscape). You can however set both forceFullScreenOnLandscape and forceLandscapeOnFullScreen to true. That would make the player default to landscape full-screen on double tap. Here is a code example:
http://qa.jwplayer.com.s3.amazonaws.com/~daniel/JWPlayer-Demo%202.zip

k...

User  
0 rated :

Hi Daniel,
thanks for your reply. This is not the behavior I need. I am aware of the attributes you mentioned but that won't help with the problem I am facing. I need to detect a single tap on the player (not the controls) and then go into fullscreen. Your provided displayClick should do the trick but it does not and I don't have any other point I can listen to to listen for a tap. The workaround would be to put a button on top of the player and then go into fullscreen but this would cover the controls which is not an ideal solution.

Daniel Berger

JW Player Support Agent  
0 rated :

Hi again Keven. Thanks for clarifying. Our SDK is not designed to implement full screen with a single touch event. Even if you implemented such behavior, it would then interfere with the behavior of the player during playback (for example, stop, start, pause, etc.). From a customer experience stand-point, users expect to double tap to enter full screen.
Would you like to schedule a quick phone chat to discuss other possible solutions?

k...

User  
0 rated :

Hi Daniel, thanks for the reply. Don't hink a phone call is necessary since it won't change things ;) I would not say that users in general expect the double tap feature. Looking at some modern apps like Facebook, they go into their own fullscreen container after a tap as well. But it seems like we have to find a workaround to get what we want. Maybe you could give the devs access to the player view (the one behind the controls). This way we could add our own recognizer on that view. I give up at that point. You can close the ticket/thread.

Daniel Berger

JW Player Support Agent  
0 rated :

Thank you for following up. I wanted to at least offer a quick chat.
I understand your ideal behavior but that is just not how our player is designed. Please let me know if you have any other questions. Happy streaming.

This question has received the maximum number of answers.