PageSourceSearch

https://app.kidstime.edu.pl/js/hls-interop.js

js kidstime.edu.pl collected 2026-09-24 14:27:00 UTC 1,335 bytes, 49 lines download raw bytes

1window.hlsInterop = {
2    players: {},
3
4    attachHls: function (videoElementId, hlsUrl) {
5        var video = document.getElementById(videoElementId);
6        if (!video) return false;
7
8        // Cleanup previous instance
9        if (this.players[videoElementId]) {
10            this.players[videoElementId].destroy();
11            delete this.players[videoElementId];
12        }
13
14        // Safari supports HLS natively
15        if (video.canPlayType('application/vnd.apple.mpegurl')) {
16            video.src = hlsUrl;
17            return true;
18        }
19
20        if (typeof Hls === 'undefined' || !Hls.isSupported()) {
21            // Fallback - try direct URL
22            video.src = hlsUrl;
23            return false;
24        }
25
26        var hls = new Hls({
27            maxBufferLength: 30,
28            maxMaxBufferLength: 60
29        });
30        hls.loadSource(hlsUrl);
31        hls.attachMedia(video);
32        this.players[videoElementId] = hls;
33        return true;
34    },
35
36    destroyHls: function (videoElementId) {
37        if (this.players[videoElementId]) {
38            this.players[videoElementId].destroy();
39            delete this.players[videoElementId];
40        }
41    },
42
43    destroyAll: function () {
44        for (var id in this.players) {
45            this.players[id].destroy();
46        }
47        this.players = {};
48    }
49};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.