diff --git a/debug/video-export.html b/debug/video-export.html
index b21a32e7f58..473e422fee7 100644
--- a/debug/video-export.html
+++ b/debug/video-export.html
@@ -37,7 +37,7 @@
easing: t => t
});
// wait for animation to finish
- await untilMapEvent('moveend');
+ await map.once('moveend');
}
map.on('load', async () => {
@@ -45,7 +45,7 @@
map.setTerrain({source: 'dem', exaggeration: 1.5});
// wait until the map settles
- await untilMapEvent('idle');
+ await map.once('idle');
// uncomment to fine-tune animation without recording:
// animate(); return;
@@ -102,10 +102,6 @@
// make sure to run `ffmpeg -i mapbox-gl.mp4 mapbox-gl-optimized.mp4` to compress the video
});
-function untilMapEvent(type) {
- return new Promise(resolve => map.once(type, resolve));
-}
-