Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

always show video controls

Posted on 2013-11-07
9
Medium Priority
?
4,656 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
[X]
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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

618 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