Skip to content

Commit

Permalink
got it working with videos
Browse files Browse the repository at this point in the history
  • Loading branch information
Boaz Sender authored and Boaz Sender committed Sep 10, 2011
1 parent f32b64e commit 4f2a90a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/remixer.js
Expand Up @@ -16,14 +16,12 @@ jQuery(function($){
.bind( 'drop', function( e ) {
e.stopPropagation();
e.preventDefault();

console.log( e.dataTransfer.files )


$.each( e.dataTransfer.files, function(index, file){
var fileReader = new FileReader();
fileReader.onload = (function(file) {
return function(e) {
$('#bin1').append( file.fileName + '<img src="'+ e.target.result +'">')
$('#bin1').append( '<video width="100px" draggable="true" controls src="'+ e.target.result +'">')
};
})(file);
fileReader.readAsDataURL(file);
Expand Down
4 changes: 4 additions & 0 deletions styles/style.css
Expand Up @@ -13,4 +13,8 @@
width: 30%;
border: 1px solid #c2c2c2;
background: none;
}

#bin1 video, #bin2 video {
margin: 10px;
}

0 comments on commit 4f2a90a

Please sign in to comment.