79355887

Date: 2025-01-14 17:46:44
Score: 1
Natty:
Report link

I have edited function by add setTimeout and clearTimeout. Now program is working properly even with small time(500ms). For smooth play video I use more period and I will try implement function of download data ahead of proper time displaying descriptions.

async function checkVerset(zone) {  
let zoneRes;
console.log('fetch: ');
const timer = setTimeout( function(){ 
    player.pause(); 
    console.log('pause');
}, 500);
await connectFetch('./info.php', zone ).then(resolve =>{
    clearTimeout(timer);
    console.log('clearTimeout');
    zoneRes = resolve;
    console.log(zoneRes);   
}).catch(error => console.log( 'Error of details: ', error));
if(player.pause){
    player.play();
    console.log('play');
}
return zoneRes; 
}   

Thank you

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: kam