Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying NW.js Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
NW.js Essentials

NW.js Essentials

By : Benoit
4.8 (5)
close
close
NW.js Essentials

NW.js Essentials

4.8 (5)
By: Benoit

Overview of this book

If you are an experienced Node.js developer who wants to create amazing desktop applications using NW.js, this is the book for you. Prior knowledge of HTML5, jQuery, and CSS is assumed.
Table of Contents (11 chapters)
close
close
10
Index

Handling media files

HTML5 APIs provide a simple way to handle media files such as audio and video. The API implementation is really easy:

<video width="400" controls>
  <source src="video.ogv" type="video/ogg">
</video>
<audio controls>
  <source src="audio.ogg" type="audio/ogg">
</audio>

Between the supported file formats, you can find ogg, ogv, and wav. The codecs included in the pre-built ffmpegsumo library are Cotheora, vorbis, vp8, pcm_u8, pcm_s16le, pcm_s24le, pcm_f32le, pcm_s16be and pcm_s24be.

As you have probably already figured out, you're not allowed to play mp3 and mpeg4 files natively as their codecs are proprietary. Unfortunately, there's no easy workaround for the issue. Someone has successfully used the media libraries from Chrome, but I couldn't replicate the process on NW.js 0.11.5. The best way to give support for these codecs to your application is to compile ffmpeg with...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
NW.js Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon