1. Go to this page and download the library: Download rajendra/youtube-progress library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rajendra / youtube-progress example snippets
// config/youtube-progress.php
return [
'save_interval' => 10000, // ms between autosaves
'completion_percentage' => 95, // % unique watched to complete
'storage_prefix' => 'rajendra_progress_',
'auto_resume' => true,
'auto_load_api' => true,
'debug' => false,
// Anti-cheat (new in v1.0.2)
'prevent_forward_seek' => true,
'maximum_allowed_speed' => 2,
'seek_tolerance' => 1.5,
'toast_duration' => 3000,
'toast_message' => 'You must watch this part before continuing.',
// Dimensions
'default_width' => '100%',
'default_height' => '480',
];