12.06.2020, 15:10
(02.04.2020, 11:20)admin Wrote: FTP path is /home/ftp, just make sure that you have some algorithm to delete old files. Otherwise you can run out of free space at some point.I'm still confused on this point. I used Filezilla to connect and placed a doorbell sound file (at what I'm taking from your post above is /home/ftp). My ftp login was user ftp (can choose from ftp or apps). But my Custom Javascript file appears not to see the copied file. For example, in the following file if I uncomment and use the mozilla file, the sound plays fine. But when written as shown here with the local file, the code does not work. Is it a linux permissions thing?
Code:
// the following function plays a sound when the doorbell is pressed (Object 0/250/72 is set true)
// FTP path is /home/ftp (use Filezilla to put sound file there)
$(function(){
grp.listen('0/250/72', function(object) {
if (object.value == true ) {
// var audio = new Audio('https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3');
var audio = new Audio('/home/ftp/Doorbell.mp3');
audio.play();
}
});
});
Can you help me?
Thanks!