omxobj
v0.1.0
Published
Object oriented omxplayer wrapper for raspberry pi
Downloads
2
Readme
omxobj
Object oriented omxplayer wrapper for Raspberry PI. This will allow multiple videos playing at the same time. This wrapper has the ability to track the progress as well.
Installation
npm install omxjob
Create an object
omxobj.create(options);
Available options:
layer hardwareAudioDecoding enable3D refresh startPosition win orientation alpha info audioOut audioPassThrough Refer to omxplayer for more information.
Example
var omxPlayer1 = omxobj.create({layer: 1});
Methods
.play(filename) .stop() .pause() .volumeUp() .volumeDown()
Example
var omxobj = require('omxPlayer');
var omxOverlay = omxobj.create({layer: 2}),
omxVideo = omxobj.create({layer: 1});
omxOverlay.on('stop', function() {
console.log("stop");
omxVideo.stop();
process.exit();
});
setTimeout(function(){
omxOverlay.play("video1.mp4");
}, 1000);
omxVideo.on("progress", function(progress) {
console.log("Progress: %d\%", progress);
});
omxVideo.play("video2.mp4");