function init(width, height, options) {
	// ensure melonjs has been properly initialized
	if (!initialized) {
		throw new Error("me.video.init() called before engine initialization.");
	}

	try {
		// initialize the default game Application with the given options
		game.init(
			width,
			height,
			Object.assign(defaultApplicationSettings, options || {}),
		);
	} catch (e) {
		console.log(e.message);
		// me.video.init() historically returns false if failing at creating/using a HTML5 canvas
		return false;
	}

	// assign the default renderer
	renderer = game.renderer;

	//add a channel for the onresize/onorientationchange event
	globalThis.addEventListener(
		"resize",
		(e) => {
			eventEmitter.emit(WINDOW_ONRESIZE, e);
		},
		false,
	);

	// Screen Orientation API
	globalThis.addEventListener(
		"orientationchange",
		(e) => {
			eventEmitter.emit(WINDOW_ONORIENTATION_CHANGE, e);
		},
		false,
	);

	// pre-fixed implementation on mozzila
	globalThis.addEventListener(
		"onmozorientationchange",
		(e) => {
			eventEmitter.emit(WINDOW_ONORIENTATION_CHANGE, e);
		},
		false,
	);

	if (device.screenOrientation === true) {
		globalThis.screen.orientation.onchange = (e) => {
			eventEmitter.emit(WINDOW_ONORIENTATION_CHANGE, e);
		};
	}

	// Automatically update relative canvas position on scroll
	globalThis.addEventListener(
		"scroll",
		(e) => {
			eventEmitter.emit(WINDOW_ONSCROLL, e);
		},
		false,
	);

	// notify the video has been initialized
	eventEmitter.emit(VIDEO_INIT, game.renderer);

	return true;
}
Initialize the "video" system (create a canvas based on the given arguments, and the related renderer). <br>
@memberof video
@param {number} width - The width of the canvas viewport
@param {number} height - The height of the canvas viewport
@param {ApplicationSettings} [options] - optional parameters for the renderer
@returns {boolean} false if initialization failed (canvas not supported)
@example
// init the video with a 640x480 canvas
me.video.init(640, 480, {
    parent : "screen",
    renderer : me.video.AUTO,
    scale : "auto",
    scaleMethod : "fit"
});