
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (74)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Diogene : création de masques spécifiques de formulaires d’édition de contenus
26 octobre 2010, parDiogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
A quoi sert ce plugin
Création de masques de formulaires
Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)
Sur d’autres sites (6720)
-
avcodec/flac_parser : Fix off-by-one error
6 octobre 2019, par Andreas Rheinhardtavcodec/flac_parser : Fix off-by-one error
The flac parser uses a fifo to buffer its data. Consequently, when
searching for sync codes of flac packets, one needs to take care of
the possibility of wraparound. This is done by using an optimized start
code search that works on each of the continuous buffers separately and
by explicitly checking whether the last pre-wrap byte and the first
post-wrap byte constitute a valid sync code.Moreover, the last MAX_FRAME_HEADER_SIZE - 1 bytes ought not to be searched
for (the start of) a sync code because a header that might be found in this
region might not be completely available. These bytes ought to be searched
lateron when more data is available or when flushing.Unfortunately there was an off-by-one error in the calculation of the
length to search of the post-wrap buffer : It was too large, because the
calculation was based on the amount of bytes available in the fifo from
the last pre-wrap byte onwards. This meant that a header might be
parsed twice (once prematurely and once regularly when more data is
available) ; it could also mean that an invalid header will be treated as
valid (namely if the length of said invalid header is
MAX_FRAME_HEADER_SIZE and the invalid byte that will be treated as the
last byte of this potential header happens to be the right CRC-8).Should a header be parsed twice, the second instance will be the best child
of the first instance ; the first instance's score will be
FLAC_HEADER_BASE_SCORE - FLAC_HEADER_CHANGED_PENALTY ( = 3) higher than
the second instance's score. So the frame belonging to the first
instance will be output and it will be done as a zero length frame (the
difference of the header's offset and the child's offset). This has
serious consequences when flushing, as returning a zero length buffer
signals to the caller that no more data will be output ; consequently the
last frames not yet output will be dropped.Furthermore, a "sample/frame number mismatch in adjacent frames" warning
got output when returning the zero-length frame belonging to the first
header, because the child's sample/frame number of course didn't match
the expected sample frame/number given its parent.filter/hdcd-mix.flac from the FATE-suite was affected by this (the last
frame was omitted) which is the reason why several FATE-tests needed to
be updated.Fixes ticket #5937.
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
Anomalie #4543 : Accessibilité des chargements ajax (live regions)
3 septembre 2020, par RastaPopoulos ♥En positionnant ces attributs, avec ces valeurs, sur des div englobantes, cela génère dans les lecteurs d’écran la lecture automatique des contenus qui ont été mis à jour.
Certes la lecture peut être interrompue par l’utilisateur, mais cela revient, à mon avis à imposer quelque chose qui n’a pas été forcément souhaité. De cette manière le propriétaire du site impose une expérience différente aux utilisateurs de lecteur d’écran.
Je ne suis pas sûr de comprendre : lancer la lecture des contenus mis à jour c’est bien très exactement ce qu’on cherchait à faire avec ces attributs il me semble. Donc ça fait bien ce qu’on cherche à faire. À la louche, je pense que 99% des utilisations de rechargement ajax SPIP (avec le critère ajax + des liens ".ajax" ou des forms) concernent parfaitement des cas avec une interaction donc un rechargement qui est explicitement demandé par l’utilisateurice : clic sur un lien qui recharge un bloc ajax OU clic sur un bouton qui recharge un formulaire en ajax. Ce n’est donc pas du tout quelque chose d’imposé et de forcé : l’utilisateurice demande une ressource (lien ajax) ou poste un formulaire (ajax) qui sont alors chargés dynamiquement SANS recharger toute la page : on veut donc bien effectivement que le lecteur d’écran se mette à relire le morceau qui vient d’être chargé !
Ne pas utiliser ces attributs lorsqu’il n’y a pas d’interactions / rechargement ajax . Exemple sur un formulaire, cela n’a pas de sens : on rempli un form et puis on valide le form. A priori (si j’ai bien compris le fonctionnement) il n ’y a aucune raison d’utiliser de live region.
Ces attributs sont sur des forms ajax, pas les forms non-ajax, non ? Quand on poste un formulaire ajax, alors seulement son bloc se recharge, et à l’intérieur de ce bloc, les contenus ont changé : des erreurs sont affichés, ou un message de retour final est ajouté, etc. C’est donc bien totalement voulu (l’utilisateurice a volontairement cliqué) et on veut que ça relise ce morceau puisque des contenus ont changé dedans, et souvent très important pour un formulaire (erreurs à corriger etc).
Du coup je ne comprends pas leurs remarques : on a l’impression que tout ce qu’ils disent part du principe que ce sont des choses rechargées en arrière-plan par une volonté du dév (ce qui peut arriver dans 1% des cas, super rare), alors que non non, c’est bien à chaque fois un clic volontaire (lien ou bouton) de l’utilisateurice.
-
Cannot get mp4 video to play in JavaFX app
23 juin 2016, par CelestialCoyoteI am trying to use the media player in Java FX to play an mp4 video. I am using the example code from the Oracle. Here is the link.
http://docs.oracle.com/javafx/2/media/simpleplayer.htm
I am using the same code with the exception that I want to play the video from my computer rather than going to the internet to get it. I also changed the size of the window to match the size of my video. The video was rendered using FFMPEG with the following parameters.
ffmpeg -y -r 30 -i ’CellCellCell_Trailer_%05d.jpg’ -r 30 -pix_fmt yuv420p -s 512x512 -vcodec libx264 ’CellCellCell.mp4’
Could not attach the video to post.
The video plays in Quicktime and VLC without problems. In the Java App it appears to load, but does not start playing. If I move the time slider, it throws an error, otherwise it just sits there and nothing happens. The file is in a folder called ’media’.
I have tried several mp4 videos, all with the same results. The player opens, but then does nothing. Any help would be appreciated.
Here is the code for MediaControl.java file. It is unmodified from the Oracle example.
package embeddedmediaplayer;
import javafx.application.Platform;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.Slider;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.media.MediaPlayer;
import javafx.scene.media.MediaPlayer.Status;
import javafx.scene.media.MediaView;
import javafx.util.Duration;
public class MediaControl extends BorderPane {
private MediaPlayer mp;
private MediaView mediaView;
private final boolean repeat = false;
private boolean stopRequested = false;
private boolean atEndOfMedia = false;
private Duration duration;
private Slider timeSlider;
private Label playTime;
private Slider volumeSlider;
private HBox mediaBar;
public MediaControl(final MediaPlayer mp) {
this.mp = mp;
setStyle("-fx-background-color: #bfc2c7;");
mediaView = new MediaView(mp);
Pane mvPane = new Pane() {
};
mvPane.getChildren().add(mediaView);
mvPane.setStyle("-fx-background-color: black;");
setCenter(mvPane);
mediaBar = new HBox();
mediaBar.setAlignment(Pos.CENTER);
mediaBar.setPadding(new Insets(5, 10, 5, 10));
BorderPane.setAlignment(mediaBar, Pos.CENTER);
final Button playButton = new Button(">");
playButton.setOnAction(new EventHandler<actionevent>() {
public void handle(ActionEvent e) {
Status status = mp.getStatus();
if (status == Status.UNKNOWN || status == Status.HALTED) {
// don't do anything in these states
return;
}
if (status == Status.PAUSED
|| status == Status.READY
|| status == Status.STOPPED) {
// rewind the movie if we're sitting at the end
if (atEndOfMedia) {
mp.seek(mp.getStartTime());
atEndOfMedia = false;
}
mp.play();
} else {
mp.pause();
}
}
});
mp.currentTimeProperty().addListener(new InvalidationListener() {
public void invalidated(Observable ov) {
updateValues();
}
});
mp.setOnPlaying(new Runnable() {
public void run() {
if (stopRequested) {
mp.pause();
stopRequested = false;
} else {
playButton.setText("||");
}
}
});
mp.setOnPaused(new Runnable() {
public void run() {
System.out.println("onPaused");
playButton.setText(">");
}
});
mp.setOnReady(new Runnable() {
public void run() {
duration = mp.getMedia().getDuration();
updateValues();
}
});
mp.setCycleCount(repeat ? MediaPlayer.INDEFINITE : 1);
mp.setOnEndOfMedia(new Runnable() {
public void run() {
if (!repeat) {
playButton.setText(">");
stopRequested = true;
atEndOfMedia = true;
}
}
});
mediaBar.getChildren().add(playButton);
// Add spacer
Label spacer = new Label(" ");
mediaBar.getChildren().add(spacer);
// Add Time label
Label timeLabel = new Label("Time: ");
mediaBar.getChildren().add(timeLabel);
// Add time slider
timeSlider = new Slider();
HBox.setHgrow(timeSlider, Priority.ALWAYS);
timeSlider.setMinWidth(50);
timeSlider.setMaxWidth(Double.MAX_VALUE);
timeSlider.valueProperty().addListener(new InvalidationListener() {
public void invalidated(Observable ov) {
if (timeSlider.isValueChanging()) {
// multiply duration by percentage calculated by slider position
mp.seek(duration.multiply(timeSlider.getValue() / 100.0));
}
}
});
mediaBar.getChildren().add(timeSlider);
// Add Play label
playTime = new Label();
playTime.setPrefWidth(130);
playTime.setMinWidth(50);
mediaBar.getChildren().add(playTime);
// Add the volume label
Label volumeLabel = new Label("Vol: ");
mediaBar.getChildren().add(volumeLabel);
// Add Volume slider
volumeSlider = new Slider();
volumeSlider.setPrefWidth(70);
volumeSlider.setMaxWidth(Region.USE_PREF_SIZE);
volumeSlider.setMinWidth(30);
volumeSlider.valueProperty().addListener(new InvalidationListener() {
public void invalidated(Observable ov) {
if (volumeSlider.isValueChanging()) {
mp.setVolume(volumeSlider.getValue() / 100.0);
}
}
});
mediaBar.getChildren().add(volumeSlider);
setBottom(mediaBar);
}
protected void updateValues() {
if (playTime != null && timeSlider != null && volumeSlider != null) {
Platform.runLater(new Runnable() {
public void run() {
Duration currentTime = mp.getCurrentTime();
playTime.setText(formatTime(currentTime, duration));
timeSlider.setDisable(duration.isUnknown());
if (!timeSlider.isDisabled()
&& duration.greaterThan(Duration.ZERO)
&& !timeSlider.isValueChanging()) {
timeSlider.setValue(currentTime.divide(duration).toMillis()
* 100.0);
}
if (!volumeSlider.isValueChanging()) {
volumeSlider.setValue((int) Math.round(mp.getVolume()
* 100));
}
}
});
}
}
private static String formatTime(Duration elapsed, Duration duration) {
int intElapsed = (int) Math.floor(elapsed.toSeconds());
int elapsedHours = intElapsed / (60 * 60);
if (elapsedHours > 0) {
intElapsed -= elapsedHours * 60 * 60;
}
int elapsedMinutes = intElapsed / 60;
int elapsedSeconds = intElapsed - elapsedHours * 60 * 60
- elapsedMinutes * 60;
if (duration.greaterThan(Duration.ZERO)) {
int intDuration = (int) Math.floor(duration.toSeconds());
int durationHours = intDuration / (60 * 60);
if (durationHours > 0) {
intDuration -= durationHours * 60 * 60;
}
int durationMinutes = intDuration / 60;
int durationSeconds = intDuration - durationHours * 60 * 60
- durationMinutes * 60;
if (durationHours > 0) {
return String.format("%d:%02d:%02d/%d:%02d:%02d",
elapsedHours, elapsedMinutes, elapsedSeconds,
durationHours, durationMinutes, durationSeconds);
} else {
return String.format("%02d:%02d/%02d:%02d",
elapsedMinutes, elapsedSeconds, durationMinutes,
durationSeconds);
}
} else {
if (elapsedHours > 0) {
return String.format("%d:%02d:%02d", elapsedHours,
elapsedMinutes, elapsedSeconds);
} else {
return String.format("%02d:%02d", elapsedMinutes,
elapsedSeconds);
}
}
}
}
</actionevent>Here is the code for the EmbeddedMediaPlayer.java file. Only modifications are the file to be played and the size of the window.
package embeddedmediaplayer;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.media.MediaView;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class EmbeddedMediaPlayer extends Application {
// private static final String MEDIA_URL =
// "http://download.oracle.com/otndocs/products/javafx/oow2010- 2.flv";
private static final String MEDIA_URL =
"file:./media/CellCellCell.mp4";
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Embedded Media Player");
Group root = new Group();
Scene scene = new Scene(root, 512, 512);
// create media player
Media media = new Media (MEDIA_URL);
MediaPlayer mediaPlayer = new MediaPlayer(media);
mediaPlayer.setAutoPlay(true);
MediaControl mediaControl = new MediaControl(mediaPlayer);
scene.setRoot(mediaControl);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}