Advanced search

Medias (91)

Other articles (29)

  • Support audio et vidéo HTML5

    10 April 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 April 2011, by

    MediaSPIP 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 (...)

  • De l’upload à la vidéo finale [version standalone]

    31 January 2010, by

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier; La génération d’une vignette : extraction d’une (...)

On other websites (3473)

  • Discord bot returning odd error message and not playing sound

    26 February 2020, by Ravenr_

    I am attempting to create a function of my discord bot that will join your voice channel then play something from youtube as specified in the command

    i.e. $play <youtube link="link"></youtube>

    The problem is that my bot joins the voice channel but doesn’t play any sound and outputs an error to the console that I dont know how to fix

    My Code:

    const ytdl = require("ytdl-core");
    module.exports = {
       name: 'play',
       description: 'initiates music methods of the bot',
       execute(msg, args){
           var servers = {};

           function play(connection, msg){
               var server = servers[msg.guild.id];

               server.dispatcher = connection.playStream(ytdl(server.queue[0], {filter: "audioonly"}));
               server.queue.shift();

               server.dispatcher.on("end", function(){
                   if(server.queue[0]){
                       play(connection, msg);
                   }else{
                       connection.disconnect();
                   }
               });


           }
           if(!args[1]){
               return msg.channel.send("you need to provide a link");
           }
           if(!msg.member.voiceChannel){
               return msg.channel.send("You must be in a voice channel to use this feature");
           }
           if(!servers[msg.guild.id]) servers[msg.guild.id] = {
               queue: []
           }
           var server = servers[msg.guild.id];
           server.queue.push(args[1]);
           if(!msg.guild.voiceConnection) msg.member.voiceChannel.join().then(function(connection){
               play(connection, msg);
           })
       }
    }

    The Error:

    2020-02-26T16:31:59.458215+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Object
    2020-02-26T16:31:59.458223+00:00 app[worker.1]:     at validateString (internal/validators.js:117:11)
    2020-02-26T16:31:59.458224+00:00 app[worker.1]:     at normalizeSpawnArguments (child_process.js:406:3)
    2020-02-26T16:31:59.458224+00:00 app[worker.1]:     at Object.spawn (child_process.js:542:16)
    2020-02-26T16:31:59.458225+00:00 app[worker.1]:     at new FfmpegProcess (/app/node_modules/prism-media/src/transcoders/ffmpeg/FfmpegProcess.js:14:33)
    2020-02-26T16:31:59.458225+00:00 app[worker.1]:     at FfmpegTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:34:18)
    2020-02-26T16:31:59.458226+00:00 app[worker.1]:     at MediaTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/MediaTranscoder.js:27:31)
    2020-02-26T16:31:59.458226+00:00 app[worker.1]:     at Prism.transcode (/app/node_modules/prism-media/src/Prism.js:13:28)
    2020-02-26T16:31:59.458227+00:00 app[worker.1]:     at AudioPlayer.playUnknownStream (/app/node_modules/discord.js/src/client/voice/player/AudioPlayer.js:97:35)
    2020-02-26T16:31:59.458231+00:00 app[worker.1]:     at VoiceConnection.playStream (/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:478:24)
    2020-02-26T16:31:59.458232+00:00 app[worker.1]:     at play (/app/commands/play.js:11:44)

    for reference these are the links I tested it with 1 & 2

    I’m not sure how to make queue[0] a string, which is what I assume the problem is.

    I was thinking of using a toString() i.e. server.queue[0].toString() but I think that will just return the memory address.

    If anyone can help me know what the issue is or how to fix it, that would be great.

  • Which directory should i put FFmpeg? [duplicate]

    25 July 2020, by Panda Gaming23

    I am making a discord bot and I get the following error

    &#xA;

    node:4) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!&#xA;&#xA;2020-07-25T01:00:13.991518&#x2B;00:00 app[worker.1]:     at Function.getInfo (/app/node_modules/prism-media/src/core/FFmpeg.js:130:11)&#xA;&#xA;2020-07-25T01:00:13.991519&#x2B;00:00 app[worker.1]:     at Function.create (/app/node_modules/prism-media/src/core/FFmpeg.js:143:38)&#xA;&#xA;2020-07-25T01:00:13.991519&#x2B;00:00 app[worker.1]:     at new FFmpeg (/app/node_modules/prism-media/src/core/FFmpeg.js:44:27)&#xA;&#xA;2020-07-25T01:00:13.991520&#x2B;00:00 app[worker.1]:     at AudioPlayer.playUnknown (/app/node_modules/discord.js/src/client/voice/player/BasePlayer.js:47:20)&#xA;&#xA;2020-07-25T01:00:13.991520&#x2B;00:00 app[worker.1]:     at VoiceConnection.play (/app/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)&#xA;&#xA;2020-07-25T01:00:13.991522&#x2B;00:00 app[worker.1]:     at play (/app/commands/play.js:14:34)&#xA;&#xA;2020-07-25T01:00:13.991522&#x2B;00:00 app[worker.1]:     at /app/commands/play.js:42:5&#xA;&#xA;2020-07-25T01:00:13.991522&#x2B;00:00 app[worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:97:5)&#xA;&#xA;2020-07-25T01:00:13.991629&#x2B;00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)&#xA;&#xA;

    &#xA;

    Here is the code

    &#xA;

    const ytdl = require("ytdl-core");&#xA;const Discord = require("discord.js");&#xA;&#xA;var servers = {};&#xA;&#xA;module.exports = {&#xA;  name: "play",&#xA;  description: "this is a music play command!",&#xA;  execute(message, args) {&#xA;  &#xA;  function play(connection, message) {&#xA;        var server = servers[message.guild.id];&#xA;        &#xA;        server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}));&#xA;        &#xA;        server.queue.shift();&#xA;        &#xA;        server.dispatcher.on("end", function () {&#xA;            if(server.queue[0]){&#xA;                play(connection, message);&#xA;            }&#xA;            else {connection.disconnect();}&#xA;        })&#xA;    }&#xA;    if (!args[0]) {&#xA;      message.channel.send("you need to provide a link!");&#xA;      return;&#xA;    }&#xA;&#xA;    if (!message.member.voice.channel) {&#xA;      message.channel.send("you must be in ||a|| voice channel to play the bot!");&#xA;      return;&#xA;    }&#xA;&#xA;    if (!servers[message.guild.id]) servers[message.guild.id] = { queue: [] };&#xA;    &#xA;    var server = servers[message.guild.id];&#xA;    &#xA;    server.queue.push(args[0]);&#xA;     &#xA;    if (!message.member.voice.connection) message.member.voice.channel.join().then(function(connection) {&#xA;    play(connection, message);&#xA;    })&#xA;  },&#xA;};&#xA;

    &#xA;

    I would like to know which directory I should put FFmpeg.

    &#xA;

    I would also like to know if the FFmpeg executable has to be in a folder or compressed or if i can just place the executable in a certain directory

    &#xA;

    I am hosting my bot using Heroku on a Mac using Discord.js V12

    &#xA;

    Please help.

    &#xA;

    Thanks!

    &#xA;

  • Nomenclature #4519 (Nouveau): Renommage de terminologie (blacklist / whitelist)

    13 July 2020

    En lisant la compilation [PHP Annotated – June 2020](https://blog.jetbrains.com/phpstorm/2020/06/php-annotated-june-2020/) on tombe sur ce point :

    [[RFC] Change terminology to ExcludeList](https://wiki.php.net/rfc/change-terminology-to-excludelist) — The topic of renaming offensive terms has not been overlooked by the PHP world either. There have been [heated discussions](https://externals.io/message/110515) in the Internals.
    In the PHP core, the change affects only one thing: the configuration directive `opcache.blacklist_filename` should be renamed to `opcache.exclude_list_filename`.
    Many other PHP tools have already made changes in this regard: [PHPUnit](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.3.md#930---2020-08-07), [Drupal](https://www.drupal.org/project/drupal/issues/2993575), [Xdebug](https://github.com/xdebug/xdebug/commit/63b43b51e43b794cf8cd740e54089b2b7320fbe1), [Yii](https://github.com/yiisoft/yii2/pull/18104), [Composer](https://github.com/composer/composer/pull/8957) (+ [working with non-master Git branches](https://blog.packagist.com/composer-and-default-git-branches/)).

    C’est certainement intéressant aussi de songer à ces renommages chez nous également, utilisés à quelques endroits.