Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nw-f2cwa-play

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nw-f2cwa-play

Ffmpeg to Canvas and Web Audio media playback for Node WebKit.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

nw-f2cwa-play

Ffmpeg to Canvas and Web Audio media playback for Node WebKit.

You will need ffmpeg to run this.

Install with npm install nw-f2cwa-play

Under Windows place ffmpeg.exe into vendor directory or on any platform pass ffmpeg path to player as option.

var
  Player = require('nw-f2cwa-play').Player,
  player;

player = new Player({
  selector:'#cnv', // selector for canvas to render video
  ffmpegPath: 'ffmpeg' // in case ffmpeg is available on standard path
});

player.openSrc('udp://@239.0.1.2:1234'); // pass stream url (rtp, udp, http ... anything supported by ffmpeg) or file path

// auto start playback
player.on('canplay',function(){
          player.play();
})

player.on('time',function(time){
  // time is current stream time in seconds
});

Seeking for streams allowing seeking (mostly files) is also supported:

  1. Use player.openSrc(url,startPos); to start playback from needed pos. startPos expressed in seconds.
  2. Use player.seek(seekPos); seekPos is also expressed in seconds.

See sample App.

This is experiment as for now. May produce unexpected results. Only files/streams with audio are supported, audio is also downsampled to mono for simpler processing.

Keywords

FAQs

Package last updated on 14 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc