New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

yama-stream

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yama-stream

Youtube and MP3 Audio Streamer, based on youtube-audio. Currently only supports Youtube.

latest
Source
npmnpm
Version
1.1.5
Version published
Maintainers
1
Created
Source

yama-stream

Youtube & MP3 Audio Streamer, created for use with my Discord bot. Now supports MP3 & WAV streaming.

Getting Started

npm install --save yama-stream
var yama = require('yama-stream')

Prerequisites

FFMPEG required

Usage

Node example playing Youtube directly to speaker

const yama = require('yama-stream')
const url = 'http://youtube.com/watch?v=2JVwo3D72cc'
const decoder = require('lame').Decoder
const speaker = require('speaker')

// URL of youtube video, 
// time to begin from (nullable),
// desired duration (nullable), 
// desired bitrate (nullable)
yama(url, "0:10", 10, 128)
.pipe(decoder())
.pipe(speaker())

Node example playing WAV/MP3 directly to speaker

const yama = require('yama-stream')
//Prefix url with aud: to let yama know this is a local audio file
const url = 'aud:./TestSounds/ooh.wav'
const decoder = require('lame').Decoder
const speaker = require('speaker')

// Local File location 
// time to begin from (nullable),
// desired duration (nullable), 
// desired bitrate (nullable)
yama(url, "0:00", 1, 2)
    .pipe(decoder())
    .pipe(speaker())

Acknowledgments

  • Based on youtube-audio-stream

Keywords

youtube

FAQs

Package last updated on 24 May 2017

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