| 
														
															@@ -305,6 +305,7 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		<previewVideoDialog ref="previewVideoDialogRef" /> 
														 | 
														
														 | 
														
															 		<previewVideoDialog ref="previewVideoDialogRef" /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		<uploadFile v-if="progressData.uploadVideo" ref="uploadFileRef" @progressUpdate="videoProgressUpdate" @delUpload="videoDelUpload" @success="updateVideoSuccess" @startUpload="videoStartUpload"/> 
														 | 
														
														 | 
														
															 		<uploadFile v-if="progressData.uploadVideo" ref="uploadFileRef" @progressUpdate="videoProgressUpdate" @delUpload="videoDelUpload" @success="updateVideoSuccess" @startUpload="videoStartUpload"/> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		<resourceLibraryDialog ref="resourceLibraryDialogRef" @addFile="resourceLibraryDialogAddFile"/> 
														 | 
														
														 | 
														
															 		<resourceLibraryDialog ref="resourceLibraryDialogRef" @addFile="resourceLibraryDialogAddFile"/> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		<iframe ref="iframeFFmpegRef"  allow="camera *; microphone *;display-capture;midi;encrypted-media;" src="http://localhost:8080/#/cocoroboffmpeg" v-show="false"></iframe> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	</div> 
														 | 
														
														 | 
														
															 	</div> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 </template> 
														 | 
														
														 | 
														
															 </template> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -314,13 +315,6 @@ import wordcloudEChart from './wordcloudEChart.vue' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import uploadFile from './uploadFile.vue'; 
														 | 
														
														 | 
														
															 import uploadFile from './uploadFile.vue'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import { v4 as uuidv4 } from "uuid"; 
														 | 
														
														 | 
														
															 import { v4 as uuidv4 } from "uuid"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import resourceLibraryDialog from './resourceLibraryDialog.vue'; 
														 | 
														
														 | 
														
															 import resourceLibraryDialog from './resourceLibraryDialog.vue'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import FFmpeg from "@ffmpeg/ffmpeg"; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-const { createFFmpeg, fetchFile } = FFmpeg; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-const ffmpeg = createFFmpeg({ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	corePath: './static/ffmpeg/ffmpeg-core.js',//https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2Fffmpeg-core1731663083831.js   http://localhost:8081/ffmpeg-core.js 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	log: true, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-}); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const getFile = (url) => { 
														 | 
														
														 | 
														
															 const getFile = (url) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   return new Promise((resolve, reject) => { 
														 | 
														
														 | 
														
															   return new Promise((resolve, reject) => { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -881,7 +875,6 @@ ${this.data.editorBarData?this.data.editorBarData.content:""} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		}, 
														 | 
														
														 | 
														
															 		}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		async getVideoVoice(obj){ 
														 | 
														
														 | 
														
															 		async getVideoVoice(obj){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			if(this.loading)return this.$message.info("请稍等"); 
														 | 
														
														 | 
														
															 			if(this.loading)return this.$message.info("请稍等"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			console.log(obj) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			this.loading = true; 
														 | 
														
														 | 
														
															 			this.loading = true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			let _file = null; 
														 | 
														
														 | 
														
															 			let _file = null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			if(obj.url){ 
														 | 
														
														 | 
														
															 			if(obj.url){ 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -902,34 +895,10 @@ ${this.data.editorBarData?this.data.editorBarData.content:""} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			if (!_file) return this.$message.error("文件不存在"); 
														 | 
														
														 | 
														
															 			if (!_file) return this.$message.error("文件不存在"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			try { 
														 | 
														
														 | 
														
															 			try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				// 加载FFmpeg 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			if (!ffmpeg.isLoaded()) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				await ffmpeg.load(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			// 将视频文件加载到FFmpeg 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			ffmpeg.FS("writeFile", "input.mp4", await fetchFile(_file)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			// 提取音频 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			await ffmpeg.run( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				"-i", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				"input.mp4", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				"-q:a", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				"0", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				"-map", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				"a", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				"output.mp3" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			// 从FFmpeg文件系统中读取音频文件 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const data = ffmpeg.FS("readFile", "output.mp3"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			// 创建音频URL 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      let audioBlob = new Blob([data.buffer], { type: "audio/mp3" }); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			audioBlob.name = "output.mp3" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			this.$emit("getVideoAudioSuccess",audioBlob) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			this.$message.success("提取音频成功") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			this.loading = false; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			console.log(data) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				await this.$refs.iframeFFmpegRef.contentWindow.postMessage({type:'extractAudio',file:_file},'*'); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			// this.$message.success("提取音频成功") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			// this.loading = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			// console.log(data) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			} catch (error) { 
														 | 
														
														 | 
														
															 			} catch (error) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				console.log(error); 
														 | 
														
														 | 
														
															 				console.log(error); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				this.$message.error("提取音频失败") 
														 | 
														
														 | 
														
															 				this.$message.error("提取音频失败") 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -939,6 +908,17 @@ ${this.data.editorBarData?this.data.editorBarData.content:""} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		} 
														 | 
														
														 | 
														
															 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	}, 
														 | 
														
														 | 
														
															 	}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	mounted() { 
														 | 
														
														 | 
														
															 	mounted() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		window.addEventListener('message',(e)=>{ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			let _data = e.data; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			if(_data.code === 0){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.$message.success(_data.msg); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.loading = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.$emit("getVideoAudioSuccess",_data.file) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			}else if(_data.code === 1){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.$message.error(_data.msg); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.loading = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		// this.showNephogram(); 
														 | 
														
														 | 
														
															 		// this.showNephogram(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	}, 
														 | 
														
														 | 
														
															 	}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 }; 
														 | 
														
														 | 
														
															 }; 
														 |