
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (65)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip 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 2011Le 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 2011Contrairement à 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 karlcessI'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 'react'

const Image = () => {
 return <img src="http://stackoverflow.com/api/mjpgStream/stream01" style='max-width: 300px; max-height: 300px' />;
}




Webpack redirects my requests (api=localhost:3456/mjpgStream/stream0).
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 :


const cb: RequestHandler = (req, res) => {
 const url = req.url.toString().slice(1);
 res.writeHead(200, {
 "Content-Type": "multipart/x-mixed-replace;boundary='stream'",
 Connection: "keep-alive",
 Expires: "Fri, 27 May 1977 00:00:00 GMT",
 "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
 Pragma: "no-cache",
 });
 let sub = PubSub.subscribe(url, function (msg: any, data: any) {
 res.write("--stream\r\n");
 res.write("Content-Type: image/jpeg\r\n");
 res.write("Content-Length: " + data.length + "\r\n");
 res.write("\r\n");
 res.write(data, "binary");
 res.write("\r\n");
 });

 req.on("close", () => {
 PubSub.unsubscribe(sub);
 res.end();
 });

 res.on("error", function (err) {
 console.error("Error in response:", err);
 });
};

router.get(/\/[a-z,0-9]*/, cb);



The video stream is published in the topic with PubSub and is correctly displayed in the Image component.
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.


-
Updated mixed-mode HTML5/flash messaging, debug links
20 janvier 2011, par Scott Schillerm 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 Schillerm 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 (...)