Skip to content

process immediately gets closed #8

Description

@oronbz

Hi,

I've try to use your library with this piece of code:

var Omx = require('node-omxplayer');

var player = Omx('~/song.mp4');
player.on('close', function() {
  console.log('player closed!!!!');
});
player.on('error', function() {
  console.log('error happened!');
});

but the issue is it's immediately printing:
player closed!!!!
the player doesn't even open.

As a side note when I open omxplayer with exec it works well:

var exec = require('child_process').exec;
exec('omxplayer ~/song.mp4');

but with spawn (which your library uses) it again, immediately closing

var spawn = require('child_process').spawn;
var args = [ '~/song.mp4' ];
spawn('omxplayer', args);

I'm running this on latest raspbian, with nodejs v6.11.2

Have any suggestions how to solve it?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions