export const enterFullscreen = () => {
	// #ifdef H5
	if (document.documentElement.requestFullscreen) {
		document.documentElement.requestFullscreen();
	} else if (document.documentElement.mozRequestFullScreen) { /* Firefox */
		document.documentElement.mozRequestFullScreen();
	} else if (document.documentElement.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
		document.documentElement.webkitRequestFullscreen();
	} else if (document.documentElement.msRequestFullscreen) { /* IE/Edge */
		document.documentElement.msRequestFullscreen();
	}
	// #endif
	// #ifdef APP-PLUS
	// plus.navigator.setFullscreen(true)
	// #endif
}

export const exitFullscreen = () => {
	// #ifdef H5
	if (document.exitFullscreen) {
		document.exitFullscreen();
	} else if (document.mozCancelFullScreen) { /* Firefox */
		document.mozCancelFullScreen();
	} else if (document.webkitExitFullscreen) { /* Chrome, Safari and Opera */
		document.webkitExitFullscreen();
	} else if (document.msExitFullscreen) { /* IE/Edge */
		document.msExitFullscreen();
	}
	// #endif
}

// const toggleFullScreen = () => {
// 		// #ifdef H5
// 		if (appStore.systemInfo.browserName === 'safari') {
// 			// if (safari.application) {
// 			// 	safari.application.activate()
// 			// }
// 		} else {
// 			if (!document.fullscreenElement) {
// 				document.documentElement.requestFullscreen()
// 			}
// 		}
// 		// #endif
// 	}