fix: make player accessible globally for use in sharding eval

This commit is contained in:
Marius Begby committed 2023-07-23 16:28:47 +02:00
1 parent 909c0c0b4b
commit bcc0c926ac
1 file changed
+4
+4
View File
@@ -19,6 +19,10 @@ exports.createPlayer = async (client) => {
}
});
// make player accessible from anywhere in the application
// primarily to be able to use it in broadcastEval and other sharding methods
global.player = player;
onBeforeCreateStream(async (track) => {
if (track.source === 'youtube') {
return (