Add playArbitraryInput

This commit is contained in:
Amish Shah
2016-12-30 19:20:32 +00:00
parent eacbfbd520
commit 91e0a81d6b
2 changed files with 4 additions and 4 deletions

View File

@@ -181,7 +181,7 @@ class VoiceBroadcast extends EventEmitter {
/** /**
* Play the given file in the voice connection. * Play the given file in the voice connection.
* @param {string} file The path to the file * @param {string} file The absolute path to the file
* @param {StreamOptions} [options] Options for playing the stream * @param {StreamOptions} [options] Options for playing the stream
* @returns {StreamDispatcher} * @returns {StreamDispatcher}
* @example * @example
@@ -197,7 +197,7 @@ class VoiceBroadcast extends EventEmitter {
*/ */
playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) {
const options = { seek, volume, passes }; const options = { seek, volume, passes };
return this._playTranscodable(file, options); return this._playTranscodable(`file:${file}`, options);
} }
_playTranscodable(media, options) { _playTranscodable(media, options) {

View File

@@ -225,7 +225,7 @@ class VoiceConnection extends EventEmitter {
/** /**
* Play the given file in the voice connection. * Play the given file in the voice connection.
* @param {string} file The path to the file * @param {string} file The absolute path to the file
* @param {StreamOptions} [options] Options for playing the stream * @param {StreamOptions} [options] Options for playing the stream
* @returns {StreamDispatcher} * @returns {StreamDispatcher}
* @example * @example
@@ -238,7 +238,7 @@ class VoiceConnection extends EventEmitter {
*/ */
playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) {
const options = { seek, volume, passes }; const options = { seek, volume, passes };
return this.player.playUnknownStream(file, options); return this.player.playUnknownStream(`file:${file}`, options);
} }
/** /**