File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ class Camera(object):
48
48
49
49
_instance = None
50
50
_img_template = image .Image .load ("coderdojo-logo.png" )
51
- stream_port = 8080
52
51
53
52
@classmethod
54
53
def get_instance (cls ):
Original file line number Diff line number Diff line change @@ -84,10 +84,8 @@ def get_locale():
84
84
85
85
@app .route ("/" )
86
86
def handle_home ():
87
- stream_port = cam .stream_port if cam else ""
88
87
return render_template ('main.html' ,
89
88
host = request .host [:request .host .find (':' )],
90
- stream_port = stream_port ,
91
89
locale = get_locale (),
92
90
config = app .bot_config ,
93
91
program_level = app .bot_config .get ("prog_level" , "std" ),
@@ -113,7 +111,7 @@ def handle_wifi():
113
111
if mode == "ap" :
114
112
return "http://coder.bot:8080"
115
113
else :
116
- return "http://coderbot.locali :8080"
114
+ return "http://coderbot.local :8080"
117
115
118
116
@app .route ("/update" , methods = ["GET" ])
119
117
def handle_update ():
Original file line number Diff line number Diff line change 5
5
var CODERBOT_MOV_TR_DEF_ELAPSE = { { config . move_tr_elapse} } ;
6
6
var CODERBOT_PROG_MOVE_MOTION = "{{config.prog_move_motion}}" == "yes" ;
7
7
var CODERBOT_PROG_MOVE_MPU = "{{config.prog_move_mpu}}" == "yes" ;
8
- var CODERBOT_STREAM_URL = "http://{{host}}:{{stream_port}}/stream"
9
8
var CODERBOT_PROG_LEVEL = "{{config.prog_level}}" ;
10
9
var CODERBOT_PROG_SCROLLBARS = "{{config.prog_scrollbars}}" == "true" ;
11
10
var CODERBOT_PROG_MAXBLOCKS = { { config . prog_maxblocks} } <= 0 ?Infinity :{ { config . prog_maxblocks} } ;
38
37
</ script >
39
38
< style >
40
39
.ui-content-stream {
41
- background : url ('http://{{host}}:{{stream_port}} /video/stream' ) no-repeat;
40
+ background : url ('/video/stream' ) no-repeat;
42
41
background-size : auto 100% !important ;
43
42
background-position : center;
44
43
padding : 0px ;
45
44
}
46
45
.ui-content-stream-program {
47
- background : url ('http://{{host}}:{{stream_port}} /video/stream' ) no-repeat;
46
+ background : url ('/video/stream' ) no-repeat;
48
47
background-size : auto auto !important ;
49
48
background-position : center;
50
49
}
You can’t perform that action at this time.
0 commit comments