mirror of
https://github.com/meinside/rpi-mjpg-streamer.git
synced 2021-09-19 20:51:20 +03:00
add config.json.sample
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,6 @@
|
||||
# custom files
|
||||
run-mjpg-streamer.sh
|
||||
init/mjpg-streamer
|
||||
www/config.json
|
||||
|
||||
*.swp
|
||||
|
||||
5
www/config.json.sample
Normal file
5
www/config.json.sample
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"angle": 0,
|
||||
"flipped": false,
|
||||
"mirrored": false
|
||||
}
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/coffeescript">
|
||||
# customize these for initial orientation
|
||||
# default values
|
||||
angle = 0
|
||||
flipped = false
|
||||
mirrored = false
|
||||
@@ -64,7 +64,8 @@ refreshRotation = ->
|
||||
$('#streaming').attr('class', "img-responsive img-thumbnail x#{if flipped then '-flipped' else ''}#{if mirrored then '-mirrored' else ''}-rotated-#{angle}")
|
||||
return
|
||||
|
||||
$ ->
|
||||
# initialize
|
||||
initialize = ->
|
||||
# set initial orientation
|
||||
refreshRotation()
|
||||
|
||||
@@ -84,5 +85,22 @@ $ ->
|
||||
refreshRotation()
|
||||
|
||||
return
|
||||
|
||||
$ ->
|
||||
$.ajax(
|
||||
url: '/config.json'
|
||||
type: 'GET'
|
||||
async: true
|
||||
success: (msg) ->
|
||||
angle = msg.angle
|
||||
flipped = msg.flipped
|
||||
mirrored = msg.mirrored
|
||||
initialize()
|
||||
error: ->
|
||||
initialize()
|
||||
)
|
||||
|
||||
return
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user