界面制作和排版
(1)需要定位的标签比如<span>、<image>...放到<div>中便于定位
(2)注意控制好各个<div>的距离
(3)注意别忘记负值定位
.other { margin-left: 1018px; z-index: 1; margin-top: -523px; }
视频播放器的选型
(1)插件,修改路径费劲,加载默认的第一次加载的路径,不动态改变
(2)Video标签
(3)兼容问题的解决(Flash播放器)
播放
页面跳转传值
<a href="/VideoPlayer/[email protected]"></a>
接收前台页面传来的值
var str = Request.QueryString["Guid"].ToString();
根据Guid查询地址
Guid id = new Guid(str); VideouploadModel model = UploadModel.GetVideoPathbyID(id); ViewData["id"] = model.videoPath;
查询实现方法
public static VideouploadModel GetVideoPathbyID(Guid cid) { using (Mongo mg = new Mongo(DBcon._connectionString)) { mg.Connect(); var db = mg.GetDatabase(DBcon.video); var list = db.GetCollection<VideouploadModel>( ); var query = from c in list.Linq() select c; VideouploadModel VideoPath = query.Where(c => c.Id == cid).First(); return VideoPath; } }
动态修改播放路径
@*获取视频地址*@ <a href="#" id="c" hidden="hidden">@ViewData["id"]</a> @*窗体加载时修改视频播放路径*@ var ved = document.getElementById("1"); b = document.getElementById("c").innerHTML; ved.src = b;
时间: 2024-11-14 04:12:21