Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

always show video controls

Posted on 2013-11-07
9
3,801 Views
Last Modified: 2013-11-16
Hello:

How do I always show the video controls on a HTML 5 Video Player? The only time they show is when the mouse hovers over the screen.

	<div id="video-container">
		<!-- Video -->
		<video id="video" width="640" height="365" poster="images/logo.png">
		  <source src="demo.mp4"  type="video/mp4">
		</video>
		<!-- Video Controls -->
		<div id="video-controls">
			<button type="button" id="play-pause" class="play">Play</button>
			<input type="range" id="seek-bar" value="0">
			<button type="button" id="mute">Mute</button>
			<input type="range" id="volume-bar" min="0" max="1" step="0.1" value="1">
			<button type="button" id="full-screen">Full-Screen</button>
		</div>
	</div>

Open in new window

0
Comment
Question by:RecipeDan
  • 4
  • 3
  • 2
9 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39632124
We will need a link to the page to do a diagnostic.

Cd&
0
 
LVL 1

Author Comment

by:RecipeDan
ID: 39632319
It is not pubic yet. I am creating it on my laptop.
0
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 39632566
<video controls="true" will give you the default controls all the time, if that is what you need.  

According to the documentation, you can use control id "<<video-id>>-video-controls.  So rather than using the id "video-controls" on your controls div, try using "video-video-controls"

See http://dev.opera.com/articles/view/custom-html5-video-player-with-css3-and-jquery/ for full information on building custom video player.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 1

Author Comment

by:RecipeDan
ID: 39632719
@GeoffSutton. Thank you but I am not familiar with JQuery. What I am trying to do is similiar to YouTube Videos where the video controls are always shown.
0
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 39633923
Try just adding the controls parameter to the video tag.  That will give you controls, although not the ones that you want.  Also, reading the page that I sent you, you can see how they used the naming scheme to link the controls to the video element.  I also strongly recommend becoming familiar with jQuery as it dramatically simplifies element manipulation and makes your job as a developer so much simpler :)
0
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 39633972
Here is a great blog showing you how to wire up custom controls.  You have to use javascript, and it contains no jQuery for you.
http://blog.teamtreehouse.com/building-custom-controls-for-html5-videos

HTH,
G
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39633985
dramatically simplifies element manipulation and makes your job as a developer so much simpler

Actually what jquery does is teach you how to avoid learningcoding and understanding how things work; basically crippling your development unless you are already skilled in classical javascript, and knowledgeable of how client technologies work together.

Cd&
0
 
LVL 1

Author Comment

by:RecipeDan
ID: 39635051
@GeoffSutton. The link with the example is exactly what I am talking about. When you run the example, the custom control bar appears and disappears when the mouse is hovered over the video. What I want to do is make that custom control bar always visible.
0
 
LVL 10

Accepted Solution

by:
GeoffSutton earned 500 total points
ID: 39635102
Set a mouseover event on the video element, then using that set the  control element css visible to 'visible'
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
edit .asp files 5 31
forgetful about js objects 8 46
Implement a function similar to grep in vanilla Javascript 3 19
2 separate CSS animations 2 16
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question