Skip to content
Extraits de code Groupes Projets
Valider 6e1606b5 rédigé par Deurstann's avatar Deurstann
Parcourir les fichiers

Play button does now play/pause the video in admin interface

parent 496fd593
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!4Auto update of the queue AND Resolve play button
...@@ -134,7 +134,25 @@ class LktClient { ...@@ -134,7 +134,25 @@ class LktClient {
} }
static commandPlay() { static commandPlay() {
return LktClient.__execSimple('play'); var status= LktClient.commandStatus();
return status.then(LktClient.changePlayStatus,LktClient.errorStatus);
}
static changePlayStatus(status)
{
switch(status.state)
{
case "play":
return LktClient.__execSimple("pause 1");
break;
case "pause":
return LktClient.__execSimple("pause 0");
break;
case "stop":
return LktClient.__execSimple("play");
break;
default:
logger.info("Unknown play state"+status.state);
}
} }
static commandStop() { static commandStop() {
return LktClient.__execSimple('stop'); return LktClient.__execSimple('stop');
...@@ -155,6 +173,10 @@ class LktClient { ...@@ -155,6 +173,10 @@ class LktClient {
static commandQueueDelId(id) { static commandQueueDelId(id) {
return LktClient.__execSimple(`deleteid ${id}`); return LktClient.__execSimple(`deleteid ${id}`);
} }
static errorStatus(error)
{
logger.error("Unable to access lektor status:" + error);
}
} }
function __mpdToObject(string) { function __mpdToObject(string) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter