This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<div class="bar-container"> | |
<div class="bar"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="box">OMG! I'm centered!</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global document, URL, alert */ | |
// TODO: Check support for video types & URL.createObjectURL() function | |
// NOTE: IE9 doesn't seem to support URL object, but a polyfill seems to exist: https://gist.github.com/arv/1384398 | |
function getDuration(videoFile, callback) { | |
'use strict'; | |
var type = videoFile.type; | |
var videoEl = document.createElement('video'); | |
videoEl.preload = 'metadata'; |
NewerOlder