Solved

always show video controls

Posted on 2013-11-07
9
4,231 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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 …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

707 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