-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayer_backup.html
More file actions
45 lines (44 loc) · 1.62 KB
/
player_backup.html
File metadata and controls
45 lines (44 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>AniFlake - Internal Player</title>
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
<link href="https://unpkg.com/plyr@3/dist/plyr.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://unpkg.com/video.js/dist/video.js"></script>
<script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=es6,Array.prototype.includes,CustomEvent,Object.entries,Object.values,URL"></script>
<script src="https://unpkg.com/plyr@3"></script>
<style>
body {
margin: 0px;
padding: 0px;
overflow: hidden;
}
.container {
width: 100%;
height: 100%;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
</style>
</head>
<body>
<div class="container">
<video controls crossorigin playsinline></video>
</div>
<script>
const url = new URL(window.location)
const anime_id = url.searchParams.get('anime_id')
const eps_number = url.searchParams.get('eps_number') || 1
const player = new Plyr('video', {captions: {active: true}});
$.get(`/get_streaming_sources?anime_id=${anime_id}&eps_number=${eps_number}`, (data, status) => {
player.source = {
type: 'video',
sources: data
}
console.log(data)
})
</script>
</body>
</html>