|
@@ -10,7 +10,7 @@ import { audioListStart, getAudioCurrentTime, getAudioDuration, setAudioCurrentT
|
|
|
import { toggleFollow } from "./view/follow-practice";
|
|
|
import { browser, setStorageSpeed, setGlobalData } from "./utils";
|
|
|
import { api_cloudGetMediaStatus, api_createMusicPlayer, api_cloudChangeSpeed, api_cloudSuspend, api_cloudSetCurrentTime, api_cloudDestroy } from "./helpers/communication";
|
|
|
-import { verifyCanRepeat, getDuration } from "./helpers/formateMusic";
|
|
|
+import { verifyCanRepeat, getDuration, xmlAddPartName } from "./helpers/formateMusic";
|
|
|
import { getMusicSheetDetail } from "./utils/baseApi"
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
import { followData, skipNotePractice } from "/src/view/follow-practice/index"
|
|
@@ -560,6 +560,8 @@ const state = reactive({
|
|
|
workSectionNeedReset: false,
|
|
|
/** 旋律线开关 */
|
|
|
melodyLine: true,
|
|
|
+ /** 是否是C调,切换到唱名时,只有C调所有的谱面类型都可以播放唱名文件;其它调的只有首调可以播放唱名,因为唱名是按照C调制作的,没有其它调的唱名文件 */
|
|
|
+ isCTone: false,
|
|
|
});
|
|
|
const browserInfo = browser();
|
|
|
let offset_duration = 0;
|
|
@@ -1057,7 +1059,7 @@ export const getNote = (currentTime: number) => {
|
|
|
const len = state.times.length;
|
|
|
/** 播放超过了最后一个音符的时间,直接结束, 2秒误差 */
|
|
|
if (currentTime > times[len - 1].endtime + 2 && !state.isAppPlay && !state.isSimplePage) {
|
|
|
- onEnded();
|
|
|
+ // onEnded();
|
|
|
return;
|
|
|
}
|
|
|
let _item = null as any;
|
|
@@ -1339,7 +1341,8 @@ const getMusicInfo = async (res: any) => {
|
|
|
state.defaultScoreRender = res.data?.defaultScoreRender
|
|
|
const partIndex = query["part-index"] ? parseInt(query["part-index"]) : -1 // -1为partIndex没有值的时候
|
|
|
/* 获取声轨列表 */
|
|
|
- const xmlString = await fetch(res.data.xmlFileUrl).then((response) => response.text());
|
|
|
+ let xmlString = await fetch(res.data.xmlFileUrl).then((response) => response.text());
|
|
|
+ xmlString = xmlAddPartName(xmlString);
|
|
|
downloadXmlStr.value = xmlString //给musice-score 赋值xmlString 以免加载2次
|
|
|
const tracks = xmlToTracks(xmlString) //获取声轨列表
|
|
|
// 设置音源 track 为当前的声轨 index为当前的
|