我正在尝试为我的HTML5视频播放器添加离线功能.我试图将文件作为blob写入chrome文件系统,然后从那里读取它们.我相信我遇到的问题是文件实际上并没有被写入,只是文件名.由于我的下面的代码目前已经构成,它仍然有效,但仍然只有它永久连接到互联网.我的目标是将文件下载到文件系统中的永久目录,然后在互联网断开连接时继续播放.
$(document).ready(function() {
var dir = "http://www.kevmoe.com/networks/gsplayer/";
var fileextension = ".mp4";
var srcfiles = $.ajax({
//This will retrieve the contents of the folder if the folder is configured as 'browsable'
url: dir,
success: function(data) {
//List all .mp4 file names in the page
$(data).find("a:contains(" + fileextension + ")").each(function() {
var filename = $(this).attr("href").replace(window.location.host, "").replace("http://", "");
$("#container").append("<div id='div1' class='video'><video id='video1' class='vidarray' preload='none' poster='bkg.png'><source src='" + filename + "' type='video/mp4'></video></div>");
async: false;
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
window.requestFileSystem(window.PERSISTANT, 200000 * 1024 * …Run Code Online (Sandbox Code Playgroud) Currently the table expands vertically. I would like it to stop at a certain fixed height and continue in a column next to it. Essentially, I want the table to bottom out at a fixed spot and continue from the top.
In total I have about 74 rows and I want to display them equally across three separate columns. In the past I have done this by simply using three separate tables at 33% width but given some additional sorting …
我正在努力让timeout计时器在每次交互时重置document click。似乎clearTimeout不起作用。
jQuery:
$(document).click(function(e){
$("#vidBack").hide();
$(".mainer").show();
function stopTimer() {
clearTimeout(timer);
}
var timer = setTimeout(function(){
$(".bury").hide();
$(".mainer").hide();
$("#meetSub").hide();
$("#leaguesSub").hide();
$("#memberSub").hide();
$(".bury").hide();
$("#welcomeSub").show();
$("#vidBack").show();
$("#vida").prop("volume", 0);
}, 10000);
});
Run Code Online (Sandbox Code Playgroud)