正在显示
1 个修改的文件
包含
6 行增加
和
7 行删除
| @@ -47,29 +47,28 @@ recordInfoService.prototype.tencentRecordInfo = async(channelId)=>{ | @@ -47,29 +47,28 @@ recordInfoService.prototype.tencentRecordInfo = async(channelId)=>{ | ||
| 47 | 47 | ||
| 48 | recordInfoService.prototype.getRecordFileURL = async(path,time)=>{ | 48 | recordInfoService.prototype.getRecordFileURL = async(path,time)=>{ |
| 49 | try { | 49 | try { |
| 50 | - let onlinePath = '/netWorkSchool/Agora_Recording_SDK_for_Linux_FULL/samples/' | ||
| 51 | - //let onlinePath = '/Users/fzy/Downloads/Agora_Recording_SDK_for_Linux_FULL/samples/' | 50 | + //let onlinePath = '/netWorkSchool/Agora_Recording_SDK_for_Linux_FULL/samples/' |
| 51 | + let onlinePath = '/Users/fzy/Downloads/Agora_Recording_SDK_for_Linux_FULL/samples/' | ||
| 52 | var backFile=[]; | 52 | var backFile=[]; |
| 53 | var fileU | 53 | var fileU |
| 54 | let addrecord = await recordInfo.findAll({where:{channel:path}}); | 54 | let addrecord = await recordInfo.findAll({where:{channel:path}}); |
| 55 | console.log('录制文件',addrecord) | 55 | console.log('录制文件',addrecord) |
| 56 | let noFile = []; | 56 | let noFile = []; |
| 57 | var allFile = []; | 57 | var allFile = []; |
| 58 | - var channefiles = []; | 58 | + var channefiles = ''; |
| 59 | addrecord.forEach(function(record,top){ | 59 | addrecord.forEach(function(record,top){ |
| 60 | let date1 = moment(Number( record.createTime)).format('YYYYMMDD') | 60 | let date1 = moment(Number( record.createTime)).format('YYYYMMDD') |
| 61 | let date2 = moment(Number(record.createTime)-8*60*60*1000).format('YYYYMMDDhhmmss') | 61 | let date2 = moment(Number(record.createTime)-8*60*60*1000).format('YYYYMMDDhhmmss') |
| 62 | let channeFile = onlinePath+date1; | 62 | let channeFile = onlinePath+date1; |
| 63 | var fschannefiles=fs.readdirSync(channeFile); | 63 | var fschannefiles=fs.readdirSync(channeFile); |
| 64 | - if(top == 1){ | ||
| 65 | - channefiles=fschannefiles; | ||
| 66 | - } | 64 | + |
| 67 | fschannefiles.forEach(function(cfile,index){ | 65 | fschannefiles.forEach(function(cfile,index){ |
| 68 | if(record.channel == cfile.split('_')[0]+'_'+cfile.split("_")[1]){ | 66 | if(record.channel == cfile.split('_')[0]+'_'+cfile.split("_")[1]){ |
| 69 | let pathURL = onlinePath+date1+"/"+cfile; | 67 | let pathURL = onlinePath+date1+"/"+cfile; |
| 70 | let files=fs.readdirSync(pathURL); | 68 | let files=fs.readdirSync(pathURL); |
| 71 | if(top == 1){ | 69 | if(top == 1){ |
| 72 | - allFile=files; | 70 | + allFile=files; |
| 71 | + channefiles = cfile; | ||
| 73 | } | 72 | } |
| 74 | files.forEach(function(file){ | 73 | files.forEach(function(file){ |
| 75 | let type = file.split('.'); | 74 | let type = file.split('.'); |
-
请 注册 或 登录 后发表评论