如何使用Node-Webkit播放视频?

问题描述 投票:1回答:2

我正在使用Node-Webkit,它只是一个hello world程序。这是我的代码

<!DOCTYPE html>
<html>
<head>
    <title>Hello Node Webkit</title>
</head>
<body>
    <h1>Hello Node Webkit</h1>
    <video src="http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4" controls></video>
</p>
</body>
</html>

{
  "name": "myapp.helloworldapp",
  "version": "0.0.1",
  "description": "A Hello Node webkit app",
  "main": "index.html",
  "webkit": {
    "plugin": true
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "chromium-args": "--load-plugin=ffmpegsumo.dll",
  "author": "[email protected]",
  "license": "MIT"
}

我使用以下D:\...\nw\nw.exe D:\...\helloWorld\app.v1.nw运行程序。

然后屏幕显示如下,请查找附图

output-image

但是没有播放和播放按钮也被禁用

  1. 我在nw Root文件夹中包含ffmpegsumo.dll
html5 html5-video node-webkit
2个回答
2
投票

您播放视频的HTML看起来不错,但问题是开箱即用的NW不支持MP3 / MP4和许多其他格式,因此您需要将ffmpeg.dll替换为来自此处的一个...

https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases


0
投票
© www.soinside.com 2019 - 2024. All rights reserved.