internal static string VideoDefaultIndex(string rootdir, string prefx, string port_) { string[] files; int count = 0; try { files = System.IO.Directory.GetFiles(rootdir + "Video"); string doc = string.Format("<body background=\"bg.jpg\"><a href 'http://{0}:{1}'> Refresh page </a><br />", prefx, port_); doc += "<h2>Enjoy watching !! Rykon Videos </h2><center>\r\n"; foreach (string f in files) { if (!WebServer.isMediaFile(f)) { continue; } count++; string filmn = AppHelper.LastPeice(f, "\\"); doc += "<video width=\"220\" height=\"140\" controls>"; doc += " <source src=\"" + filmn + "\" type=\"video/mp4\">"; doc += "</video>"; } if (count < 1) { doc += WebDesigner.NoMediaFoundTelladmin; } return(Htmlbeg + doc + "</center> </body><b><p style=\"color:red\">This page was created on " + AppHelper.ReturnAllTime() + "</p></b>" + WebDesigner.HtmlEnd); } catch { return("no media found "); } }
internal static string ListenDefaultIndex(string rootdir, string prefx, string port_) { string[] files; int count = 0; try { files = System.IO.Directory.GetFiles(rootdir + "Listen"); string doc = string.Format("<body background=\"bg.jpg\"><a href 'http://{0}:{1}'> Refresh page </a><br />", prefx, port_); doc += "<h2>Enjoy Listening !! Rykon Listen </h2><center>\r\n"; foreach (string f in files) { if (!WebServer.isMediaFile(f)) { continue; } count++; string filmn = AppHelper.LastPeice(f, "\\"); doc += "<h2>" + filmn + "</h2><div class='header' ><br /><audio controls>\r\n"; doc += " <source src=\"" + filmn + "\" type=\"audio/mpeg\">\r\n</audio>\r\n"; doc += "<hr /><br />\r\n\r\n</div><style>#header { background-color:black; color:white; text-align:center; padding:5px;}#nav { line-height:30px; background-color:#eeeeee; height:300px; width:100px; float:left; padding:5px; }#section { width:350px; float:left; padding:10px; }#footer { background-color:black; color:white; clear:both; text-align:center; padding:5px; }</style>"; } if (count < 1) { doc += WebDesigner.NoMediaFoundTelladmin; } return(Htmlbeg + doc + "</center> </body><b><p style=\"color:red\">This page was created on " + AppHelper.ReturnAllTime() + "</p></b>" + WebDesigner.HtmlEnd); } catch { return("no media found "); } }