( inputPath: string, outputPath: string, flipMode: FlipMode, invertColors: boolean, isGif: boolean, isWebm: boolean )
| 266 | throw new Error('下载媒体失败,请稍后再试'); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | private async transformMedia( |
| 271 | inputPath: string, |
| 272 | outputPath: string, |
| 273 | flipMode: FlipMode, |
| 274 | invertColors: boolean, |
| 275 | isGif: boolean, |
| 276 | isWebm: boolean |
| 277 | ) { |
| 278 | await this.runFfmpegTransform({ |
| 279 | inputPath, |
| 280 | outputPath, |
| 281 | flipMode, |
| 282 | invertColors, |
| 283 | isGif, |
| 284 | isWebm, |
| 285 | }); |
| 286 | |
| 287 | if (!fs.existsSync(outputPath)) { |
| 288 | throw new Error('ffmpeg 未生成输出文件'); |
| 289 | } |
| 290 | } |
| 291 |
no test coverage detected