【问题标题】:cant use locally hosted video on react app无法在 React 应用程序上使用本地托管的视频
【发布时间】:2023-02-15 08:46:50
【问题描述】:

我在反应中使用视频作为背景,在视频加载后服务器停止,我收到此消息 我尝试了 2 个不同的库来为视频添加播放器和 html 标签,我一遍又一遍地收到相同的消息 实际标签上没有语法错误,因为用 youtube 视频更改 url 工作得很好

      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot set property closed of #<Readable> which has only a getter
    at FsReadStream.close (C:x
\node_modules\memfs\lib\volume.js:2047:17)
    at FsReadStream._destroy (C:\x\node_modules\memfs\lib\volume.js:2032:10)
    at _destroy (node:internal/streams/destroy:109:10)
    at class_1.destroy (node:internal/streams/destroy:71:5)     
    at class_1.<anonymous> (C:\x\node_modules\memfs\lib\volume.js:1962:22)
    at class_1.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1344:12)   
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on class_1 instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)        
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)   
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)```

【问题讨论】:

    标签: reactjs video


    【解决方案1】:

    npm install memefs 为我工作。

    【讨论】:

      猜你喜欢
      • 2021-11-18
      • 2021-02-24
      • 2018-12-04
      • 2017-04-05
      • 2017-08-18
      • 2021-06-22
      • 2021-08-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多