From 91e0a81d6bc8deb80cf222a968ba57ef1a5751a4 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 30 Dec 2016 19:20:32 +0000 Subject: [PATCH] Add playArbitraryInput --- src/client/voice/VoiceBroadcast.js | 4 ++-- src/client/voice/VoiceConnection.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/voice/VoiceBroadcast.js b/src/client/voice/VoiceBroadcast.js index bce054583..92bbb414f 100644 --- a/src/client/voice/VoiceBroadcast.js +++ b/src/client/voice/VoiceBroadcast.js @@ -181,7 +181,7 @@ class VoiceBroadcast extends EventEmitter { /** * 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 * @returns {StreamDispatcher} * @example @@ -197,7 +197,7 @@ class VoiceBroadcast extends EventEmitter { */ playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; - return this._playTranscodable(file, options); + return this._playTranscodable(`file:${file}`, options); } _playTranscodable(media, options) { diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 4a064a5c1..c0c6e43b5 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -225,7 +225,7 @@ class VoiceConnection extends EventEmitter { /** * 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 * @returns {StreamDispatcher} * @example @@ -238,7 +238,7 @@ class VoiceConnection extends EventEmitter { */ playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) { const options = { seek, volume, passes }; - return this.player.playUnknownStream(file, options); + return this.player.playUnknownStream(`file:${file}`, options); } /**