Skip to content

Commit 4cbe073

Browse files
author
danbai225
committed
.
1 parent 12fa216 commit 4cbe073

File tree

6 files changed

+271
-122
lines changed

6 files changed

+271
-122
lines changed

.idea/workspace.xml

Lines changed: 246 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# 淡白影视
66

7-
一个基于SpringBoot+[Dplayer](https://github.com/MoePlayer/DPlayer)的弹幕影视项目以及它的[子项目](https://github.com/danbai225/dbysapp)基于Vue+Element-ui实现手机端
7+
一个基于SpringBoot+[Dplayer](https://github.com/MoePlayer/DPlayer)的弹幕影视项目以及它的[子项目](https://github.com/danbai225/dbyswebapp)基于Vue+Element-ui实现手机端
88

99
![](https://img.shields.io/badge/%E7%89%88%E6%9C%AC-1.0.0-blue)
1010
![](https://img.shields.io/badge/%E9%A1%B9%E7%9B%AE%E7%8A%B6%E6%80%81-%E5%BC%80%E5%8F%91%E4%B8%AD-brightgreen)

src/main/java/com/danbai/ys/controller/MainController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ String index(Model model) {
4949
model.addAttribute("dm", ysbs3.getList());
5050
return "index";
5151
}
52-
5352
@RequestMapping(value = {"/sy"}, produces = "text/plain;charset=UTF-8", method = RequestMethod.GET)
5453
@ResponseBody
5554
String indexApi(HttpServletRequest request) {

src/main/resources/templates/include/include.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<div class="gg" style="margin: 0px auto; font-size: 2rem" th:utext="${ad}"></div>
7878
</div>
7979

80-
<footer class="footer" th:fragment="foot" >>
80+
<footer class="footer" th:fragment="foot" >
8181
友情链接:
8282
<span th:each="l:${ylink}">
8383
<a th:href="${l.url}" target="_blank" th:text="${l.name}"></a>|

src/main/resources/templates/type/tv.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<link rel="stylesheet" href="https://cdn.p00q.cn/ys/css/bootstrap.min.css">
1212
<script src="https://cdn.p00q.cn/ys/js/jquery.min.js"></script>
1313
<script src="https://cdn.p00q.cn/ys/js/bootstrap.min.js"></script>
14-
<script src="https://cdn.bootcss.com/hls.js/0.12.4/hls.js"></script>
15-
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
14+
<script src="https://cdn.jsdelivr.net/npm/cdnbye@latest"></script>
15+
<script src="https://cdn.jsdelivr.net/npm/p2p-dplayer@latest"></script>
1616
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
1717
<link rel="stylesheet" rev="stylesheet" type="text/css" media="all" href="https://cdn.p00q.cn/ys/css/bootadd.css">
1818
<link rel="stylesheet" rev="stylesheet" type="text/css" media="all" href="https://cdn.p00q.cn/ys/css/css2.css">
@@ -73,6 +73,10 @@ <h3> 正在播放<span id="zzbf">CCTV1综合</span></h3>
7373
pic: 'https://cdn.p00q.cn/ys/img/tip.png',
7474
url: pd.attr("yuan"),
7575
type: 'hls'
76+
},hlsjsConfig: {
77+
p2pConfig: {
78+
live: true,
79+
}
7680
},
7781
contextmenu: [
7882
{

src/main/resources/templates/ys/index.html

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<link rel="stylesheet" href="https://cdn.p00q.cn/ys/css/bootstrap.min.css">
1111
<script src="https://cdn.p00q.cn/ys/js/jquery.min.js"></script>
1212
<script src="https://cdn.p00q.cn/ys/js/bootstrap.min.js"></script>
13-
<script src="https://cdn.bootcss.com/hls.js/0.12.4/hls.js"></script>
14-
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
13+
<script src="https://cdn.jsdelivr.net/npm/cdnbye@latest"></script>
14+
<script src="https://cdn.jsdelivr.net/npm/p2p-dplayer@latest"></script>
1515
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
1616
<link rel="stylesheet" rev="stylesheet" type="text/css" media="all" href="https://cdn.p00q.cn/ys/css/bootadd.css">
1717
<link rel="stylesheet" rev="stylesheet" type="text/css" media="all" href="https://cdn.p00q.cn/ys/css/css2.css">
@@ -128,7 +128,7 @@ <h4 id="jxs" th:text="${jiname}"></h4>
128128
var jiname = "[[${jiname}]]";
129129
var timeout = true; //启动及关闭按钮
130130
var dmtimeout = true;
131-
var jii = 0;
131+
var jii=0;
132132
const dp = new DPlayer({
133133
container: document.getElementById('dplayer'),
134134
logo: 'https://cdn.p00q.cn/ys/img/logo.png',
@@ -176,14 +176,15 @@ <h4 id="jxs" th:text="${jiname}"></h4>
176176
timeout = true;
177177
});
178178
dp.on('ended', function () {
179-
var nexitji = $(".dslist-group").children().eq(jii + 1).children().eq(0);
179+
getjii()
180+
var nexitji = $(".dslist-group").children().eq( jii+ 1).children().eq(0);
181+
jii++;
180182
if (nexitji.html != null) {
181-
jii += 1;
182-
gettagid(jii);
183183
$("#jxs").text(nexitji.text());
184184
jiname = nexitji.text();
185185
timeout = false;
186-
ysid = id + nexitji.html();
186+
ysid = id + jiname;
187+
gettagid();
187188
dp.switchVideo({
188189
url: nexitji.attr("value"),
189190
pic: 'https://cdn.p00q.cn/ys/img/tip.png'
@@ -193,7 +194,7 @@ <h4 id="jxs" th:text="${jiname}"></h4>
193194
user: username
194195
});
195196
dp.notice("自动播放下一集!");
196-
dp.seek(gettime());
197+
//dp.seek(gettime());
197198
dp.play();
198199
timeout = true;
199200
}
@@ -281,6 +282,14 @@ <h4 id="jxs" th:text="${jiname}"></h4>
281282
})
282283
}
283284

285+
function getjii() {
286+
$(".dslist-group").children().each(function(i,n){
287+
var obj = $(n)
288+
if(obj.children().eq(0).html()==jiname){
289+
this.jii=i;
290+
}
291+
});
292+
}
284293
function getdm(id, time) {
285294
$.getJSON("https://mfm.video.qq.com/danmu?otype=json&target_id=" + id + "&timestamp=" + time, function (json) {
286295
ds = []

0 commit comments

Comments
 (0)