docs: update mcserver/MC统一认证设置教程
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
title: MC统一认证设置教程
|
||||
description:
|
||||
published: true
|
||||
date: 2025-02-18T15:51:35.912Z
|
||||
date: 2025-02-18T15:52:10.438Z
|
||||
tags:
|
||||
editor: code
|
||||
dateCreated: 2025-02-18T15:39:43.695Z
|
||||
@@ -30,57 +30,11 @@ dateCreated: 2025-02-18T15:39:43.695Z
|
||||
<h1 id="videoTitle"></h1>
|
||||
<div id="videoDescription" class="description"></div>
|
||||
<div>
|
||||
<button onclick="downloadVideo()">下载</button>
|
||||
<button class="back-button" onclick="window.history.back()">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="artplayer-app"></div>
|
||||
<script>
|
||||
document.getElementById('videoTitle').innerText = videoTitle;
|
||||
document.getElementById('pageTitle').innerText = videoTitle + " - 播放";
|
||||
document.getElementById('videoDescription').innerText = videoDescription;
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: videoUrl,
|
||||
autoSize: true,
|
||||
fullscreen: true,
|
||||
fullscreenWeb: true,
|
||||
miniProgressBar: true,
|
||||
autoOrientation: true,
|
||||
autoplay: false, // 禁用自动播放
|
||||
muted: false, // 不自动静音
|
||||
setting: true,
|
||||
aspectRatio: true,
|
||||
fullscreen: true,
|
||||
lang: 'zh-cn',
|
||||
fastForward: true,
|
||||
|
||||
plugins: [
|
||||
artplayerPluginChapter({
|
||||
chapters: [
|
||||
{ start: 0, end: 27, title: '注册并登录' },
|
||||
{ start: 27, end: Infinity, title: '配置启动器' }
|
||||
]
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
function downloadVideo() {
|
||||
fetch(videoUrl)
|
||||
.then(response => response.blob())
|
||||
.then(blob => {
|
||||
const link = document.createElement('a');
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = videoTitle + '.mp4'; // 设置下载文件名
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
URL.revokeObjectURL(link.href);
|
||||
})
|
||||
.catch(error => console.error('Error downloading the video:', error));
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user