diff --git a/out/Exporters/Html5Exporter.js b/out/Exporters/Html5Exporter.js
index d5b383a5..f46c7d4a 100644
--- a/out/Exporters/Html5Exporter.js
+++ b/out/Exporters/Html5Exporter.js
@@ -187,7 +187,7 @@ class Html5Exporter extends KhaExporter_1.KhaExporter {
let mp4_size = 0;
let mp3 = false;
let mp3_size = 0;
- if (!this.isDebugHtml5()) {
+ if (!this.isDebugHtml5() && !this.options.oggonly) {
mp4 = await (0, Converter_1.convert)(from, path.join(this.options.to, this.sysdir(), to + '.mp4'), this.options.aac);
if (mp4) {
mp4_size = (await fs.stat(path.join(this.options.to, this.sysdir(), to + '.mp4'))).size;
diff --git a/out/khamake.js b/out/khamake.js
index e393c6f8..c8c9c1dc 100644
--- a/out/khamake.js
+++ b/out/khamake.js
@@ -146,6 +146,11 @@ let options = [
value: true,
default: ''
},
+ {
+ full: 'oggonly',
+ description: 'Generate only ogg files for the html5 target, without `mp3/mp4` fallback',
+ value: false,
+ },
{
full: 'krafix',
description: 'Location of krafix shader compiler',
diff --git a/src/Exporters/Html5Exporter.ts b/src/Exporters/Html5Exporter.ts
index c85bd544..d163e129 100644
--- a/src/Exporters/Html5Exporter.ts
+++ b/src/Exporters/Html5Exporter.ts
@@ -223,7 +223,7 @@ export class Html5Exporter extends KhaExporter {
let mp4_size = 0;
let mp3 = false;
let mp3_size = 0;
- if (!this.isDebugHtml5()) {
+ if (!this.isDebugHtml5() && !this.options.oggonly) {
mp4 = await convert(from, path.join(this.options.to, this.sysdir(), to + '.mp4'), this.options.aac);
if (mp4) {
mp4_size = (await fs.stat(path.join(this.options.to, this.sysdir(), to + '.mp4'))).size;
diff --git a/src/Options.ts b/src/Options.ts
index 5d4c9522..dd16d15c 100644
--- a/src/Options.ts
+++ b/src/Options.ts
@@ -41,6 +41,7 @@ export class Options {
ogg: string;
aac: string;
mp3: string;
+ oggonly: boolean;
h264: string;
webm: string;
wmv: string;
diff --git a/src/khamake.ts b/src/khamake.ts
index cfc2f0a3..da88e8d8 100644
--- a/src/khamake.ts
+++ b/src/khamake.ts
@@ -148,6 +148,11 @@ let options: Array = [
value: true,
default: ''
},
+ {
+ full: 'oggonly',
+ description: 'Generate only ogg files for the html5 target, without `mp3/mp4` fallback',
+ value: false,
+ },
{
full: 'krafix',
description: 'Location of krafix shader compiler',