
Recherche avancée
Autres articles (106)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (...)
Sur d’autres sites (14497)
-
Garder les préférences de tri/pagination du côté client
29 novembre 2013Le commit http://zone.spip.org/trac/spip-zone/changeset/78938, annulé depuis, incluait les préférences de tri, pagination et vue des listes dans la session de l’utilisateur. Malheureusement, c’est impossible à faire du côté serveur, puisque ça explose le cache (le nombre de configurations possibles génère autant de contextes de cache).
Cette fonctionnalité ne peut donc être implémentée que du côté client, soit par un cookie, soit par localstorage.
-
Cannot invoke initializer for type ’UnsafeMutablePointer’ with an argument list of type ’(Int32 ?)’
28 mars 2018, par Law GimenezI am trying to implement some methods and pointers of ffmpeg to Swift but converting it to Swift is a little complex. What does this error mean ?
Cannot invoke initializer for type ’UnsafeMutablePointer’ with an argument list of type ’(Int32 ?)’ ?
Code is below
let pictureFrameData = av_malloc(Int(numBytes))
var test = frame?.pointee.linesize.0.
av_image_fill_arrays(UnsafeMutablePointer(frameRGB?.pointee.data.0),
UnsafeMutablePointer<int32>(frame?.pointee.linesize.0)!,
pictureFrameData,
frameRGB?.pointee.format,
frameRGB?.pointee.width,
frameRGB?.pointee.height,
1)
</int32>the error is at this line
UnsafeMutablePointer<int32>(frame?.pointee.linesize.0)</int32>
-
couldn't populate thumbnail on client side
8 novembre 2020, par Lokirouter.post("/thumbnail",(req,res)=>{

 let thumbsFilePath="";
 let fileDuration="";



 ffmpeg.ffprobe(req.body.filePath, function(err,metadata){
 console.dir(metadata);
 console.log('METADATA==>'+metadata);
 console.log(metadata.format.duration);

 fileDuration=metadata.format.duration;

 })

 
 ffmpeg(req.body.filePath)
 .on('filenames', function(filenames) {
 console.log('Will generate ' + filenames.join(','))
 thumbsFilePath="uploads/thumbnails/"+ filenames[0];
 })
 .on('end', function() {
 console.log('Screenshots taken');
 console.log('FILEPATH===>'+thumbsFilePath);
 console.log('FILEDURATION===>'+fileDuration);
 return res.json({success: true, thumbsFilePath , fileDuration})
 })
 .screenshots({
 // Will take screens at 20%, 40%, 60% and 80% of the video
 count: 3,
 folder: 'uploads/thumbnails/',
 size:'320x240',
 // %b input basename ( filename w/o extension )
 filename:'thumbnail-%b.png'
 });
})



the screenshots are saved perfectly and their path is also received to the client-side from
thumbsFilePath
but I cant populate it in the client-side page(react).. idk what I am doing wrong here.

here is client-side code. I used
usestate


const [FilePath, setFilePath]= useState('');
 const [Duration, setDuration] = useState('');
 const [Thumbnail, setThumbnail] = useState('');



here is an error when I try to populate img




const onDrop=(files)=>{
 let formData= new FormData();
 let config={
 header:{'content-type':'multipart/form-data'}
 }
 
 formData.append("file",files[0])
 Axios.post('http://localhost:5000/api/video/uploadFiles',formData,config)
 .then(response=>{
 console.log(response);
 if(response.data.success){
 console.log('FILEPATH==>'+response.data.filePath);
 console.log('filename==>'+response.data.fileName);
 let variable={
 filePath:response.data.filePath,
 fileName:response.data.fileName
 }
 setFilePath(response.data.filePath);
 Axios.post('http://localhost:5000/api/video/thumbnail',variable)
 .then(response=>{
 if(response.data.success){
 setDuration(response.data.fileDuration)
 setThumbnail(response.data.thumbsFilePath)
 }else{
 alert("failed to make thumbnails");
 }
 })
 }
 }).catch(err=>{
 console.log('error'+err);
 })
 }
 
 return (
 <>
 <form>
 <dropzone>
 {({getRootProps, getInputProps}) => (
 <section>
 <div classname="dropzone__container">
 <input />
 <p>Drag 'n' drop some files here, or click to select files</p>
 </div>
 </section>
 )}
</dropzone>
 
 {Thumbnail !== "" &&
 <div>
 <img src="http://stackoverflow.com/feeds/tag/{`http:/localhost:5000/server/${Thumbnail}`}" alt="haha" style='max-width: 300px; max-height: 300px' />
 </div>
 }

{data: {…}, status: 200, statusText: "OK", headers: {…}, config: {…}, …}config: {url: "http://localhost:5000/api/video/uploadFiles", method: "post", data: FormData, headers: {…}, transformRequest: Array(1), …}data: {success: true, fileName: "SampleVideo_1280x720_1mb.mp4", filePath: "uploads\SampleVideo_1280x720_1mb.mp4"}headers: {content-length: "109", content-type: "application/json; charset=utf-8"}request: XMLHttpRequest {readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, onreadystatechange: ƒ, …}status: 200statusText: "OK"__proto__: Object
UploadVideo.js:51 FILEPATH==>uploads\SampleVideo_1280x720_1mb.mp4
UploadVideo.js:52 filename==>SampleVideo_1280x720_1mb.mp4
thumbnail-SampleVideo_1280x720_1mb_1.png:1 GET http://localhost:5000/server/uploads/thumbnails/thumbnail-SampleVideo_1280x720_1mb_1.png 404 (Not Found)
but the thumbnail is in that directory..but it says not found.and it shows the "alt"(haha) in browser.`enter code here`
(C:\Users\chidori\Desktop\project\server\uploads\thumbnails\thumbnail-SampleVideo_1280x720_1mb_1.png).
</form>


sorry for messy presentation..