1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Daniel Neto 2023-06-30 09:47:34 -03:00
parent dfec86f738
commit 37e90e3dfe
2 changed files with 8 additions and 4 deletions

View file

@ -536,7 +536,7 @@ class PlayerSkins extends PluginAbstract {
} }
$js .= "} $js .= "}
player.ready(function () {"; player.ready(function () {console.log('player.ready');";
$js .= "player.on('error', () => { $js .= "player.on('error', () => {
AvideoJSError(player.error().code); AvideoJSError(player.error().code);
@ -557,12 +557,15 @@ class PlayerSkins extends PluginAbstract {
$play = "player.volume(0);player.muted(true);playerPlayMutedIfAutoPlay({$currentTime});"; $play = "player.volume(0);player.muted(true);playerPlayMutedIfAutoPlay({$currentTime});";
} }
$js .= "var err = this.error(); $js .= "try {
var err = this.error();
if (err && err.code) { if (err && err.code) {
$('.vjs-error-display').hide(); $('.vjs-error-display').hide();
$('#mainVideo').find('.vjs-poster').css({'background-image': 'url({$global['webSiteRootURL']}plugin/Live/view/Offline.jpg)'}); $('#mainVideo').find('.vjs-poster').css({'background-image': 'url({$global['webSiteRootURL']}plugin/Live/view/Offline.jpg)'});
} }} catch (e) {
" . implode(PHP_EOL, $prepareStartPlayerJS_onPlayerReady) . " console.error('error-display', e);
}try {
" . implode(' } catch (e) {console.error(\'onPlayerReady\', e);} try { ', $prepareStartPlayerJS_onPlayerReady) . " } catch (e) {console.error('onPlayerReady', e);}
{$play} {$play}
});"; });";

View file

@ -917,6 +917,7 @@ async function showMuteTooltip() {
} }
function playerPlayIfAutoPlay(currentTime) { function playerPlayIfAutoPlay(currentTime) {
console.log("playerPlayIfAutoPlay: forceCurrentTime:", currentTime);
if (isWebRTC()) { if (isWebRTC()) {
return false; return false;
} }