user2247744
user2247744

Reputation: 135

Hide Control bars in video Player Android phonegap

I want to play a video on onload in the android phone without showing the Control bars.I used Html5 video tag and it works fine in all browsers but it doesn't work in android phones.

<video src="myvideo.mp4" autoplay></video>

So I tried using Video player plugin in Phonegap and the video plays on onclick but I couldn't hide the control bar. Is there any way to remove/hide the video control bars?

Upvotes: 1

Views: 996

Answers (2)

Prashant Hadole
Prashant Hadole

Reputation: 36

You can do it by using hiding controls attribute of video tag If you mentioned it, means it display control bar

<video src="myvideo.mp4" controls autoplay></video>

Or you can set its value as false

Upvotes: 0

BalajiG
BalajiG

Reputation: 529

I have used video.js plugin with which you can play the video and also can control the control bar. I have provided the link for video.js

http://blog.videojs.com/post/57828375480/hiding-and-showing-video-player-controls

And also in this they have control to hide and show the control bar when the mouse moves out and comes back to the screen. As this is a mobile , i will give suggestion to do this.

Below is the code to hide the control bar in video.js

controlBar.addClass('vjs-fade-out'); Below is the code to show the control bar in video.js

controlBar.removeClass('vjs-fade-out'); You can hide the control panel after the person has not touched the mobile and show the control panel when he touches it. Now you have the way to hide and show the control bar of the video player and so you have to think of logic to use it effectively.

Upvotes: 1

Related Questions