
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 (36)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6192)
-
Hi Friends can anoye help me with my discord bot leave my voice channel before play a song
19 décembre 2020, par jojan gojanHe can find the id and the api is good he cant find all the information of youtube video but he cant play the music video idk why i search all the code and i cant find the error.


The bot was create on node.js


I stop updating this bot for 2 years idk if something has changed in the rules of discord bots


The bot was pushed to heroku but im testing the bot on my pc.


[Link to all my bot code][1]



https://wtools.io/paste-code/b2XF


-
Cannot play audio from a link using a Discord Bot
2 mars 2020, par GuilhermeffableI’m trying to code a bot so me and my friends can hear the local radio on our Discord Server but I’m having this error.
This is part of my code, it’s the play.js file that handles the playback stuff.
module.exports = (client,message) => {
const voiceChannel = message.member.voiceChannel;
const idChannel = voiceChannel.id;
console.log(idChannel)
//vê se o user está numa sala de voz
if(!voiceChannel) {
return message.channel.send("Precisas de estar num voice channel para usar este comando.")
}
const permissions = voiceChannel.permissionsFor(message.client.user);
//vê se tem permissões para entrar na sala
if(!permissions.has('CONNECT') || !permissions.has('SPEAK')) {
return message.channel.send("Não tenho permissões para entrar nessa sala.")
}
voiceChannel.join()
.then(connection => {
console.log("Successfully connected.");
connection.playStream('http://centova.radios.pt:8401/stream.mp3/1')
}).catch(e =>{
console.error(e);
});}
And this is the error I’m getting :
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of
Object
at validateString (internal/validators.js:117:11)
at normalizeSpawnArguments (child_process.js:406:3)
at Object.spawn (child_process.js:542:16)
at new FfmpegProcess (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\transcoders\ffmpeg\FfmpegProcess.js:14:33)
at FfmpegTranscoder.transcode (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\transcoders\ffmpeg\Ffmpeg.js:34:18)
at MediaTranscoder.transcode (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\transcoders\MediaTranscoder.js:27:31)
at Prism.transcode (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\prism-media\src\Prism.js:13:28)
at AudioPlayer.playUnknownStream (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\discord.js\src\client\voice\player\AudioPlayer.js:97:35)
at VoiceConnection.playStream (C:\Users\guilh\desktop\BOT\orbitalbot\node_modules\discord.js\src\client\voice\VoiceConnection.js:546:24)
at C:\Users\guilh\desktop\BOT\orbitalbot\commands\play.js:24:24 {
code: 'ERR_INVALID_ARG_TYPE' -
DiscordJS Music Bot Connects and Then Immediately Disconnects From Voice Channel
23 janvier 2020, par კΙбthebraɨɴsI see that questions similar to this one have been asked, and after following their solutions I still end up the same as I started. Below I have listed my code, a link to test it with a sample bot I created, and the modules you will need to test it using a self-hosted instance.
My problem is that upon connecting to the specified voice channel, the bot immediately leaves afterwards without any signs of errors or exceptions. I’m not sure if it is a problem with my code, or with one of the libraries I am using. The only console output I receive is as follows :
Bot Ready For Use
joined channel
left channelThanks !
My Code
var voiceChannel = message.member.voiceChannel;
if (!message.member.voiceChannel) return message.channel.send(`You do realize you have to be in a voice channel to do that, right ${message.author.username}?`)
if (!message.member.voiceConnection) voiceChannel.join().then(async connection => {
let streamURL = args.slice(1).join(" ")
let streamTitle = "";
let streamThumb = "";
let streamAuth = "";
let streamAuthThumb = "";
if (streamURL.includes("https://www.youtube.com") || streamURL.includes("https://youtu.be/") && !streamURL.includes(' ')) {
let results = await youtube.getVideo(streamURL)
let {
body
} = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results.channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
limit: 800
})
streamTitle = results.title
streamThumb = results.thumbnails.medium.url
streamAuth = results.channel.title
streamAuthThumb = body.items[0].snippet.thumbnails.medium.url
} else if (!streamURL.includes("https://www.youtube.com") || !streamURL.includes("https://youtu.be/")) {
let results = await youtube.searchVideos(streamURL)
let {
body
} = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results[0].channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
limit: 800
})
streamURL = results[0].url
streamTitle = results[0].title
streamThumb = results[0].thumbnails.medium.url
streamAuth = results[0].channel.title
streamAuthThumb = body.items[0].snippet.thumbnails.medium.url
} else {
return message.reply("I can only play videos from YouTube (#NotSponsored).")
}
console.log("joined channel");
const stream = ytdl('https://www.youtube.com/watch?v=gOMhN-hfMtY', {
filter: 'audioonly'
});
const dispatcher = connection.playStream(stream, {
seek: 0,
volume: 1
});
dispatcher.on("end", end => {
console.log("left channel");
voiceChannel.leave();
});
let musicEmbed = new Discord.RichEmbed()
.setAuthor(streamAuth, streamAuthThumb)
.setTitle(`Now Playing:`)
.addField(`${streamAuth}`, `${streamTitle}`)
.setImage(streamThumb)
.setColor(embedRed)
.setFooter(`${streamAuth} - ${streamTitle} (${streamURL}`)
message.channel.send(musicEmbed)
}).catch(console.error);
breakList of Modules
discord.js
simple-youtube-api
node-opus
ffmpeg
ffbinaries
ffmpeg-binaries
opusscript
snekfetch
node-fetch
ytdl-coreClick here to use my sample bot through repl.it.
Thanks Again !