// Player Class class KPFKPlayer { constructor() { this.audio = null; this.episode = null; this.playing = false; this.episodes = []; this.currentPage = 1; this.autoplayNext = true; this.episodesPerPage = 6; this.loading = false; // Cache DOM elements this.elements = { container: null, episodes: null, controls: null, progressBar: null, progressFill: null, currentTime: null, totalTime: null, controlPlay: null }; // Get showCode from the HTML element const container = document.getElementById('kpfk-player'); this.showCode = container?.dataset.show || 'sojourner'; this.elements.container = container; this.init(); } async init() { if (!this.elements.container) return; this.elements.container.innerHTML = '