【问题标题】:How to Play Video using Node-Webkit?如何使用 Node-Webkit 播放视频?
【发布时间】:2016-08-20 05:47:37
【问题描述】:

我正在使用 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": "richardmtp@gmail.com",
  "license": "MIT"
}

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

然后出现如下画面,请看附图

但没有播放,播放按钮也被禁用

  1. 我将 ffmpegsumo.dll 包含在 nw 根文件夹中

【问题讨论】:

    标签: html html5-video node-webkit


    【解决方案1】:

    【讨论】:

    • 我播放了视频,这是我的另一个问题link请帮我找出问题,谢谢。
    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 2014-01-14
      • 1970-01-01
      • 1970-01-01
      • 2013-05-31
      • 1970-01-01
      • 2019-08-13
      • 2019-07-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多