|
@@ -26,6 +26,7 @@ import { HANDLE_WORK_ADD } from "/src/page-instrument/custom-plugins/work-index"
|
|
|
import { speedBeatTo, unitImgs } from "/src/helpers/beatConfig"
|
|
|
import IndexedDBService from "/src/utils/indexedDB";
|
|
|
import { musicalInstrumentCodeInfo, instruments, fixInstrumentNameCode } from "/src/constant/instruments";
|
|
|
+import evaluatModel from "./page-instrument/evaluat-model";
|
|
|
|
|
|
const query: any = getQuery();
|
|
|
|
|
@@ -389,6 +390,10 @@ const state = reactive({
|
|
|
isSingleMutliTrack: false,
|
|
|
|
|
|
xmlFromStore: false,
|
|
|
+
|
|
|
+ evaluatAudioInitDone: false,
|
|
|
+
|
|
|
+ useNativeEvaluation: false,
|
|
|
});
|
|
|
const browserInfo = browser();
|
|
|
let offset_duration = 0;
|
|
@@ -1241,12 +1246,17 @@ export default state;
|
|
|
|
|
|
|
|
|
export const evaluatCreateMusicPlayer = () => {
|
|
|
- return api_createMusicPlayer({
|
|
|
+ if (state.evaluatAudioInitDone) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ api_createMusicPlayer({
|
|
|
musicSrc: state.accompany || state.music,
|
|
|
|
|
|
tuneSrc: "https://oss.dayaedu.com/MECMP/1722593665681.mp3",
|
|
|
checkFrequence: 496,
|
|
|
+ useNativeEvaluation: state.useNativeEvaluation
|
|
|
});
|
|
|
+ state.evaluatAudioInitDone = true
|
|
|
};
|
|
|
|
|
|
|
|
@@ -1302,6 +1312,7 @@ const getMusicInfo = async (res: any) => {
|
|
|
state.isScoreRender = res.data?.isScoreRender
|
|
|
|
|
|
state.defaultScoreRender = res.data?.defaultScoreRender
|
|
|
+ state.useNativeEvaluation = res.data?.useNativeEvaluation
|
|
|
|
|
|
let xmlString: string = await queryMusicXml(res.data.bizId + "", res.data.xmlFileUrl);
|
|
|
xmlString = xmlAddPartName(xmlString);
|