|
@@ -34,6 +34,7 @@ import {
|
|
|
api_cloudChangeSpeed,
|
|
|
api_startDelayCheck,
|
|
|
api_closeDelayCheck,
|
|
|
+ api_openCamera,
|
|
|
} from "/src/helpers/communication";
|
|
|
import state, { IPlayState, clearSelection, handleStopPlay, onPlay, resetPlaybackToStart, togglePlay, initSetPlayRate, resetBaseRate, scrollViewNote } from "/src/state";
|
|
|
import { IPostMessage } from "/src/utils/native-message";
|
|
@@ -763,6 +764,18 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ // 打开摄像头
|
|
|
+ const openSetCamera = async () => {
|
|
|
+ if (state.setting.camera) {
|
|
|
+ const res = await api_openCamera();
|
|
|
+ // 没有授权
|
|
|
+ if (res?.content?.reson) {
|
|
|
+ state.setting.camera = false;
|
|
|
+ store.set("musicscoresetting", state.setting);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
watch(pageVisibility, (value) => {
|
|
|
if (value == "hidden" && evaluatingData.startBegin) {
|
|
|
// handleEndBegin();
|
|
@@ -789,6 +802,7 @@ export default defineComponent({
|
|
|
}
|
|
|
);
|
|
|
onMounted(() => {
|
|
|
+ openSetCamera();
|
|
|
resetPlaybackToStart();
|
|
|
hanlde_record();
|
|
|
evaluatingData.resultData = {};
|