function createCanvas(width, height, returnOffscreenCanvas = false) {
	let _canvas;

	if (width === 0 || height === 0) {
		throw new Error(
			"width or height was zero, Canvas could not be initialized !",
		);
	}

	if (device.offscreenCanvas === true && returnOffscreenCanvas === true) {
		_canvas = new globalThis.OffscreenCanvas(0, 0);
		// stubbing style for compatibility,
		// as OffscreenCanvas is detached from the DOM
		if (typeof _canvas.style === "undefined") {
			_canvas.style = {};
		}
	} else {
		// "else" create a "standard" canvas
		_canvas = globalThis.document.createElement("canvas");
	}
	_canvas.width = width;
	_canvas.height = height;

	return _canvas;
}
Create and return a new Canvas element
@memberof video
@param {number} width - width
@param {number} height - height
@param {boolean} [returnOffscreenCanvas=false] - will return an OffscreenCanvas if supported
@returns {HTMLCanvasElement|OffscreenCanvas} a new Canvas element of the given size