Guest User

Untitled

a guest
May 25th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { PassThrough } = require('stream')
  2.  
  3. /**
  4.  * Start playing item from playlist on {position} from {offset} ms
  5.  */
  6. function start(position = 0, offset = 0) {
  7.   // console.log(this.queue)
  8. }
  9.  
  10. /**
  11.  * Stop playing current song
  12.  */
  13. function stop() {
  14.   //
  15. }
  16.  
  17.  
  18. module.exports = () => {
  19.   const stream = PassThrough({ end: false })
  20.   stream.queue = []
  21.   Object.assign(stream, {
  22.     start,
  23.     stop
  24.   })
  25.   return stream
  26. }
Advertisement
Add Comment
Please, Sign In to add comment