Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (33)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • HTML5 audio and video support

    13 avril 2011, par

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

  • Support audio et vidéo HTML5

    10 avril 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 (...)

Sur d’autres sites (5571)

  • Problem importing whatsapp-web.js nodejs module in electron react app

    26 mai 2021, par Sunil Shah

    I am trying to build an electron react app. I need to integrate this node modules https://www.npmjs.com/package/whatsapp-web.js in my electron react app. My main.js of electron looks like this :

    


    

    

    // Modules to control application life and create native browser window
const { app, BrowserWindow } = require("electron");
const path = require("path");

function createWindow() {
  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      webSecurity: false,
    },
  });

  // and load the index.html of the app.
  mainWindow.loadURL("your ip address:3000");

  // Open the DevTools.
  // mainWindow.webContents.openDevTools()
}

app.whenReady().then(() => {
  createWindow();

  app.on("activate", function () {
    // On macOS it's common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (BrowserWindow.getAllWindows().length === 0) createWindow();
  });
});

// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", function () {
  if (process.platform !== "darwin") app.quit();
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

    


    


    



    And the React code where i want to import whatsapp-web.js module looks like

    


    

    

    import React from "react";&#xA;import styled from "styled-components";&#xA;const qrcode = require(&#x27;qrcode-terminal&#x27;);&#xA;const Client = require(&#x27;whatsapp-web.js&#x27;);&#xA;function Error() {&#xA;  var client = new Client();&#xA;  client.initialize();&#xA;  console.log(client);&#xA;  console.log(qrcode);&#xA;  return (&#xA;    <container>&#xA;      <errorimage src="https://cdn4.iconfinder.com/data/icons/smiley-vol-3-2/48/134-512.png"></errorimage>&#xA;      <errormessage>Oops, you are not connected to any number.</errormessage>&#xA;    </container>&#xA;  );&#xA;}&#xA;&#xA;export default Error;&#xA;&#xA;const Container = styled.div`&#xA;  display: flex;&#xA;  height: 100vh;&#xA;  width: 100%;&#xA;  padding-top: 20vh;&#xA;  position: center;&#xA;  /* align-items: center; */&#xA;  justify-content: center;&#xA;`;&#xA;&#xA;const ErrorImage = styled.img`&#xA;  background-color: transparent;&#xA;  background-repeat: no-repeat;&#xA;  background-size: cover;&#xA;  object-fit: contain;&#xA;&#xA;  width: 25%;&#xA;  height: 25%;&#xA;&#xA;  /* border: 2px solid black; */&#xA;`;&#xA;&#xA;const ErrorMessage = styled.div`&#xA;  margin: 10px;&#xA;  width: 50%;&#xA;  height: 25%;&#xA;  /* top: 20px; */&#xA;  font-size: 30px;&#xA;  align-items: center;&#xA;  font-family: "Lucida Console", "Courier New", monospace;&#xA;  /* font-weight: bold; */&#xA;`;

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

    Now everytime I try to import const Client = require('whatsapp-web.js') It throws error like this :&#xA;**&#xA;[0] ./node_modules/fluent-ffmpeg/index.js&#xA;[0] Module not found : Can't resolve './lib-cov/fluent-ffmpeg' in 'D :\Sunil\Zarir_app-main\Zarir_app-main\node_modules\fluent-ffmpeg'&#xA;[0] Compiling...&#xA;[0] Failed to compile.

    &#xA;

    and I tried the solution&#xA;https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/573#issuecomment-305408048&#xA;and other resources but still nothing works and just loops in errors and errors.&#xA;Please help if you have any information related to it.&#xA;Thank you.

    &#xA;

  • swresample : add exact_rational option

    12 juin 2016, par Muhammad Faiz
    swresample : add exact_rational option
    

    give high quality resampling
    as good as with linear_interp=on
    as fast as without linear_interp=on
    tested visually with ffplay
    ffplay -f lavfi "aevalsrc=’sin(10000*t*t)’, aresample=osr=48000, showcqt=gamma=5"
    ffplay -f lavfi "aevalsrc=’sin(10000*t*t)’, aresample=osr=48000:linear_interp=on, showcqt=gamma=5"
    ffplay -f lavfi "aevalsrc=’sin(10000*t*t)’, aresample=osr=48000:exact_rational=on, showcqt=gamma=5"

    slightly speed improvement
    for fair comparison with -cpuflags 0
    audio.wav is 1 hour 44100 stereo 16bit wav file
    ffmpeg -i audio.wav -af aresample=osr=48000 -f null -
    old new
    real 13.498s 13.121s
    user 13.364s 12.987s
    sys 0.131s 0.129s

    linear_interp=on
    old new
    real 23.035s 23.050s
    user 22.907s 22.917s
    sys 0.119s 0.125s

    exact_rational=on
    real 12.418s
    user 12.298s
    sys 0.114s

    possibility to decrease memory usage if soft compensation is ignored

    Signed-off-by : Muhammad Faiz <mfcc64@gmail.com>

    • [DH] libswresample/arm/resample_init.c
    • [DH] libswresample/options.c
    • [DH] libswresample/resample.c
    • [DH] libswresample/resample.h
    • [DH] libswresample/resample_template.c
    • [DH] libswresample/soxr_resample.c
    • [DH] libswresample/swresample.c
    • [DH] libswresample/swresample_internal.h
    • [DH] libswresample/version.h
    • [DH] libswresample/x86/resample_init.c
  • avcodec : do not use AVFrame accessor

    22 avril 2017, par Muhammad Faiz
    avcodec : do not use AVFrame accessor
    

    Reviewed-by : wm4 <nfxjfg@googlemail.com>
    Signed-off-by : Muhammad Faiz <mfcc64@gmail.com>

    • [DH] libavcodec/ac3dec.c
    • [DH] libavcodec/cpia.c
    • [DH] libavcodec/crystalhd.c
    • [DH] libavcodec/cuvid.c
    • [DH] libavcodec/decode.c
    • [DH] libavcodec/encode.c
    • [DH] libavcodec/exr.c
    • [DH] libavcodec/gifdec.c
    • [DH] libavcodec/mjpegdec.c
    • [DH] libavcodec/pngdec.c
    • [DH] libavcodec/proresdec2.c
    • [DH] libavcodec/rawdec.c
    • [DH] libavcodec/tiff.c
    • [DH] libavcodec/videotoolboxenc.c
    • [DH] libavcodec/webp.c