diff --git a/noname/library/element/content.js b/noname/library/element/content.js index a9ce17742..cb8815137 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -2775,7 +2775,7 @@ export const Content = { if (ui.updateVideoMenu) { ui.updateVideoMenu(); } - _status.videoDuration = 1; + _status.videoDuration = 1 / parseFloat(lib.config.video_default_play_speed.slice(0, -1)); ui.create.system("返回", function () { var mode = localStorage.getItem(lib.configprefix + "playbackmode"); if (mode) { @@ -2788,6 +2788,14 @@ export const Content = { game.playVideo(_status.playback, lib.config.mode); }); ui.create.system("暂停", ui.click.pause, true).id = "pausebutton"; + var atempo = ui.create.system( + "原速", + function () { + _status.videoDuration = 1; + updateDuration(); + }, + true + ); var slow = ui.create.system( "减速", function () { @@ -2805,6 +2813,7 @@ export const Content = { true ); var updateDuration = function () { + atempo.innerHTML = `原速(当前${Math.round(100 / _status.videoDuration) / 100}倍速)`; if (_status.videoDuration > 1) { slow.classList.add("glow"); } else { @@ -2816,6 +2825,7 @@ export const Content = { fast.classList.remove("glow"); } }; + updateDuration(); ui.system.style.display = ""; ui.refresh(ui.system); ui.system.show(); diff --git a/noname/library/index.js b/noname/library/index.js index a24653676..55ddbc9c1 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -965,6 +965,20 @@ export class Library { }, unfrequent: true, }, + video_default_play_speed: { + name: "默认录像播放速度", + init: "1x", + intro: "设置播放游戏录像时默认的播放速度", + item: { + "0.25x": "0.25倍速", + "0.5x": "0.5倍速", + "1x": "原速", + "1.5x": "1.5倍速", + "2x": "2倍速", + "4x": "4倍速", + }, + unfrequent: true, + }, max_loadtime: { name: "最长载入时间", intro: "设置游戏从启动到完成载入所需的最长时间,超过此时间未完成载入会报错,若设备较慢或安装了较多扩展可适当延长此时间",