Skip to content
Permalink
Browse files

Add audio support

  • Loading branch information...
dividuum committed May 8, 2019
1 parent 65c6d47 commit 157db03a1a5f6bd4cc2adbd059d86beb15e5868d
Showing with 33 additions and 2 deletions.
  1. +24 −1 config.js
  2. +6 −0 node.json
  3. +3 −1 node.lua
@@ -804,6 +804,14 @@ const PageList = Vue.component('page-list', {
</option>
</select>
</div>
<div class='col-xs-3'>
<label>Audio</label>
<select class="form-control" v-model='audio'>
<option :value='opt[0]' v-for='opt in audio_options'>
{{opt[1]}}
</option>
</select>
</div>
</div>
</div>
`,
@@ -819,6 +827,10 @@ const PageList = Vue.component('page-list', {
[180, "180°"],
[270, "270°"],
],
audio_options: [
[false, "No audio"],
[true, "For all videos"],
],
}),
computed: {
resolution: {
@@ -842,7 +854,18 @@ const PageList = Vue.component('page-list', {
val: v,
})
},
}
},
audio: {
get() {
return this.$store.state.config.audio || false
},
set(v) {
this.$store.commit('set_config', {
key: 'audio',
val: v,
})
},
},
},
methods: {
delete_page(uuid) {
@@ -111,5 +111,11 @@
["4000x4000", "4000x4000 -> 1920x1080"]
],
"default": "1:1"
}, {
"title": "Audio",
"ui_width": 4,
"name": "audio",
"type": "boolean",
"default": false
}]
}
@@ -16,6 +16,7 @@ pcall(function()
print("detected frame delay is", frame_delay)
end)

local audio = false
local input_state = { down = false, x = 0, y = 0, }

local function VirtualScreen()
@@ -383,6 +384,7 @@ local function Video(file)
raw = true,
looped = true,
paused = true,
audio = audio,
}
end

@@ -651,7 +653,7 @@ util.json_watch("config.json", function(config)
res_x = w,
res_y = h,
}

audio = config.audio
player.set_pages(config.pages)
end)

0 comments on commit 157db03

Please sign in to comment.
You can’t perform that action at this time.