前辈们,我遇到一个问题。个人在制作网站时想添加一个音乐播放器,但是每次跳转到网站其他页面播放器就会重新刷新,导致无法接着继续播放。我该怎么解决这个问题啊?前辈们。这是我那个播放器的代码:
<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/5.12.1/css/all.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css">
</head>
<body>
<div id="main" class="container">
<div class="row my-card justify-content-center">
<div class="col-lg-4 photo-bg"></div>
<div class="col-lg-8 card">
<div id="aplayer" class="aplayer" data-order="random" data-id="20173709" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="true" data-volume="0.8"></div>
<!-- aplayer -->
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@1.2.0/dist/Meting.min.js"></script>
<!-- end_aplayer -->
<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/kaygb/kaygb@master/layer/layer.js"></script>
<script src="https://cdn.jsdelivr.net/gh/kaygb/kaygb@master/js/v3.js"></script>
<script>
//弹出一个页面层
$('#kaygb-blog').on('click', function() {
layer.open({
type: 2,
title: 'Kaygb',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['80%', '100%'],
content: '//eas1.cn/'
});
});
$('#kaygb-mail').on('click', function() {
layer.open({
type: 2,
title: 'Mail',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['80%', '100%'],