private function getMediaType($metainfo) {
        if (
            $metainfo['audio'] != false &&
            (
                $metainfo['video'] == false ||
                $metainfo['video']['codec_name'] == 'png' ||
                $metainfo['video']['codec_name'] == 'jpg'
            )
        ) {
            return $this::MEDIA_TYPE_AUDIO;
        }

        if ($metainfo['video'] != false && $metainfo['audio'] == false) {
            return $this::MEDIA_TYPE_VIDEO_ONLY;
        }

        if ($metainfo['video'] != false && $metainfo['audio'] != false) {
            return $this::MEDIA_TYPE_VIDEO;
        }
        return $this::MEDIA_TYPE_UNKNOWN;
    }