gpt4 book ai didi

jquery - 运行此 jquery 脚本时 Safari 和 Chrome 崩溃

转载 作者:行者123 更新时间:2023-11-28 03:46:04 24 4
gpt4 key购买 nike

我不确定我的网站为什么会崩溃,但出于某种原因,我每次执行搜索并返回 html5 音频结果时都会崩溃。

用户搜索我们的数据库并传送音乐。我无法让它在 FF 中崩溃,但在 Chrome 和 Safari 中。

$('.audioplayerHTML5').live('click', function(event) {

var audio = '';
var playbutton = '';
var video = $('.videoplayer').get(0);
var $syncMusic = $('#syncMusic');
var $last_played = $('#last_played');
var $playAudioBeginning = $('#playAudioBeginning');
var $playFromBeginning = $('#playFromBeginning');
var $sliderVideo = $('#sliderVideo');


if ($.browser.mozilla) {
playbutton = event.layerX < 31;
} else if ($.browser.safari) {
playbutton = event.offsetX < 61;
} else if ($.browser.webkit) {
playbutton = event.offsetX < 31;
}

if (!playbutton) return;
if (!this.paused) {
pause(this, $syncMusic.is(':checked') ? video : null);
} else if (this.paused) {
//this.play();
if (!$last_played.val()) {
$last_played.val(this.id);
if ($syncMusic.is(':checked') && video) {
if ($playFromBeginning.is(':checked') && !video.paused) {
video.currentTime = document.getElementById("offsetVideo").value;
} else {
video.play();
}
}
if ($playAudioBeginning.is(':checked')) {
this.currentTime = 0;
}
this.play();
} else if ($last_played.val() !== this.id) {
audio = $('#' + $last_played.val()).get(0);

if (!audio) {
$last_played.val(this.id);
if ($syncMusic.is(':checked') && video) {
if ($playFromBeginning.is(':checked') && !video.paused) {
video.currentTime = document.getElementById("offsetVideo").value;
} else {
video.play();
}
}
if ($playAudioBeginning.is(':checked')) {
this.currentTime = 0;
}
this.play();
} else {
audio.pause();
$last_played.val(this.id);
if ($syncMusic.is(':checked') && video) {
if ($playFromBeginning.is(':checked') && !video.paused) {
video.currentTime = document.getElementById("offsetVideo").value;
} else {
video.play();
}
}
if ($playAudioBeginning.is(':checked')) {
this.currentTime = 0;
}

this.play();
}
} else if ($last_played.val() == this.id) {
if ($syncMusic.is(':checked') && video) {
if ($playFromBeginning.is(':checked') && !video.paused) {
video.currentTime = document.getElementById("offsetVideo").value;
} else {
video.play();
}
}
if ($playAudioBeginning.is(':checked')) {
this.currentTime = 0;
}
this.play();
}
}
});

引用: jQuery .live and WebKit are crashing http://code.google.com/p/chromium/issues/detail?id=79685

最佳答案

如果浏览器支持,你会检查浏览器并输出ogg或mp3吗?认为插件会使浏览器崩溃?

关于jquery - 运行此 jquery 脚本时 Safari 和 Chrome 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5992899/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com