Skip to content

Commit

Permalink
Minor improvements to run(), an UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sametmax committed Jun 27, 2014
1 parent 88eebac commit 577bada
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion 2014/juin/video_remote/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def get_uuid():
# On lance l'application. Ceci va lancer le serveur
# puis le client. On peut désactiver le lancement du
# serveur une fois qu'on met tout ça en prod.
app.run(url="ws://0.0.0.0:8080/")
if __name__ == "__main__":
app.run(url="ws://0.0.0.0:8080/")
# On ne peut rien mettre comme code ici, il faut le
# mettre dans @app.signal('onjoined') si on veut
# entrer du code après que l'app soit lancée.
6 changes: 5 additions & 1 deletion 2014/juin/video_remote/control.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<meta charset='utf-8'>
<script src="https://autobahn.s3.amazonaws.com/autobahnjs/latest/autobahn.min.jgz"
type="text/javascript"></script>
<!-- Zoom du viewport sur mobile pour éviter d'avoir
à le faire à la main. -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
#controls {
width:300px;
width:350px;
margin:auto;
}
#controls button {
Expand Down Expand Up @@ -90,8 +92,10 @@
control.togglePlay = function() {
if (control.playing){
session.call(uuid + '.pause');
control.setPlaying(false);
} else {
session.call(uuid + '.play');
control.setPlaying(true);
}
};

Expand Down

0 comments on commit 577bada

Please sign in to comment.