function onPlayerReady(event) {
        event.target.playVideo();
        let duration = event.target.getDuration();
        $(`#details-description-${currenTab}`).html(games[currenTab].description);
        $(`#details-duration-${currenTab}`).html(formatTime(duration));
        $(`#details-developer-${currenTab}`).html(games[currenTab].developer);
        $(`#details-publisher-${currenTab}`).html(games[currenTab].publisher);
    }
//////////////////Function to play the video automatically ////////////////
Function to play the video automatically
Function to play the video automatically
function onPlayerReady(event) {
        event.target.playVideo();
        let duration = event.target.getDuration();
        $(`#details-description-${currenTab}`).html(games[currenTab].description);
        $(`#details-duration-${currenTab}`).html(formatTime(duration));
        $(`#details-developer-${currenTab}`).html(games[currenTab].developer);
        $(`#details-publisher-${currenTab}`).html(games[currenTab].publisher);
    }
function onPlayerReady ( event ) { event . target . playVideo ( ) ; let duration = event . target . getDuration ( ) ; $ ( ` ${ currenTab } ` ) . html ( games [ currenTab ] . description ) ; $ ( ` ${ currenTab } ` ) . html ( formatTime ( duration ) ) ; $ ( ` ${ currenTab } ` ) . html ( games [ currenTab ] . developer ) ; $ ( ` ${ currenTab } ` ) . html ( games [ currenTab ] . publisher ) ; }
Function to play the video automatically
Function to play the video automatically