
Recherche avancée
Autres articles (47)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP 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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe 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 (...)
Sur d’autres sites (4250)
-
The Ultimate Guide to HeatMap Software
-
How to limit duration of the video with Dropzonejs ?
20 octobre 2017, par SNaReI have a form which I upload videos and duration/length of the video is important.
After I upload the file with PHP, I check the duration of the video file size with
FFMpeg
.I calculate duration in PHP and need to send value of the duration via PHP somehow. I think I have to append the duration to
$result
variable of Json.This is my html
<code class="echappe-js"><script src=<br />
"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script src="https://rawgit.com/enyo/dropzone/master/dist/dropzone.js"></script>
<script type="text/javascript"><br />
<br />
Dropzone.options.myDropzone = {<br />
<br />
maxFiles: 1,<br />
acceptedFiles: "image/*,video/*",<br />
maxfilesexceeded: function (file) {<br />
this.removeAllFiles();<br />
this.addFile(file);<br />
$('#infomsg').hide();<br />
<br />
},<br />
<br />
init: function () {<br />
$('#infomsg').hide();<br />
<br />
this.on("success", function (result) {<br />
<br />
$('#infomsg').show();<br />
<br />
<br />
$("#boatAddForm").append($('<input type="hidden" ' +<br />
'name="files[]" ' +<br />
'value="' + result.name + '">'));<br />
<br />
});<br />
}<br />
};<br />
<br />
<br />
</script>This is the most minimal example of Dropzone. The upload in this
example doesn’t work, because there is no actual server to handle
the file upload.This is my PHP
<?php
$ds = DIRECTORY_SEPARATOR;
$storeFolder = 'uploads';
if (!empty($_FILES)) {
$tempFile = $_FILES['file']['tmp_name'];
$targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds;
$targetFile = $targetPath. $_FILES['file']['name'];
move_uploaded_file($tempFile,$targetFile);
} else {
$result = array();
$files = scandir($storeFolder); //1
if ( false!==$files ) {
foreach ( $files as $file ) {
if ( '.'!=$file && '..'!=$file) { //2
$obj['name'] = $file;
$obj['size'] = filesize($storeFolder.$ds.$file);
$result[] = $obj;
}
}
}
header('Content-type: text/json'); //3
header('Content-type: application/json');
echo json_encode($result);
}If I could check a custom json response right after
Dropzone.options.myDropzone = {
like other requirements for success, I won’t have to right if statements in success in order to check the validation.
Basically I want to do it as I do like
maxFiles: 1,
without writing any conditions inside success
-
How to limit duration of the video with Dropzonejs ?
26 juin 2015, par SNaReI have a form which I upload videos and duration/length of the video is important.
After I upload the file with PHP, I check the duration of the video file size with
FFMpeg
.I calculate duration in PHP and need to send value of the duration via PHP somehow. I think I have to append the duration to
$result
variable of Json.This is my html
<code class="echappe-js"><script src=<br />
"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script src="https://rawgit.com/enyo/dropzone/master/dist/dropzone.js"></script>
<script type="text/javascript"><br />
<br />
Dropzone.options.myDropzone = {<br />
<br />
maxFiles: 1,<br />
acceptedFiles: "image/*,video/*",<br />
maxfilesexceeded: function (file) {<br />
this.removeAllFiles();<br />
this.addFile(file);<br />
$('#infomsg').hide();<br />
<br />
},<br />
<br />
init: function () {<br />
$('#infomsg').hide();<br />
<br />
this.on("success", function (result) {<br />
<br />
$('#infomsg').show();<br />
<br />
<br />
$("#boatAddForm").append($('<input type="hidden" ' +<br />
'name="files[]" ' +<br />
'value="' + result.name + '">'));<br />
<br />
});<br />
}<br />
};<br />
<br />
<br />
</script>This is the most minimal example of Dropzone. The upload in this
example doesn’t work, because there is no actual server to handle
the file upload.This is my PHP
<?php
$ds = DIRECTORY_SEPARATOR;
$storeFolder = 'uploads';
if (!empty($_FILES)) {
$tempFile = $_FILES['file']['tmp_name'];
$targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds;
$targetFile = $targetPath. $_FILES['file']['name'];
move_uploaded_file($tempFile,$targetFile);
} else {
$result = array();
$files = scandir($storeFolder); //1
if ( false!==$files ) {
foreach ( $files as $file ) {
if ( '.'!=$file && '..'!=$file) { //2
$obj['name'] = $file;
$obj['size'] = filesize($storeFolder.$ds.$file);
$result[] = $obj;
}
}
}
header('Content-type: text/json'); //3
header('Content-type: application/json');
echo json_encode($result);
}If I could check a custom json response right after
Dropzone.options.myDropzone = {
like other requirements for success, I won’t have to right if statements in success in order to check the validation.
Basically I want to do it as I do like
maxFiles: 1,
without writing any conditions inside success