Here's my script
'use strict';
const path = require('path');
const av = require('./lib/index');
const mp3 = path.join(__dirname, 'muzak.mp3');
const sound = new av.Player();
// Play the mp3, starting at the 10 second mark.
sound.play(mp3, "10");
sound.on('ended', function() {
console.log('This is not the end!');
sound.play();
});
Looked to be running well with no errors (but no sound) and then after 15 sec....
module.js:549
throw err;
^
Error: Cannot find module './lib/index'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/tmp/remote-script/audio.js:1:102)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Does the mp3 have to be a specific encoding or something?
Scot