diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | unrpyc/Makefile | 2 | ||||
-rw-r--r-- | www/js/api.js | 5 | ||||
-rw-r--r-- | www/js/imachine.js | 2 |
6 files changed, 13 insertions, 7 deletions
@@ -10,5 +10,4 @@ /rpy # generated files -/www/*.appcache /www/js/all.min.js* @@ -50,6 +50,7 @@ video: $(CVIDEO) AUDIO := $(shell find $(DUMP)/bgm $(DUMP)/sfx -name '*.ogg') OPUS := $(patsubst %.ogg,%.opus,$(AUDIO)) M4A := $(patsubst %.ogg,%.m4a,$(AUDIO)) +WAV := $(patsubst %.ogg,%.wav,$(AUDIO)) CAUDIO := $(OPUS) $(M4A) audio: $(CAUDIO) @@ -122,7 +123,7 @@ JS := www/js/html5ks.js www/js/menu.js www/js/api.js www/js/play.js www/js/image js: www/js/all.min.js www/js/all.min.js: $(JS) - $(UGLIFYJS) $^ -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map -p 2 -m -c + $(UGLIFYJS) $^ -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map -p 2 -m -c drop_debugger=false # === MISC === @@ -132,10 +133,13 @@ clean: jshint: $(JS) jshint $^ +space: + find $(DUMP) \( -name '*.wav' -o -name '*.mkv' -o -path "$(DUMP)/font*" -o -name 'ctc_strip-*.*' \) -print -delete + watch: while inotifywait -r -e modify,delete,move --exclude="^\./\.git" --exclude="\.swp$$" .; do \ ${MAKE}; \ done -.PHONY: video audio images js jshint clean watch +.PHONY: video audio images js jshint clean space watch .SUFFIXES: @@ -41,7 +41,7 @@ To reduce the setup time (many hours), try the following: Turn off zopflipng recompression by passing ZOPFLIPNG=: as an environment variable to setup.sh. It saves only a few MB but takes several hours to complete, depending on CPU. Useful if you're serving many, MANY copies, but not useful if you're serving one locally. == Reducing file size == -[TODO] +Run `make space`. Warning: This will remove source files from dump. == Contributing == diff --git a/unrpyc/Makefile b/unrpyc/Makefile index 56d207b..5a86ca6 100644 --- a/unrpyc/Makefile +++ b/unrpyc/Makefile @@ -38,7 +38,7 @@ test: all install: all [ -d ../www/json ] || mkdir ../www/json - install $(TARGETS) ../www/json + cp -f $(TARGETS) ../www/json uninstall: $(RM) ../www/json/* diff --git a/www/js/api.js b/www/js/api.js index e029413..74971ae 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -42,7 +42,6 @@ window.html5ks.api = new (function () { if (el.canPlayType(type[0])) { el.src = src + "." + type[1]; el.load(); - el.play(); return true; } } @@ -51,6 +50,10 @@ window.html5ks.api = new (function () { _nextType(); + el.oncanplaythrough = function () { + el.play(); + }; + el.onerror = function (e) { if (e.code === e.MEDIA_ERR_SRC_NOT_SUPPORTED) { if (!_nextType()) { diff --git a/www/js/imachine.js b/www/js/imachine.js index 7a1f7de..968df84 100644 --- a/www/js/imachine.js +++ b/www/js/imachine.js @@ -56,7 +56,7 @@ html5ks.imachine = new (function () { var cpy = inst.slice(0), type = '', next = null; - el: while (type = cpy.shift()) { + el: while ((type = cpy.shift())) { switch (type) { case "if": case "elif": |