ajax 上传视频 h5及时播放

这篇博客介绍了如何使用Ajax进行视频文件上传,并结合H5技术实现实时播放上传的视频。通过SSM框架(Spring、SpringMVC、MyBatis)的Controller处理上传请求,对文件大小进行限制,确保上传的视频不会过大。成功上传后返回视频路径,以便前端进行播放操作。
摘要由CSDN通过智能技术生成
<%@ page trimDirectiveWhitespaces="true" language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="session"/>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<jsp:include page="../comm/head.jsp"/>
<script type="text/javascript" src="${ctx }/ueditor/ueditor.config.js"></script>
   <script type="text/javascript" src="${ctx }/ueditor/ueditor.all.js"></script>
   <script type="text/javascript" src="${ctx }/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" src="${ctx }/static/ajaxfileupload.js"></script>
   <script type="text/javascript" src="${ctx }/static/imglimit.js"></script> 
</head>
<body>
<jsp:include page="../comm/topnav.jsp"/>
<div class="container">
<div class="row">
<div class="col-sm-12">
<jsp:include page="../comm/breadcrumb.jsp"/> 
<!-- <input type=file id="appFile" name="appFile" οnchange="getValue();" style="-moz-opacity:0;filter:alpha(opacity=0);opacity:0;position:absolute;left:166px;" />  
<input id="appFilename" style="color: green;border: 1px solid green;width:300px;" />  
<input type="button" value="File" style="border: 1px solid green;width:80px;" /> 
        <input  type="button" value="提交" οnclick="add();"> -->
<form class="form-horizontal" action="${ctx }/video/save" method="post" id="messageForm">
<div class="form-group">   
<label class="col-sm-2 control-label" for="appFile">图片:</label>
<div class="col-sm-5">
<input id="appFile" name="appFile" οnchange="document.getElemen
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值