videos.js
1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// Author Igor Amorim - www.igoramorim.com
//
function check_subtitle(file) {
var accepted_file_types = ["srt"];
return check_type(file, accepted_file_types)
};
function check_video(file) {
var accepted_file_types = ["flv", "ts", "avi", "mp4", "mov", "webm", "wmv", "mkv",];
return check_type(file, accepted_file_types)
};
function check_type(file, accepted_file_types) {
var ext = file.value.substring(file.value.lastIndexOf('.') + 1).toLowerCase();
var isValidFile = false;
for (var i = 0; i < accepted_file_types.length; i++) {
if (ext == accepted_file_types[i]) {
isValidFile = true;
break;
}
}
if (!isValidFile) {
file.value = null;
alert("Apenas os formatos abaixo são aceitos:\n\n" + accepted_file_types.join(", "));
}
return isValidFile;
};
$(function(){
$("#url").hide();
$("#legend").hide();
$("#link_cc").click(function(){
$("#url").show('slow');
$("#legend").hide('slow');
});
$("#link_recognize").click(function(){
$("#url").show('slow');
$("#legend").hide('slow');
});
$("#link_normal").click(function(){
$("#url").show('slow');
$("#legend").show('slow');
});
$(function(){
flowplayer("player2", "/player/flowplayer-3.2.9.swf",{
onFinish: function(){ this.getPlugin("play").hide(); },
canvas: { backgroundColor: "#FFFFFF" }
});
});
});