<body>
<video onclick="aa()" class='my-video' playsinline="" webkit-playsinline="" autoplay='autoplay' controls='controls' style='height: 300px !important;width: 100%;'>
<source src='file:///var/mobile/Media/DCIM/124APPLE/IMG_4156.MOV' type='video/mp4'></source>
</video>
</body>
<script type="text/javascript">
function aa(){
var filepath = "file:///var/mobile/Media/DCIM/124APPLE/IMG_4156.MOV";
//var filepath = "_doc/filecache/124APPLE/IMG_4156.MOV";
var fpath = decodeURI(filepath);
alert(fpath);
docompress(fpath);
}
function docompress(path) {
plus.zip.compress(path,path,function(){
alert("success:"+path);
uploadVideoZip(path);
},function(error) {
alert("fail:"+JSON.stringify(error));
});
}
</script>
[结果]
{"code":-4,"message":"文件不存在"}
0 个评论
要回复文章请先登录或注册