dropped dosee:filename meta element
This commit is contained in:
parent
1d752eee4b
commit
390d844094
@ -1,6 +1,5 @@
|
||||
{
|
||||
"capname": "df2intro.png",
|
||||
"filename": "df2intro.zip",
|
||||
"gamefilepath": "dos_programs/program_1/df2intro.zip",
|
||||
"gusaudio": "false",
|
||||
"resolution": "640, 480",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"capname": "df2.png",
|
||||
"filename": "df2.zip",
|
||||
"gamefilepath": "dos_programs/program_2/df2.zip",
|
||||
"gusaudio": "false",
|
||||
"resolution": "640, 480",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"capname": "hyb605.png",
|
||||
"filename": "hyb605.zip",
|
||||
"gamefilepath": "dos_programs/program_3/hyb605.zip",
|
||||
"gusaudio": "false",
|
||||
"resolution": "640, 480",
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"capname": "agi_demo_pack_1.png",
|
||||
"filename": "agi_demo_pack_1.zip",
|
||||
"gamefilepath": "dos_programs/program_4/agi_demo_pack_1.zip",
|
||||
"gusaudio": "false",
|
||||
"resolution": "640, 480",
|
||||
|
@ -17,13 +17,20 @@ const paths = new Map()
|
||||
// Load configurations that are obtained from the <meta name="dosee:"> HTML tags
|
||||
const config = new Map()
|
||||
.set(`exe`, getMetaContent(`dosee:startexe`))
|
||||
.set(`filename`, getMetaContent(`dosee:filename`))
|
||||
.set(`filename`, ``)
|
||||
.set(`gus`, getMetaContent(`dosee:gusaudio`))
|
||||
.set(`path`, getMetaContent(`dosee:gamefilepath`))
|
||||
.set(`res`, getMetaContent(`dosee:resolution`))
|
||||
.set(`start`, false)
|
||||
.set(`utils`, getMetaContent(`dosee:utils`))
|
||||
|
||||
// Extract and save the filename from config path
|
||||
{
|
||||
const index = config.get(`path`).lastIndexOf(`/`)
|
||||
if (index > -1) config.set(`filename`, config.get(`path`).slice(index + 1))
|
||||
else config.set(`filename`, config.get(`path`))
|
||||
}
|
||||
|
||||
// Handle URL params special cases that need additional files to be loaded by DOSee
|
||||
{
|
||||
const urlParams = newQueryString()
|
||||
@ -81,7 +88,8 @@ const utils = q => {
|
||||
// NOTE: This may break audio support in Chrome 71+ due to its Web Audio autoplay policy?
|
||||
// https://goo.gl/7K7WLu
|
||||
if (storageAvailable(`local`)) {
|
||||
if(localStorage.getItem(`doseeAutoStart`) === `true`) config.set(`start`, true)
|
||||
if (localStorage.getItem(`doseeAutoStart`) === `true`)
|
||||
config.set(`start`, true)
|
||||
}
|
||||
if (config.get(`start`) === true) console.log(`DOSee will launch automatically`)
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
<!-- DOSee initialisation options -->
|
||||
<meta name="dosee:capname" content="sierra.png" />
|
||||
<meta name="dosee:filename" content="agi_demo_pack_1.zip" />
|
||||
<meta name="dosee:gamefilepath" content="dos_programs/program_4/agi_demo_pack_1.zip" />
|
||||
<meta name="dosee:gusaudio" content="false" />
|
||||
<meta name="dosee:resolution" content="640, 480" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user