Recherche avancée

Médias (91)

Autres articles (105)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce 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 (4563)

  • Discord Music bot dosnt play Livestreams anymore

    11 janvier 2019, par Silvinator

    My Discord bot played YT Livestreams all the time, but it stoped working today. The only message i get (in the console) is stream. It plays normal videos, but no streams. the question is, why it stopped working. I did not change any code. Anyone got a idea ?

    client.on("message", async message => {
       var args = message.content.substring(prefix.length).split(" ");
       if (!message.content.startsWith(prefix)) return;
     var searchString = args.slice(1).join(' ');
            var url = args[1] ? args[1].replace(/<(.+)>/g, '$1') : '';
            var serverQueue = queue.get(message.guild.id);
       switch (args[0].toLowerCase()) {
         case "play":
       var voiceChannel = message.member.voiceChannel;
                    if (!voiceChannel) return message.channel.send(`Du willst mit mir Karaoke singen? Da ich eh nichts besseres zu tun habe. Du suchst aber den Voice Channel aus!`);
                    var permissions = voiceChannel.permissionsFor(message.client.user);
                    if (!permissions.has('CONNECT')) {
                            return message.channel.send('I cannot connect to your voice channel, make sure I have the proper permissions!');
                    }
                    if (!permissions.has('SPEAK')) {
                            return message.channel.send('I cannot speak in this voice channel, make sure I have the proper permissions!');
                    }
         if (url.match(/^https?:\/\/(www.youtube.com|youtube.com)\/playlist(.*)$/)) {
                            var playlist = await youtube.getPlaylist(url);
                            var videos = await playlist.getVideos();
                            for (const video of Object.values(videos)) {
                                    var video2 = await youtube.getVideoByID(video.id); // eslint-disable-line no-await-in-loop
                                    await handleVideo(video2, message, voiceChannel, true); // eslint-disable-line no-await-in-loop
                            }
                            return message.channel.send(`Ich habe wohl keine andere wahl... Ich habe **${playlist.title}** der playlist zugefügt`);
                    } else {
                            try {
                                    var video = await youtube.getVideo(url);
                            } catch (error) {
                                    try {
                                            var videos = await youtube.searchVideos(searchString, 10);
                                            var index = 0;
                                            var videoIndex = 1;
                                            var video = await youtube.getVideoByID(videos[videoIndex - 1].id);
                                    } catch (err) {
                                            console.error(err);
                                            return message.channel.send('Gibt es den Song überhaupt?');
                                    }
                            }
                            return handleVideo(video, message, voiceChannel);
                    }
    break;
         case "skip":
                    if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
                    if (!serverQueue) return message.channel.send('Du musst schon ein song auswählen, baka!');
                    serverQueue.connection.dispatcher.end('Skip command has been used!');
                    return undefined;
           break;
         case "stop":
                    if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
                    if (!serverQueue) return message.channel.send('Du musst schon einen Song auswählen, baka');
       serverQueue.connection.dispatcher.end('Stop command has been used!');
                    serverQueue.songs = [];
                    return undefined;
    break;
         case "minfo":
                    if (!serverQueue) return message.channel.send('Ich spiele immer noch nichts!');
                    return message.channel.send(`ퟎ
  • Music bot doesn't play livestreams anymore

    31 janvier 2019, par Silvinator

    My Discord bot played YT Livestreams all the time, but it stopped working today. The only message I get (in the console) is stream. It plays normal videos, but no streams.
    The question is, why it stopped working ? I did not change any code. Anyone got a idea ?

    client.on("message", async message => {
     var args = message.content.substring(prefix.length).split(" ");
     if (!message.content.startsWith(prefix)) return;
     var searchString = args.slice(1).join(' ');
     var url = args[1] ? args[1].replace(/<(.+)>/g, '$1') : '';
     var serverQueue = queue.get(message.guild.id);
     switch (args[0].toLowerCase()) {
       case "play":
         var voiceChannel = message.member.voiceChannel;
         if (!voiceChannel) return message.channel.send(`Du willst mit mir Karaoke singen? Da ich eh nichts besseres zu tun habe. Du suchst aber den Voice Channel aus!`);
         var permissions = voiceChannel.permissionsFor(message.client.user);
         if (!permissions.has('CONNECT')) {
           return message.channel.send('I cannot connect to your voice channel, make sure I have the proper permissions!');
         }
         if (!permissions.has('SPEAK')) {
           return message.channel.send('I cannot speak in this voice channel, make sure I have the proper permissions!');
         }
         if (url.match(/^https?:\/\/(www.youtube.com|youtube.com)\/playlist(.*)$/)) {
           var playlist = await youtube.getPlaylist(url);
           var videos = await playlist.getVideos();
           for (const video of Object.values(videos)) {
             var video2 = await youtube.getVideoByID(video.id); // eslint-disable-line no-await-in-loop
             await handleVideo(video2, message, voiceChannel, true); // eslint-disable-line no-await-in-loop
           }
           return message.channel.send(`Ich habe wohl keine andere wahl... Ich habe **${playlist.title}** der playlist zugefügt`);
         } else {
           try {
             var video = await youtube.getVideo(url);
           } catch (error) {
             try {
               var videos = await youtube.searchVideos(searchString, 10);
               var index = 0;
               var videoIndex = 1;
               var video = await youtube.getVideoByID(videos[videoIndex - 1].id);
             } catch (err) {
               console.error(err);
               return message.channel.send('Gibt es den Song überhaupt?');
             }
           }
           return handleVideo(video, message, voiceChannel);
         }
         break;
       case "skip":
         if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
         if (!serverQueue) return message.channel.send('Du musst schon ein song auswählen, baka!');
         serverQueue.connection.dispatcher.end('Skip command has been used!');
         return undefined;
         break;
       case "stop":
         if (!message.member.voiceChannel) return message.channel.send('Du musst schon in den Voice Channel gehen, baka!');
         if (!serverQueue) return message.channel.send('Du musst schon einen Song auswählen, baka');
         serverQueue.connection.dispatcher.end('Stop command has been used!');
         serverQueue.songs = [];
         return undefined;
         break;
       case "minfo":
         if (!serverQueue) return message.channel.send('Ich spiele immer noch nichts!');
         return message.channel.send(`ퟎ
  • My own music bot randomly stops when playing a song, no errors, just like the song has ended

    18 avril 2019, par Stasio

    I made a discord music bot but there is one problem :
    When i play something it works perfectly for a moment but then sometimes music ends in the middle of the song just like the song has ended.
    When there are some songs in queue and this bug happens the bot starts playing another song from the queue. Im using ffmpeg, ytdl-core, simple-youtube-api,
    opusscript. What do u guys think about it ? I don’t think that this problem is caused by my code cuz this error happens randomly, sometimes 3 songs in a row are played normaly and sometimes it crashes in the middle of the 1 song, so he starts playing the next song in queue.

    const arg = msg.content.split(' ');
    const searchString = arg.slice(1).join(' ');
    const url = arg[1] ? arg[1].replace(/<(.+)>/g, '$1') : '';
    const serverQueue = queue.get(msg.guild.id);

    let command = msg.content.toLowerCase().split(' ')[0];
    command = command.slice(PREFIX.length)

    if (command === 'play' || command === 'p') {
    msg.delete()
    const voiceChannel = msg.member.voiceChannel;
    let emoji = msg.guild.emojis.find(x => x.name === "2Head")
       if (!voiceChannel) return msg.channel.send('Nie jesteś nawet na kanale głosowym zjebie ' + emoji);
       const permissions = voiceChannel.permissionsFor(msg.client.user);
       if (!permissions.has('CONNECT')) {
           return msg.channel.send('Nie mam permisji zeby sie polaczyc ;/');
       }
       if (!permissions.has('SPEAK')) {
           return msg.channel.send('Nie moge mowic odmutujcie mnie : )');
       }

       if (url.match(/^https?:\/\/(www.youtube.com|youtube.com)\/playlist(.*)$/)) {
           const playlist = await youtube.getPlaylist(url);
           const videos = await playlist.getVideos();
           for (const video of Object.values(videos)) {
               const video2 = await youtube.getVideoByID(video.id);
               await handleVideo(video2, msg, voiceChannel, true);
           }
           return msg.channel.send(`✅ Playlist: **${playlist.title}** has been added to the queue!`);
       } else {
           try {
               var video = await youtube.getVideo(url);
           } catch (error) {
               try {
                   var videos = await youtube.searchVideos(searchString, 1);
                   var video = await youtube.getVideoByID(videos[0].id);
               } catch (err) {
         console.error(err);
         let emoji = msg.guild.emojis.find(x => x.name === "autism")
                   return msg.channel.send('Nie ma takiego filmu na całym youtubie ' + emoji );
               }
           }
           return handleVideo(video, msg, voiceChannel);
       }
    }