nw.js node WebKit - unable to play audio file - audio

I have started working with nw.js, creating a test app to play audio files from. I am working on OS X 10.11.
The code for the player is:
<audio id="audio_player" controls>
<source src="path/to/file/song.mp3" type="audio/mp3">
</audio>
The player and controls appear, but the file will not play. I have tried using a relative path, and an absolute path, trying both
"/path/to/file/song.mp3"
and
"file:///path/to/file/song.mp3"
schemes.
I have verified the path is valid in all cases.
This page:
http://docs.nwjs.io/en/latest/For%20Developers/Enable%20Proprietary%20Codecs/
tells me that mp3 should be supported (for v0.22.1+, though I haven't found a way to tell the version of my mp3, though is was made recently so I assume is the the latest codec.)
Just to try more stuff, I followed the instructions on these pages:
http://docs.nwjs.io/en/latest/For%20Developers/Enable%20Proprietary%20Codecs/
(It appears mp3 gained support since this doc came out.)
https://github.com/nwjs/nw.js/wiki/Using-MP3-%26-MP4-%28H.264%29-using-the--video--%26--audio--tags.
I downloaded the ffmpeg libs from here:
https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases
and placed copies here:
find . -name libffmpeg.dylib
./dist/nw.js-examples/osx64/nw.js-examples.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib
./node_modules/nw/nwjs/nwjs.app/Contents/Versions/54.0.2840.99/nwjs Framework.framework/libffmpeg.dylib
./node_modules/nw-builder/cache/0.31.2-sdk/osx64/nwjs.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib
cp ~/Downloads/libffmpeg.dylib ./dist/nw.js-examples/osx64/nw.js-examples.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib
cp ~/Downloads/libffmpeg.dylib "./node_modules/nw/nwjs/nwjs.app/Contents/Versions/54.0.2840.99/nwjs Framework.framework/libffmpeg.dylib"
cp ~/Downloads/libffmpeg.dylib "./node_modules/nw-builder/cache/0.31.2-sdk/osx64/nwjs.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib"
Still to no avail running either
npm run dev
or
npm run prod
and opening the packaged app.
I can play the file fine with the same code from a web browser.
I don't know what else to try, help would be much appreciated, thanks.

Related

Getting "Cannot find ffprobe error " when attempting to run nodejs script

I am attempting to use an npm package for splitting audio (https://github.com/calufornia/audio-split), however I am not able to run a single test since I get the following error on my callback:
Error: Cannot find ffprobe, I have read a bit and it seems that this is directly related to the npm package fluent_ffmpeg, which is actually a dependency of the first package I mentioned.
The problem on some other questions/forums is that people do not have properly installed ffmpeg on their environment. In my case however, I have made sure that my PATH is updated with the ffmpeg directory (C:\FFmpeg\bin for me), and I am able to open a command prompt and run both
ffmpeg -version
and
ffprobe -version
I would much appreciate if anyone else has struggled with this previously and could provide me with some more guidance. Thanks

Problems with adding flutter to my PATH in ubuntu

I tried installing Android Studio and Flutter on the PC. I followed some tutorials for the paths and I did a great many things. I am rather confused how many completely different approaches there are editing different files and commands to change the path permanently. I got it to work in theory even, if I enter echo $PATH I get
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:home/dev/flutter/bin:/snap/bin
Now, i do not know if I put the path in correctly, but it is the path that correctly leads to my flutter bin folder. I am not sure if I am supposed to crop it or anything. If i open a terminal in this directory, and enter 'flutter' i get 'flutter: command not found', while ./flutter or ./flutter doctor do what i would like to happen in any terminal but also without the ./
So, apparently flutter is installed and works, but the path is what is giving me the biggest headache. Any ideas what i could have done wrong? I really tried everything the dart docs told me to do and followed many other tutorials to no avail.

XULrunner not running

I'm using Linux Mint, and I've downloaded XUL 1.8.0.4. Extracted it to the /opt/ dir, made symbolic link to /usr/bin/xulrunner, and I still can't run XUL apps.
When I type xulrunner -version in terminal, I got message:
Mozilla XULRunner 1.8.0.4
When I type whereis xulrunner i got message
xulrunner: /usr/bin/xulrunner /usr/lib/xulrunner /usr/bin/X11/xulrunner
So it should work, but when I go in the app folder and run xulrunner application.ini nothing happens.
Does your application have any files other than application.ini ? I think you need at least a preferences file (defaults/preferences/prefs.js) and a chrome.manifest (or an omni.ja with these in it) to make xulrunner actually do anything. If you just feed it a lone application.ini it parses the ini, goes looking for more application files, then exits when it finds none.

MPEG DASH:using Gpac to get MPD files

My goal is to convert some mpeg4 files in my hard disk into mpd files that will alllow me to use it in mpeg dash streaming .i read about gpac's MP4Box capability to create mpd files and i followed the instructions of the following link to successfully compile gpac for ubuntu like in the instructions in this two links
http://gpac.wp.mines-telecom.fr/2011/04/20/compiling-gpac-on-ubuntu/
http://gpac.wp.mines-telecom.fr/2012/02/01/dash-support/
But when i try to execute any command such as
MP4Box -dash 10000 -frag 1000 -rap myFile.mp4
I get the following error
Option -dash unknown. Please check usage
I wonder is there any commands or instructions that i must execute when building gpac to add the dash and if is there any other methods to get my own MPD File not those provided by itec.
Thanks in advance !!!
Try to follow the compile instruction carefully & make sure to fetch the latest version from SVN.
MP4Box should work with your commands.
looks like you are using a outdated version of MP4Box. try downloading and compiling the latest one from here (for me the same command works): http://gpac.wp.mines-telecom.fr/downloads/gpac-nightly-builds/

Installing flash 9 debugger in linux

I've been trying for some time to use the ExternalInterface.call method in flash, to no avail (see here: actionscript + javascript here: Using ExternalInterface in Flash and here: Flash trace output in firefox, linux) and now I'm trying to trace ExternalInterface.available. So far my best option seems to be FlashTracer for firefox, except that I have to have flash player 9 installed. I've removed my old flash player and downloaded the appropriate files (http://download.macromedia.com/pub/flashplayer/updaters/9/flash_player_9_linux_dev.tar.gz). According to the readme included these are the steps for installation:
Installing the debugger plugin tar.gz using Install script:
o the debugger plugin is located at:
./plugin/debugger/install_flash_player_9_linux.tar.gz
o Unpack the tar.gz file
o In terminal, navigate to the unpacked directory and enter:
+ $ ./flashplayer-installer
+ Click Enter key and follow prompts
except there's no file called flashplayer in the debugger directory. Anyone else ran into this? How can I install flash player 9 debugger on my Ubuntu system?
If you're using something like Ubuntu, the Flash plugin is probably a system wide thing. Under Ubuntu 8.10 for example, I have it at:
/usr/lib/flashplugin-installer
additionally you'll find at:
/etc/alternatives/
links to it, so you can change which .so is used depending on the user.
The easiest thing you could probably do if the ./flashplayer-installer file doesn't exist (though it does in mine) is to copy the debug flashplayer library to this directory. e.g:
root#me:/usr/lib/flashplugin-installer# mv libflashplayer.so libflashplayer.non-debug.so
root#me:/usr/lib/flashplugin-installer# cp ~jamie/Adobe_Flex_Builder_Linux/Player/linux/install_flash_player_9_linux/libflashplayer.so libflashplayer.debug.so
root#me:/usr/lib/flashplugin-installer# ln -s libflashplayer.debug.so libflashplayer.so
I haven't seen the issues you have, and perhaps your requirements restrict you to an older version, but I've had great success with flashplayer 10's debugger. You might try this one and see if it works.
Edit: Ahh, I just noticed one very pertinent statement you made: you require flashplayer 9. Sorry =(
Edit 2: I just had the same thing happen to me on Linux. When I extracted the tar.gz from Adobe, the installation script wasn't present. This said, I was able to get the debugger version of 9 installed anyway.
When you extracted, did you see a libflashplayer.so file? I didn't have an installation script, but I did get this file. If so, all you need to do is this:
Close all instances of Firefox
Backup your current libflashplayer.so module: ~/.mozilla/plugins/libflashplayer.so.org (this way, if something goes wrong, you can always put it back)
Copy the version you extracted from the Flash player download to the same plugins directory: cp /path/to/vers/9/libflashplayer.so ~/.mozilla/plugins/
Restart Firefox, open a Flash app, and right-click to check for the version
These steps worked perfectly for me, and I was able to run Flex Builder's debugger in Linux. Hope it works for you!
One way you can do it is downloading the flex 3 SDK for linux. When you download it you'll get a couple of tar's. You can find this in ~/flex_sdk_3/runtimes/10 if you want to install the flashplayer 10 and ~/flex_sdk_3/runtimes/lnx/ if you want the flashplayer 9. Uncompress those files (flashplayer.tar.gz and libflashplayer.so.tar.gz with tar -xvf). Now cp libflashplayer.so the file to /usr/lib/mozilla/plugins/ and if you want create symbolic links (ln -s flashplayer /usr/local/bin to have the player on your path
A tip for anyone who searches for this like I did... find out where libflashplayer.so currently is on your system:
sudo locate libflashplayer.so
Mine was in /usr/lib/flashplugin-installer/
Once I replaced that file with the debug version of the file, Firefox reported that I had the debug version of the player.
I also had the same issue with flash player debugger. I followed the instructions given by bedwyr. It worked for me. To make it work, you create a directory named 'plugins' into ~/.mozilla if plugins directory is not found.
mkdir ~/.mozilla/plugins
Then I copied libflashplayer.so to plugins directory. Now flash player debugger worked for my Flex Builder's application.

Resources