              refreshPlayerStatus();
            });
            video.addEventListener('canplay', function () {
                refreshPlayerStatus();
            });

            video.src = 'video.mp4';
        }

        function playerLoad(initialLevelIndex) {
            hls.startLevel = initialLevelIndex;
            hls.startLoad(startPosition = -1);
        }

        function playerPlay() {
            video.play();
        }

        function playerPause() {
            video.pause();
        }

