页面内容
#uploadVideo {
text-align: center;
line-height: 30px;
font-size: 12px;
overflow: hidden;
display: inline-block;
/*position: absolute;*/
width: 100px;
height: 30px;
background-color: #ccc;
border: 1px solid #000;
border-radius: 4px;
margin-top: 100px;
margin-left: -303px;
margin-bottom: -40px;
}
#progress{
display: inline-block;
width: 300px;
height: 20px;
background-color:#f7f7f7;
box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);
border-radius:4px;
background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);
margin-bottom: 160px;
margin-left: 51px;
}
#finish{
background-color: #149bdf;
background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);
background-size:40px 40px;
height: 100%;
}
<div>
<video controls="controls" id="thumbnail-preview-video" src="http://oss.zhhmgj.com/test/2.mp4" type="video/mp4" style="cursor: pointer;width: 280px;height: 210px;"></video>
<div id="progress">
<div id="finish" style="width: 0%;" progress="0"></div>
</div>
<span id="uploadVideo">
<input type="file" id="video_url" name="file" size="1" class='file' />
<a href="#" class="upVideo">上传视频</a >
</span>
<a href="#" class="fileMerge" id="fileMerges">合并压缩</a>
</div>
//视频分片上传开始
var fileForm = document.getElementById("video_url");
var upload = new Upload();
fileForm.onchange = function(){
var fileVIdeo = document.getElementById("video_url").files[0];