:', error);
                hideLoader();
                alert('Playback could not be started.');
            });
        } else {
            console.error("Video.js Player is not initialized.");
            hideLoader();
        }

        const baseName = normalizeChannelName(channelName);
        const similarChannels = window.baseNameToChannels[baseName] || [];
        displaySimilarChannels(similarChannels, channelName);

        hideLoader();
    }

    function adjustVideoContainer(nativeWidth, nat