_meReady (media, domNode) {
		const
			t = this,
			autoplayAttr = domNode.getAttribute('autoplay'),
			autoplay = !(autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === 'false'),
			isNative = media.rendererName !== null && /(native|html5)/i.test(media.rendererName)
		;

		if (t.getElement(t.controls)) {
			t.enableControls();
		}

		if (t.getElement(t.container) && t.getElement(t.container).querySelector(`.${t.options.classPrefix}overlay-play`)) {
			t.getElement(t.container).querySelector(`.${t.options.classPrefix}overlay-play`).style.display = '';
		}

		// make sure it can't create itself again if a plugin reloads
		if (t.created) {
			return;
		}

		t.created = true;
		t.media = media;
		t.domNode = domNode;

		if (!(IS_ANDROID && t.options.AndroidUseNativeControls) && !(IS_IPAD && t.options.iPadUseNativeControls) && !(IS_IPHONE && t.options.iPhoneUseNativeControls)) {

			// In the event that no features are specified for audio,
			// create only MediaElement instance rather than
			// doing all the work to create a full player
			if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {
				// force autoplay for HTML5
				if (autoplay && isNative) {
					t.play();
				}

				if (t.options.success) {

					if (typeof t.options.success === 'string') {
						window[t.options.success](t.media, t.domNode, t);
					} else {
						t.options.success(t.media, t.domNode, t);
					}
				}

				return;
			}

			// cache container to store control elements' original position
			t.featurePosition = {};

			// Enable default actions
			t._setDefaultPlayer();

			t.buildposter(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
			t.buildkeyboard(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
			t.buildoverlays(t, t.getElement(t.controls), t.getElement(t.layers), t.media);

			if (t.options.useDefaultControls) {
				const defaultControls = ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'];
				t.options.features = defaultControls.concat(t.options.features.filter((item) => defaultControls.indexOf(item) === -1));
			}

			t.buildfeatures(t, t.getElement(t.controls), t.getElement(t.layers), t.media);

			const event = createEvent('controlsready', t.getElement(t.container));
			t.getElement(t.container).dispatchEvent(event);

			// reset all layers and controls
			t.setPlayerSize(t.width, t.height);
			t.setControlsSize();

			// controls fade
			if (t.isVideo) {

				// create callback here since it needs access to current
				// MediaElement object
				t.clickToPlayPauseCallback = () => {
					if (t.options.clickToPlayPause) {
						const
							button = t.getElement(t.container)
								.querySelector(`.${t.options.classPrefix}overlay-button`),
							pressed = button.getAttribute('aria-pressed')
						;

						if (t.paused && pressed) {
							t.pause();
						} else if (t.paused) {
							t.play();
						} else {
							t.pause();
						}

						button.setAttribute('aria-pressed', !pressed);
						t.getElement(t.container).focus();
					}
				};

				t.createIframeLayer();

				// click to play/pause
				t.media.addEventListener('click', t.clickToPlayPauseCallback);

				if ((IS_ANDROID || IS_IOS) && !t.options.alwaysShowControls) {

					// for touch devices (iOS, Android)
					// show/hide without animation on touch
					t.node.addEventListener('touchstart', () => {

						// toggle controls
						if (t.controlsAreVisible) {
							t.hideControls(false);
						} else {
							if (t.controlsEnabled) {
								t.showControls(false);
							}
						}
					}, SUPPORT_PASSIVE_EVENT ? { passive: true } : false);
				} else {
					// show/hide controls
					t.getElement(t.container).addEventListener('mouseenter', () => {
						if (t.controlsEnabled) {
							if (!t.options.alwaysShowControls) {
								t.killControlsTimer('enter');
								t.showControls();
								t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
							}
						}
					});
					t.getElement(t.container).addEventListener('mousemove', () => {
						if (t.controlsEnabled) {
							if (!t.controlsAreVisible) {
								t.showControls();
							}
							if (!t.options.alwaysShowControls) {
								t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
							}
						}
					});
					t.getElement(t.container).addEventListener('mouseleave', () => {
						if (t.controlsEnabled) {
							if (!t.paused && !t.options.alwaysShowControls) {
								t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
							}
						}
					});
				}

				if (t.options.hideVideoControlsOnLoad) {
					t.hideControls(false);
				}

				if (t.options.enableAutosize) {
					t.media.addEventListener('loadedmetadata', (e) => {
						// if the `height` attribute and `height` style and `options.videoHeight`
						// were not set, resize to the media's real dimensions
						const target = (e !== undefined) ? (e.detail.target || e.target) : t.media;
						if (t.options.videoHeight <= 0 && !t.domNode.getAttribute('height') &&
							!t.domNode.style.height &&
							target !== null && !isNaN(target.videoHeight)) {
							t.setPlayerSize(target.videoWidth, target.videoHeight);
							t.setControlsSize();
							t.media.setSize(target.videoWidth, target.videoHeight);
						}
					});
				}
			}

			// EVENTS

			// FOCUS: when a video starts playing, it takes focus from other players (possibly pausing them)
			t.media.addEventListener('play', () => {
				t.hasFocus = true;

				// go through all other players
				for (const playerIndex in mejs.players) {
					if (mejs.players.hasOwnProperty(playerIndex)) {
						const p = mejs.players[playerIndex];

						if (p.id !== t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended && p.options.ignorePauseOtherPlayersOption !== true) {
							p.pause();
							p.hasFocus = false;
						}
					}
				}

				// check for autoplay
				if (!(IS_ANDROID || IS_IOS) && !t.options.alwaysShowControls && t.isVideo) {
					t.hideControls();
				}
			});

			// ended for all
			t.media.addEventListener('ended', () => {
				if (t.options.autoRewind) {
					try {
						t.setCurrentTime(0);
						// Fixing an Android stock browser bug, where "seeked" isn't fired correctly after
						// ending the video and jumping to the beginning
						setTimeout(() => {
							const loadingElement = t.getElement(t.container).querySelector(`.${t.options.classPrefix}overlay-loading`);
							if (loadingElement && loadingElement.parentNode) {
								loadingElement.parentNode.style.display = 'none';
							}
						}, 20);
					} catch (exp) {
						console.log(exp);
					}
				}

				t.pause()

				if (t.setProgressRail) {
					t.setProgressRail();
				}
				if (t.setCurrentRail) {
					t.setCurrentRail();
				}

				if (t.options.loop) {
					t.play();
				} else if (!t.options.alwaysShowControls && t.controlsEnabled) {
					t.showControls();
				}
			});

			// resize on the first play
			t.media.addEventListener('loadedmetadata', () => {

				calculateTimeFormat(t.getDuration(), t.options, t.options.framesPerSecond || 25);

				if (t.updateDuration) {
					t.updateDuration();
				}
				if (t.updateCurrent) {
					t.updateCurrent();
				}

				if (!t.isFullScreen) {
					t.setPlayerSize(t.width, t.height);
					t.setControlsSize();
				}
			});

			// Only change the time format when necessary
			let duration = null;
			t.media.addEventListener('timeupdate', () => {
				if (!isNaN(t.getDuration()) && duration !== t.getDuration()) {
					duration = t.getDuration();
					calculateTimeFormat(duration, t.options, t.options.framesPerSecond || 25);

					// make sure to fill in and resize the controls (e.g., 00:00 => 01:13:15
					if (t.updateDuration) {
						t.updateDuration();
					}
					if (t.updateCurrent) {
						t.updateCurrent();
					}

					t.setControlsSize();
				}
			});

			if (t.options.enableKeyboard) {
				t.getElement(t.container).addEventListener('keydown', function (e) {
					const keyCode = e.keyCode || e.which || 0;
					// On Enter, play media
					if (e.target === t.container && keyCode === 13) {
						if (t.paused) {
							t.play();
						} else {
							t.pause();
						}
					}
				})
			}

			// Disable focus outline to improve look-and-feel for regular users
			t.getElement(t.container).addEventListener('click', function (e) {
				dom.addClass(e.currentTarget, `${t.options.classPrefix}container-keyboard-inactive`);
			});

			// Enable focus outline for Accessibility purposes
			t.getElement(t.container).addEventListener('focusin', function (e) {
				dom.removeClass(e.currentTarget, `${t.options.classPrefix}container-keyboard-inactive`);
				if (t.isVideo && !IS_ANDROID && !IS_IOS && t.controlsEnabled && !t.options.alwaysShowControls) {
					t.killControlsTimer('enter');
					t.showControls();
					t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
				}
			});

			t.getElement(t.container).addEventListener('focusout', (e) => {
				setTimeout(() => {
					//FF is working on supporting focusout https://bugzilla.mozilla.org/show_bug.cgi?id=687787
					if (e.relatedTarget) {
						if (t.keyboardAction && !e.relatedTarget.closest(`.${t.options.classPrefix}container`)) {
							t.keyboardAction = false;
							if (t.isVideo && !t.options.alwaysShowControls && !t.paused) {
								t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
							}
						}
					}
				}, 0);
			});

			// webkit has trouble doing this without a delay
			setTimeout(() => {
				t.setPlayerSize(t.width, t.height);
				t.setControlsSize();
			}, 0);

			t.globalResizeCallback = () => {
				// don't resize for fullscreen mode
				if (!(t.isFullScreen || (HAS_TRUE_NATIVE_FULLSCREEN && document.webkitIsFullScreen))) {
					t.setPlayerSize(t.width, t.height);
				}

				// always adjust controls
				t.setControlsSize();
			};

			// adjust controls whenever window sizes (used to be in fullscreen only)
			t.globalBind('resize', t.globalResizeCallback);
		}

		// force autoplay for HTML5
		if (autoplay && isNative) {
			t.play();
		}

		if (t.options.success) {
			if (typeof t.options.success === 'string') {
				window[t.options.success](t.media, t.domNode, t);
			} else {
				t.options.success(t.media, t.domNode, t);
			}
		}
	}
Set up all controls and events

@param media
@param domNode
@private