Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
(quality) Bundle ffmpeg into built app - fixes #68.
Browse files Browse the repository at this point in the history
  • Loading branch information
moonwave99 committed Aug 31, 2017
1 parent 33e0b37 commit 04f0670
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
"url": "http://github.com/moonwave99/playa/raw/master/LICENSE.md"
}
],
"build": {
"asarUnpack": [
"**/node_modules/ffmpeg/*"
]
},
"dependencies": {
"app-root-dir": "^1.0.2",
"async": "1.4.0",
"bluebird": "2.9.27",
"bootstrap-styl": "^4.0.4",
Expand All @@ -32,6 +38,7 @@
"emissary": "^1.3.1",
"enquire.js": "^2.1.1",
"express": "^4.13.4",
"ffbinaries": "^1.0.2",
"fluent-ffmpeg": "^2.0.1",
"font-awesome": "^4.5.0",
"fs-extra": "^0.20.1",
Expand Down
7 changes: 5 additions & 2 deletions src/config/default.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const path = require('path');
const appRootDir = require('app-root-dir').get();

export default {
ffmpegPath: '/usr/local/bin/ffmpeg',
ffprobePath: '/usr/local/bin/ffprobe',
ffmpegPath: path.join(appRootDir, 'node_modules/ffmpeg/ffmpeg'),
ffprobePath: path.join(appRootDir, 'node_modules/ffmpeg/ffprobe'),
coverFolderName: 'Covers',
playlistFolderName: 'Playlists',
coverLoaderLog: false,
Expand Down
1 change: 1 addition & 0 deletions src/playa.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export default class Playa {
audioElement: options.audioElement,
});

ffmpeg.setFfmpegPath(this.getSetting('config', 'ffmpegPath'));
ffmpeg.setFfprobePath(this.getSetting('config', 'ffprobePath'));

this._onOpenPlaylistChange = this._onOpenPlaylistChange.bind(this);
Expand Down

0 comments on commit 04f0670

Please sign in to comment.