Edit D:\AVA\AVAStandard\AVA.ResourcesPlatform.WebUI\Themes\NewtonTheme\Control\My\MyVideoSWEdit.ascx
??<%@ Control Language="C#" AutoEventWireup="true" Inherits="AVA.ResourcesPlatform.WebUI.Control.My.MyVideoSWEdit" %> <%--<%= new MyVideoNavInstance(this) { Local = MyVideoNavItem.??????, Video = this.Video }.ToHtml() %--%> <div class="flat<%-- data-box--%> dataControl"> <%-- <div class="head"> <span class="title">????????</span>????????????<span class="f_r"> </span> </div>--%> <div class="userInput body"> <form id="frmVideoSWEdit" action="" method="post" onsubmit="return false;"> <table border="0" cellpadding="2px" cellspacing="2px" class="table-cleaned"> <%-- <% if (Has(this.ViewData["_VideoSW"]) == false) { //???????????? %>--%> <tr id="AVAPlayerContainerTR"> <td colspan="2"> <div style="margin-top: 10px;"></div> <%-- <div id="JWPlayerHTML4">??????????????????????????????????????????????????lash?????</div>--%> <div style="position: relative; height: 330px; width: 600px;"> <div id="divVideoNotFoundMessage" style="display: none"> </div> <div style="position: absolute;"> <div id="JWPlayerHTML5"></div> </div> </div> <script type="text/javascript" src='<%= Request.WebPath()+"/Tools/JWPlayer/jwplayer.js" %>'></script> <script type="text/javascript"> if ('<%= this.VideoResourcePath.VideoShow %>' == '') { flash("???????????????????????????????????????"); } if ('<%= this.VideoResourcePath.Message %>' != '') { flash("<%= this.VideoResourcePath.Message %>"); } var nrURL = "<%= this.VideoResourcePath.VideoShow %>"; //var nrURL = "http://localhost:15148/upload/video/06d3fedbb4904f3e969fce268343c3f7/test.mp4"; var hdURL = "<%= this.VideoResourcePath.HighDefinition %>"; function changeVideo(pos, statue) { currentPos = jwplayer("JWPlayerHTML5").getPosition(); jwplayer("JWPlayerHTML5").load(nrURL); jwplayer("JWPlayerHTML5").onPlaylistItem(function () { jwplayer("JWPlayerHTML5").seek(currentPos); }) } var MobileClient = function(){ var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; if( bIsIpad || bIsIphoneOs || bIsAndroid){ return true; } return false; } //var isFlash = (navigator.userAgent.indexOf("iPad") == -1 && navigator.userAgent.indexOf("iPhone") == -1); var isFlash = !MobileClient(); MP4Player(nrURL,<%= this.ViewData["_VideoSW.Seconds"] != null ? this.ViewData["_VideoSW.Seconds"].ToDouble()/1000 : 0%>); function MP4Player(url, seek) { url = FormatHTML5Path(url); <%if (this.VideoResourcePath.IsRTMP) { //this.VideoResourcePath.IsRTMP %> var fileurl = url.slice(url.lastIndexOf("//") + 1), streamerurl = url.slice(0, url.lastIndexOf("//") ); if(!isFlash){ url = url.replace(/\/\//g,"/"); var hlsurl = "http://" + url.slice(6,url.lastIndexOf(":")+1) +"<%= SettingGroup.HlsVodPort %>" + url.slice(url.lastIndexOf(":")+5, url.length); streamerurl = "start"; } <% } %> jwplayer("JWPlayerHTML5").setup({ //flashplayer: '<%= Request.WebPath()+"/Tools/JWPlayer/AvaPlayer.swf" %>', controlbar: 'bottom', image: "<%= SettingGroup.VideoCoverL(this.Video) %>", poster:"<%= SettingGroup.VideoCoverL(this.Video) %>", autostart: "false", <% if (this.VideoResourcePath.IsRTMP) {%> file: fileurl,// 6.0 ??????url???mp4:filename.mp4 streamer: streamerurl, <% } else {%> file: url, streamer: "start", <% } %> height: 345, width: 586, modes: [ { type: 'flash', src: '<%= Request.WebPath()+"/Tools/JWPlayer/AvaPlayer.swf" %>' }, { type: 'html5' } ], plugins: { '<%= Request.WebPath()+"/Tools/JWPlayer/Helper/CueSWHelper.swf" %>': { dockname: '??????', title: "<%= this.Video.Name.ToScriptChar() %>", introduction: "????????<%= this.Video.Description.ToScriptChar() %>..", repeatable: false, // dimensions: '100x50', // editable: false, list_item_height: 40, list_width: 320, // url: '<%= Request.WebPath() %>/Tools/JWPlayer/Service/VideoSWXMLAdd.aspx?Guid=<%= this.Video.Guid %>&TemplateGuid=<%= new Random().Next() %>', <% if (this.Video._ListVideoSW.Count > 0) { %> file: "<%= Request.WebPath() %>/Tools/JWPlayer/Service/VideoSWXML.aspx?Guid=<%= this.Video.Guid %>&TemplateGuid=<%= new Random().Next() %>", <% } %> onclick: 'play' } } }); if(seek){ jwplayer("JWPlayerHTML5").seek(seek); } } function FormatHTML5Path(url) { var temp1 = '<%= this.VideoResourcePath.RouteWebSite %>'; var temp2 = '<%= this.VideoResourcePath.RouteRecourseSite %>'; url = url.replace(temp1, temp2); return url; } function AVAGetRecLength() { var position = jwplayer("JWPlayerHTML5").getPosition(); if (position == null || typeof (position) == "undefined") { position = 0; } position = Math.round(position, 0); return Helper.SecondToTime(position); } </script> <div class="clear"> </div> <hr /> </td> </tr> <%-- <% } > %--%> <tr> <td class="label-td"><span class="label"><span class="required">*</span>?????(??:??:??)??</span></td> <td> <%= new HtmlText("Seconds", AVA.ResourcesPlatform.Config.Helper.SecondToTime(this.ViewData["_VideoSW.Seconds"].ToDouble()/1000)) { Class = "ipt-t ipt-t-dft ", OnDblClick = "try{this.value = AVAGetRecLength();}catch (ex) { }" }%> <%= new HtmlButton("????????","try{$('#frmVideoSWEdit [Name=Seconds]').val(AVAGetRecLength());}catch (ex) { }") %> <%= new HtmlYKTip("Seconds") %> </td> </tr> <tr> <td class="label-td"><span class="label"><span class="required">*</span>????????</span></td> <td> <%= new HtmlSelect("SW", "Value", "Key", "Key") { Option=CreateInstance.VideoSWDao.Items() }.InsertOption(DefineEnum.???.Define(),"",0).SelectValue(this.ViewData["_VideoSW.SW"])%> <%= new HtmlYKTip("SW") %> </td> </tr> <tr> <td class="label-td"></td> <td></td> </tr> <tr> <td class="label-td"></td> <td> <%= new HtmlHidden("Key",this.KEY)%> <%= new HtmlHidden("ParentVideo", this.Video.Guid)%> <%= new HtmlSubmit(IN(this.ViewData["_VideoSW"], "?????????", "?????????"), "VideoSWEdit", "VideoSWEditClient(this);").Style(new { Width = "100px" })%> <%--<% if (Has(this.ViewData["_VideoSW"]) == false) { //???????????? %> <%= new HtmlButton("??????") { OnClick = "window.location.href = '" + WebUrl.MyVideoSWList(this.Video.Guid) + "';" }.Style(new { Width = "100px" })%> <% } %>--%> </td> </tr> </table> </form> </div> <script type="text/javascript"> //?????? $.validator.initConfig({ validatorGroup: "VideoSWEdit", form: "#frmVideoSWEdit", alertMessage: true, showMessage: false }); //????? $("#frmVideoSWEdit [name=Seconds]").formValidator({ validatorGroup: "VideoSWEdit", rules: { required: null//, //regex: "decmal1" }, message: { required: "???????????"//, //regex: "???????????" } }); //?????? $("#frmVideoSWEdit [name=SW]").formValidator({ validatorGroup: "VideoSWEdit", rules: { required: null }, message: { required: "??????????????" } }); </script> <script type="text/javascript"> function VideoSWEditClient(send) { $.ajax( { cache: false, type: "POST", url: Global.Site + "/Ajax.aspx?AVA.ResourcesPlatform.Ajax.ClientAjax.VideoSWEdit", data: Global.GetFormValue($("#frmVideoSWEdit")), async: true, dataType: 'json', success: function (result) { $(send).val('<%= IN(this.ViewData["_VideoSW"],"?????????", "?????????") %>'); flash('<%= IN(this.ViewData["_VideoSW"],"???????????????", "???????????????") %>'); Global.Disabled(send, false); //window.location.href = result; VideoSWResult(result); }, beforeSend: function () { $(send).val('<%= IN(this.ViewData["_VideoSW"],"????????????...", "????????????...") %>'); Global.Disabled(send, true); }, complete: function () { }, error: function (XMLHttpRequest, textStatus, errorThrown) { $(send).val('<%= IN(this.ViewData["_VideoSW"],"?????????", "?????????") %>'); Global.Disabled(send, false); var message = XMLHttpRequest.responseText; Global.Error(message); } }); } </script> <script id="table-template" type="text/x-handlebars-template"> <tr className=" lastLine" id="tr_{{Guid}}"> <td className="sel" valign="middle"> <input type="checkbox" value="{{Key}}" title="???/????" className="trsel" /></td> <td className="v"> {{SW}}</td> <td className="status"> {{Second}}</td> <td className="action"> <a href="{{EditUrl}}" title="???">???</a> | <a href="#delete" onclick="VideoSWDelete(this,'{{Key}}'); return false;">???</a></td> </tr>; </script> <script> var table_template; $(function(){ var source = $("#table-template").html(); table_template = Handlebars.compile(source); }) </script> <script type="text/javascript"> function VideoSWResult(result) { <%--var guid = '<%= this.ViewData["_VideoSW.Guid"] %>'; if (guid != "") { window.location.href = result; } else { $("#frmVideoSWEdit [name=Seconds]").val(""); $("#frmVideoSWEdit [name=SecondsEnd]").val(""); $("#frmVideoSWEdit [name=Description]").val(""); try { AVAContinue(); } catch (ex) { } }--%> //$(".lastLine").removeClass(".lastLine"); //$("#MyVideoSWData table").append(table_template(result)); var guid = result.Guid; if ($("#tr_" + guid).length) { var $target = $("#tr_" + guid); $(table_template(result)).insertBefore($target); $target.remove(); } else { $(".lastLine").removeClass(".lastLine"); $("#MyVideoSWData table").append(table_template(result)); } // window.location.reload(); } </script> </div>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de