<
scripttype="text/javascript">
functioncreateVideoUploader() {
varuploader =
newqq.FileUploader({
element: document.getElementById(
'file-uploader-demo1'),
action:
'FileUpload.ashx',
template:
'<div class="qq-uploader">'+
'<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>'
+
'<div class="qq-upload-button">Video Yükle</div>'
+
'<ul class="qq-upload-list"></ul>'
+
'</div>'
,
multiple:
false,
allowedExtensions: [
'flv',
'mov',
'mp4',
'avi',
'3gp',
'mgp',
'wmv'],
debug:
true,
onComplete:
function(id, fileName, responseJSON) {
if(responseJSON.success)
$(
"#videoContainer").append("<div
class='player' style='display:block;width:400px;height:400px;background-image:url("+ responseJSON.image +
");' href='"+
responseJSON.path + "'><img src='img/play_large.png' alt='Play this video' /></div>");
flowplayer(
"div.player",
"../flowplayer/flowplayer-3.2.7.swf",
{
clip: {
autoPlay:
false,
autoBuffering:
true
}
});
}
});
}
// in your app create uploader as soon as the DOM is ready
// don't wait for the window to load
$(
function() {
createVideoUploader();
//createAudioUploader();
});
</script>