我有一个视频,我想在网页上显示它.我已经保存了几种格式,对于IE我使用的是用H.264编码的MP4文件.
我在我的电脑上尝试了视频和HTML代码,但是它可以正常工作,但是我把它上传到服务器上它没有(它说媒体类型不兼容).我试过从我的电脑上的HTML页面访问视频,它也给出了同样的错误,所以我认为错误可能是在服务器上发送了错误的MIME类型(我已在视频标签上指定了"video/mp4" ).
你们知道我该怎么办呢?
<video controls autoplay poster="images/logobig.png" style="width:610px;">
<source src="videos/1.mp4" type="video/mp4" />
<source src="videos/1.ogg" type="video/ogg" />
<source src="videos/1.webm" type="video/webm" />
Your browser does not support HTML5
</video>
Run Code Online (Sandbox Code Playgroud) 在将我的node.js应用程序部署到另一台PC(在开发机器上运行完美)并手动安装所有依赖项之后,当我尝试执行它时出现此错误:
C:\Users\myself>node app.js
module.js:340
throw err;
^
Error: Cannot find module 'xmlhttprequest'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (c:\Keystroke\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\lib\transports\index.js:5:22)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (c:\Keystroke\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\lib\socket.js:5:18)
Run Code Online (Sandbox Code Playgroud)
但是,如果我跑
npm ls -g
Run Code Online (Sandbox Code Playgroud)
它返回全局安装的模块列表,它包含xmlhttprequest.那为什么我的应用程序无法找到它?我究竟做错了什么?