Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (65)

  • 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

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (10058)

  • multipart/x-mixed-replace - MJPG video stream does not close in

    18 janvier 2024, par karlcess

    I'm using Node.js and React.
In React I have a simple component that is displayed on the screen when a button is clicked. The component is as follows :

    


    import React from &#x27;react&#x27;&#xA;&#xA;const Image = () => {&#xA;  return <img src="http://stackoverflow.com/api/mjpgStream/stream01" style='max-width: 300px; max-height: 300px' />;&#xA;}&#xA;&#xA;

    &#xA;

    Webpack redirects my requests (api=localhost:3456/mjpgStream/stream0).&#xA;In node I created an express server that when receiving the GET continuously sends JPEG images with multipart/x-mixed-replace. Below is the code :

    &#xA;

    const cb: RequestHandler = (req, res) => {&#xA;  const url = req.url.toString().slice(1);&#xA;  res.writeHead(200, {&#xA;    "Content-Type": "multipart/x-mixed-replace;boundary=&#x27;stream&#x27;",&#xA;    Connection: "keep-alive",&#xA;    Expires: "Fri, 27 May 1977 00:00:00 GMT",&#xA;    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",&#xA;    Pragma: "no-cache",&#xA;  });&#xA;  let sub = PubSub.subscribe(url, function (msg: any, data: any) {&#xA;    res.write("--stream\r\n");&#xA;    res.write("Content-Type: image/jpeg\r\n");&#xA;    res.write("Content-Length: " &#x2B; data.length &#x2B; "\r\n");&#xA;    res.write("\r\n");&#xA;    res.write(data, "binary");&#xA;    res.write("\r\n");&#xA;  });&#xA;&#xA;  req.on("close", () => {&#xA;    PubSub.unsubscribe(sub);&#xA;    res.end();&#xA;  });&#xA;&#xA;  res.on("error", function (err) {&#xA;    console.error("Error in response:", err);&#xA;  });&#xA;};&#xA;&#xA;router.get(/\/[a-z,0-9]*/, cb);&#xA;

    &#xA;

    The video stream is published in the topic with PubSub and is correctly displayed in the Image component.&#xA;The problem is that when I click the button to close the Image component from the web page, the close event is not captured on the express server side and the mjpg flow continues to exist. I can't understand why.

    &#xA;

  • Updated mixed-mode HTML5/flash messaging, debug links

    20 janvier 2011, par Scott Schiller

    m index.html Updated mixed-mode HTML5/flash messaging, debug links

  • Improved "mixed-mode" HTML5 vs. Flash handling - namely, HTML5 case where Safari on Snow Leopard is used (which has buggy HTML5 audio) - so if available (installed and not blocked), flash fallback is used for MP3/MP4. Irony is not lost here.

    20 janvier 2011, par Scott Schiller

    m script/soundmanager2-jsmin.js m script/soundmanager2-nodebug-jsmin.js m script/soundmanager2-nodebug.js m script/soundmanager2.js Improved "mixed-mode" HTML5 vs. Flash handling - namely, HTML5 case where Safari on Snow Leopard is used (which has buggy HTML5 audio) - so if available (installed (...)