-
Notifications
You must be signed in to change notification settings - Fork 6
/
iptv-list.html
246 lines (203 loc) · 8.76 KB
/
iptv-list.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE html>
<html lang="en">
<head>
<title>飞鸟在线播放器</title>
<meta charset="UTF-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="/static/css/app.css" rel="stylesheet">
<style>
.nav {
display: flex;
}
.nav-item {
list-style: none;
margin: 10px;
}
.tvContainer {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.tvItem {
width: 200px;
text-align: center;
margin: 25px 10px;
}
.tvLogo {
width: 98%;
}
[v-cloak] {
display: none;
}
</style>
</head>
<body id="body">
<div class="header">
<div class="menu">
<a href="/" class="a-link menu-item">m3u8在线播放器</a>
<a href="/mpd-player.html" class="a-link menu-item">mpd在线播放器</a>
<a href="/iptv-list.html" class="a-link menu-item">IPTV 在线观看</a>
<!-- <a href="/cinema.html" class="a-link menu-item">简单私人影视站 DEMO</a> -->
<a href="/apply-code.html" class="a-link menu-item" >申请激活码</a>
<a href="https://v6t.ipip.net/" data-href="https://test-ipv6.com/" class="a-link menu-item"
target="_blank">ipV6 检测</a>
</div>
</div>
<div>
<h1 id="videoName" style="text-align: center;">IPTV 在线观看</h1>
<p style="text-align: center;">IPTV有很多不稳定源, 可批量检查排除无效链接</p>
<div class="container">
<div class="input-group mb-3" style="display: flex; justify-content: center; margin: 5px;">
<form class="d-flex" role="search" id="search">
<input :v-model="mediaUrl" name="vodName" class="form-control me-2" id="NOwd" type="search"
placeholder="请输入IPTV地址: 支持.m3u格式" aria-label="Search"
style=" width: 600px; line-height: 1.5rem; max-width:98vw;">
<button class="btn btn-outline-success" type="button" style="width: 80px; line-height: 1.5rem;"
onclick="changeSrc()">解 析</button>
</form>
</div>
</div>
</div>
<main>
<h3>快捷IPTV链接</h3>
<div>
<a data-href="https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u" target="_blank"
onclick='quickLink("https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u")'>[ipv6可播放]https://raw.githubusercontent.com/fanmingming/live/main/tv/m3u/ipv6.m3u</a>
</div>
<div>
<a data-href="https://raw.githubusercontent.com/iptv-org/iptv/master/streams/ba.m3u" target="_blank"
onclick='quickLink("https://raw.githubusercontent.com/iptv-org/iptv/master/streams/ba.m3u")'>[ipv4部分可播放]https://raw.githubusercontent.com/iptv-org/iptv/master/streams/ba.m3u</a>
</div>
<div class="iptv-container" id="app">
<div v-cloak>
<div v-show="show">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" @click="showAll()">全部</a>
</li>
<li class="nav-item" v-for="group in groups" :key="group">
<a class="nav-link" @click="filterByGroupName(group)">{{ group }}</a>
</li>
</ul>
<div class="tvContainer">
<div v-for="item in items" :key="item['tvg-id']" class="tvItem">
<a :href="getPlayTvUrl(item)">
<img :src="item['tvg-logo']" class="tvLogo" />
<p>{{ item['channel-name'] ?? item['tvg-name'] }}</p>
</a>
</div>
</div>
</div>
</div>
</div>
</main>
<div class="fooder">
<!-- <div style="margin: 5px;"> 飞鸟M3u8下载器 <a href="https://github.com/youwen21/flybird-m3u8downloader/releases"
target="_blank" style="color: #209CEE; text-decoration:underline;">下载</a></div> -->
<div style="margin: 5px;">QQ群:854313352 <a href="https://qm.qq.com/q/rL2UEWHnj2" target="_blank"
style="color: #209CEE; text-decoration:underline;">【进群-下载|交流】</a> </div>
</div>
<!--
<div id="tip">
<div style="position: absolute; right: -10px; top: -18px;">
<div style="position: relative; " onclick="document.getElementById('tip').style.display='none'"> X </div>
</div>
<div id="checkRes">使用飞鸟m3u8下载器批量检测TV链接是否有效</div>
<div>
<button onclick="check()"><a href="https://github.com/youwen21/flybird-m3u8downloader/releases"
target="_blank" style="color: #209CEE; text-decoration:underline;">下载</a></button>
</div>
</div> -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/base64.min.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hls.min.js"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/dash.all.min.js"></script> -->
<script src="m3uutil.js"></script>
<script>
</script>
<script>
const { createApp, ref } = Vue
const show = ref(false)
const groups = ref([])
const items = ref([])
// channel-name: "CCTV-1 综合"
// channel-url: "http://[2409:8087:4c0a:22:1::11]:6410/170000001115/UmaiCHAN111128BESTVSMGSMG/index.m3u8?AuthInfo=9kOOdBn7MFF%2F2bWjKgahUU6FFmRK8Hl0ytyd5e5kWGEwoDIwMxbrlyyVy9x6ZDKnldIYKOjBOUjRyoym5n7Kg0yIYstFTUfqtC14fzxhy5Y"
// group-title: "央视频道"
// tvg-logo: "https://live.fanmingming.com/tv/CCTV1.png"
// tvg-name: "CCTV1"
let allItems = []
createApp({
// delimiters: ['[[', ']]'],
setup() {
return {
groups,
items,
show,
GenUrl: function (zyName, vodName, vodId) {
return "/zy_detail?zy_name=" + zyName + '&vod_name=' + vodName + "&vod_id=" + vodId
},
filterByGroupName,
showAll,
getTvName,
getPlayTvUrl,
}
}
}).mount('#app')
function doRender(tvData) {
const uniqueGroupTitles = extractGroupTitles(tvData);
groups.value = uniqueGroupTitles
// console.log(uniqueGroupTitles);
const itemArr = parseToMap(tvData);
items.value = itemArr
allItems = itemArr
// console.log(itemArr)
}
function filterByGroupName(groupName) {
items.value = allItems.filter(item => item["group-title"] === groupName);
}
function showAll() {
items.value = allItems
}
function getTvName(tvItem) {
return tvItem['channel-name'] ?? tvItem['tvg-name']
}
let currentIptvUrl = ""
function showIptv(iptvUrl) {
currentIptvUrl = iptvUrl
show.value = true
fetch(iptvUrl).then((resp) => resp.text())
.then(data => {
doRender(data)
}).catch(error => {
// 处理错误情况
alert('请求失败:' + error);
});
}
function quickLink(iptvUrl) {
document.getElementById("NOwd").value = iptvUrl
showIptv(iptvUrl)
}
function changeSrc() {
iptvUrl = document.getElementById("NOwd").value
if (iptvUrl == "") {
alert("iptvUrl 未空")
return
}
showIptv(iptvUrl)
}
function check() {
}
function getPlayTvUrl(item) {
let safeUrl = Base64.encodeURI(item['channel-url'])
let safeName = Base64.encodeURI(item['channel-name'])
// let safeUrl = btoa(Base64.encodeURI(item['channel-url']))
// let safeName = btoa(Base64.encodeURI(item['channel-name']))
let link = '/player.html?media_url=' + safeUrl + '&name=' + safeName
// console.log(item)
// debugger
return link
}
</script>
</body>
</html>