feat: Autoplay functionality

This commit is contained in:
Yiannis Christodoulou
2025-07-22 05:18:43 +03:00
parent de520e9faa
commit eaf87e20d8
16 changed files with 1118 additions and 242 deletions
@@ -11,6 +11,7 @@ class UserPreferences {
quality: 'auto', // Auto quality
subtitleLanguage: null, // No subtitles by default
muted: false,
autoplay: false, // Autoplay disabled by default
};
}
@@ -517,6 +518,23 @@ class UserPreferences {
console.error('❌ Error force saving subtitle language:', error);
}
}
/**
* Get autoplay preference
* @returns {boolean} Autoplay preference
*/
getAutoplayPreference() {
return this.getPreference('autoplay');
}
/**
* Set autoplay preference
* @param {boolean} autoplay - Autoplay setting
*/
setAutoplayPreference(autoplay) {
this.setPreference('autoplay', autoplay);
console.log('Autoplay preference saved:', autoplay);
}
}
export default UserPreferences;