Avatar of onyourmark
onyourmark

asked on 

get file length (number of minutes and seconds

I have  a page with videos (see attached code). I  want to have something under the name of each of the videos that tells how long it is.  So for example, next to the phrase "HOW TO Register at the WileyPlus website" I would like it to say 05:24 or something like that

HOW TO Register at the WileyPlus website. 05:24 mins.

I think that the length of the video is available but I don't know how to access it and display it on the webpage.

Can anyone suggest what I need to do?
Thank you.
P.S. Some suggested using this but I am not sure how to use it:
 seconds = document.mediaobject.GetDuration() / document.mediaobject.GetTimeScale()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Statistics 2011</title>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<meta name="keywords" content="data mining, text mining, weka, neural network, classification, clustering, weka tutorial, weka video, knowledge explorer, sentiment mining">
	<meta name="description" content="A series of Weka screencasts that show you how to use Weka for text mining.">
	<link rel="stylesheet" type="text/css" href="css/reset-min.css" media="all">
	<link rel="stylesheet" type="text/css" href="css/style.css" media="all">
	<link rel="stylesheet" type="text/css" href="css/fancybox/jquery.fancybox-1.2.6.css" media="all">
	<!--[if IE]>
	<link rel="stylesheet" type="text/css" href="css/ie.css" media="all">
	<![endif]-->
	
	<script type="text/javascript" src="js/swfobject.js"></script>
	<script type="text/javascript" src="js/jquery-1.4.min.js"></script>
	<script type="text/javascript" src="js/jquery.fancybox-1.2.6.pack.js"></script>
	<script type="text/javascript" src="js/flowplayer-3.1.4.min.js"></script>
	<script type="text/javascript" src="js/weka.js"></script>
</head>
<body><div class="sentimentcss">
A series  of screencasts .</div>
<div style="float:right;">
  <script type="text/javascript"><!--
google_ad_client = "pub-8152624590362711";
/* 300x250, created 2/12/10 */
google_ad_slot = "9660156087";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>

<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<div class="wrapper">
  <h1><a href="index.php">Statistics for Fall 2011</a></h1>
		 Some basic Statistics videos are at <a href="http://www.sentimentmining.net/StatisticsVideos"> www.sentimentmining.net/StatisticsVideos</a>
	<br>
Some videos on the R programming language for Statistical Computing are at <a href="http://sentimentmining.net/StatisticsWithR/"> http://sentimentmining.net/StatisticsWithR/</a>	
		
  <ul id="videos">
			<li id="video-1">
				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
				<div class="details">
					<h2>HOW TO Register at the WileyPlus website</h2>
					<a href="#" class="watch">Watch</a>
					<a href="mp4/RegisterForWileyPlus.mp4" class="download">Download</a>
				</div>
			</li>
			
	<li id="video-2">
				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
				<div class="details">
					<h2>Chapter 2 Statistics Qualitative Frequency Distributions</h2>
					<a href="#" class="watch">Watch</a>
					<a href="mp4/Chapter 2 Statistics Qualitative Frequency Distributions.mp4" class="download">Download</a>
				</div>
			</li>
			<li id="video-3">
				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
				<div class="details">
					<h2>Chapter 2 Stem-and-Leaf  Dotplots Outliers</h2>
					<a href="#" class="watch">Watch</a>
					<a href="mp4/Chapter 2 Stem-and-Leaf  Dotplots Outliers.mp4" class="download">Download</a>
				</div>
			</li>
						<li id="video-3">
				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
				<div class="details">
					<h2>Chapter 2 Uses and Misuses of Graphs</h2>
					<a href="#" class="watch">Watch</a>
					<a href="mp4/Chapter 2 Uses and Misuses of Graphs.mp4" class="download">Download</a>
				</div>
			</li>
						</li>
						<li id="video-3">
				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
				<div class="details">
					<h2>Chapter 3 Box-and-Whisker Plot</h2>
					<a href="#" class="watch">Watch</a>
					<a href="mp4/Chapter 3 Box-and-Whisker Plot.mp4" class="download">Download</a>
				</div>
			</li>
									</li>
						<li id="video-3">
				<font face="Verdana, Geneva, sans-serif" color="#6d6d6d" size="8"></font>
				<div class="details">
					<h2>Chapter 3 Uses and Misuses Unemployment Rates</h2>
					<a href="#" class="watch">Watch</a>
					<a href="mp4/Chapter 3 Uses and Misuses Unemployment Rates.mp4" class="download">Download</a>
				</div>
			</li>
  </ul>
		
</div>			
		
	
</body>
</html>

Open in new window

JavaScriptHTML

Avatar of undefined
Last Comment
onyourmark
Avatar of Minh Võ Công
Minh Võ Công
Flag of Viet Nam image

ASKER CERTIFIED SOLUTION
Avatar of Minh Võ Công
Minh Võ Công
Flag of Viet Nam image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of onyourmark
onyourmark

ASKER

Hello. Thanks. I need the length in time and seconds for an mp4 file before it is loaded actually to be diplayed on the page so the user will know how long it is and so they can decide before loading it how long it is.
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo