
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (57)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (10383)
-
ffMPEG "inttypes.h not found" error
28 septembre 2018, par NavWhile using the ffMPEG builds in Windows with Visual Studio 2010, I encountered the inttypes.h not found error.
Since searching through the internet led me to wrong solutions, I thought I’d put up the right solution here so that people can find it easily. Will be answering my own question soon. -
ffMPEG "inttypes.h not found" error
2 septembre 2013, par NavWhile using the ffMPEG builds in Windows with Visual Studio 2010, I encountered the inttypes.h not found error.
Since searching through the internet led me to wrong solutions, I thought I'd put up the right solution here so that people can find it easily. Will be answering my own question soon. -
Discord bot not playing any audio
7 mars 2023, par MarkixI'm making a discord music bot with Discord.js v14,
@discordjs/voice
, and Typescript and I have this play command but it doesn't seem to be working. It successfully joins, throws no exceptions but... no audio.

This is my code :


import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import { joinVoiceChannel, createAudioPlayer, getVoiceConnections, StreamType, AudioPlayerStatus } from "@discordjs/voice";
import { createAudioResource } from "@discordjs/voice";
import ytdl from 'ytdl-core';

module.exports = {
 data: new SlashCommandBuilder()
 .setName('play')
 .setDescription('Play příkaz')
 .addStringOption(option => 
 option
 .setName("link")
 .setDescription("Youtube link!")
 .setRequired(false)
 ),

async execute(interaction: CommandInteraction) {
 const link = interaction.options.get('link')?.value?.toString();
 const player = createAudioPlayer();
 const resource = createAudioResource(ytdl(`${link}`, { filter: "audioonly" }), { inlineVolume: 1.0, inputType: StreamType.WebmOpus });

 player.play(resource);

 const connection = joinVoiceChannel({
 channelId: "775815628619251743",
 guildId: "775761665786511370",
 adapterCreator: interaction.guild?.voiceAdapterCreator,
 selfMute?: false,
 selfDeaf: false
 });

 const subscription = connection.subscribe(player);
 interaction.reply("Now playing: .-.");
}



This is
"dependencies"
in my package.json

"dependencies": {
 "@discordjs/builders": "^1.2.0",
 "@discordjs/rest": "^1.5.0",
 "@discordjs/voice": "^0.14.0",
 "@types/express": "^4.17.14",
 "discord.js": "^14.4.0",
 "dotenv": "^16.0.2",
 "express": "^4.18.1",
 "ffmpeg": "^0.0.4",
 "ffmpeg-static": "^5.1.0",
 "libsodium-wrappers": "^0.7.11",
 "opusscript": "^0.0.8",
 "sequelize": "^6.23.2",
 "sqlite3": "^5.1.2",
 "ts-node": "^10.9.1",
 "ytdl-core": "^4.11.2"
 }



(And yes I also have ffmpeg installed globally)


markix@pop-os-lenovo-laptop:~$ apt list --installed | grep -i ffmpeg 

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

chromium-codecs-ffmpeg-extra/jammy,now 1:85.0.4183.83-0ubuntu2 amd64 [installed,upgradable to: 1:85.0.4183.83-0ubuntu2.22.04.1]
ffmpeg/jammy-security,jammy-updates,now 7:4.4.2-0ubuntu0.22.04.1 amd64 [installed,automatic]



What am I doing wrong ?