diff --git a/player/html/index.html b/player/html/index.html index fe7d80b..ecd371b 100644 --- a/player/html/index.html +++ b/player/html/index.html @@ -109,36 +109,36 @@ const sub_handlers = {}; var playlist = [ - "/01_Life/front.mp4", - "/02_Seeing/front.mp4", - "/03_Capacity/front.mp4", - "/04_Landscape/front.mp4", - "/05_Relations/front.mp4", - "/06_Will/front.mp4", - "/07_Self/front.mp4", - "/08_Field/front.mp4", - "/09_Theatre/front.mp4", - "/10_Substance/front.mp4", - "/11_Science/front.mp4", - "/12_Energy/front.mp4", - "/13_Geopolitics/front.mp4", - "/14__Chance/front.mp4", - "/15_Morality/front.mp4", - "/16_Evolution/front.mp4", - "/17_Computing/front.mp4", - "/18_Semi-Conductors/front.mp4", - "/19_Love/front.mp4", - "/20_Reversibility/front.mp4", - "/21_Weakness/front.mp4", - "/22_Elections/front.mp4", - "/23_People/front.mp4", - "/24_Corporation/front.mp4", - "/25_Instruments/front.mp4", - "/26_Practice/front.mp4", - "/27_Weaponry/front.mp4", - "/28_Art/front.mp4", - "/29_Help/front.mp4", - "/30_Self-help/front.mp4", + "/01_Life/segment.mp4", + "/02_Seeing/segment.mp4", + "/03_Capacity/segment.mp4", + "/04_Landscape/segment.mp4", + "/05_Relations/segment.mp4", + "/06_Will/segment.mp4", + "/07_Self/segment.mp4", + "/08_Field/segment.mp4", + "/09_Theatre/segment.mp4", + "/10_Substance/segment.mp4", + "/11_Science/segment.mp4", + "/12_Energy/segment.mp4", + "/13_Geopolitics/segment.mp4", + "/14__Chance/segment.mp4", + "/15_Morality/segment.mp4", + "/16_Evolution/segment.mp4", + "/17_Computing/segment.mp4", + "/18_Semi-Conductors/segment.mp4", + "/19_Love/segment.mp4", + "/20_Reversibility/segment.mp4", + "/21_Weakness/segment.mp4", + "/22_Elections/segment.mp4", + "/23_People/segment.mp4", + "/24_Corporation/segment.mp4", + "/25_Instruments/segment.mp4", + "/26_Practice/segment.mp4", + "/27_Weaponry/segment.mp4", + "/28_Art/segment.mp4", + "/29_Help/segment.mp4", + "/30_Self-help/segment.mp4", ] //var prefix = '../render/' var prefix = 'https://power.0x2620.org/static/render/' @@ -205,11 +205,13 @@ function render() { name = document.location.hash.slice(1) + console.log('on load', name) const parts = name.split('/') if (parts.length == 2) { name = parts[0] current = parseInt(parts[1]) - 1 } + console.log('on load', name, parts, current) var body = document.querySelector('body') body.innerHTML = `` var stage = document.createElement("div") @@ -315,14 +317,14 @@ }); sub_handlers[video1.id] = ass sub_handlers[video1.id].show() - }) - video1.play() - fetch(video2.src.replace(/.mp4/, '.ass')).then(async (res) => { - const content = await res.text() - const ass = new ASS(content, video2, { - container: subtitles, - }); - sub_handlers[video2.id] = ass + video1.play() + fetch(video2.src.replace(/.mp4/, '.ass')).then(async (res) => { + const content = await res.text() + const ass = new ASS(content, video2, { + container: subtitles, + }); + sub_handlers[video2.id] = ass + }) }) } function sync(event) { @@ -359,9 +361,9 @@ if (!document.location.hash.slice(1).length) { document.location.hash = '#0' + } else { + render() } - render() - diff --git a/render.py b/render.py index d2c1d20..62040f7 100644 --- a/render.py +++ b/render.py @@ -623,10 +623,12 @@ def render_all(options): print('!!', duration_a, fragment_prefix / a) print('!!', duration_b, fragment_prefix / b) #sys.exit(-1) - shutil.move(fragment_prefix / "front-mixed.mp4", fragment_prefix / "front.mp4") + shutil.move(fragment_prefix / "front-mixed.mp4", fragment_prefix / "segment.mp4") cleanup = [ + "front.mp4", "audio-5.1.mp4", - "audio-center.wav", "audio-rear.wav", + "audio-center.wav", + "audio-rear.wav", "audio-front.wav", "fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav", "audio-stereo.wav", @@ -843,7 +845,7 @@ def update_subtitles(options): write_subtitles(subs, folder, options) def update_m3u(render_prefix, exclude=[]): - files = ox.sorted_strings(glob(render_prefix + "*/*/front.mp4")) + files = ox.sorted_strings(glob(render_prefix + "*/*/segment.mp4")) for ex in exclude: files = [f for f in files if not f.startswith(ex + "/")] front_m3u = "\n".join(files)