thumbnails; $poster = $evideo->thumbnails; $imgw = 1280; $imgh = 720; $autoPlaySources = []; $autoPlayURL = ''; $autoPlayPoster = ''; $autoPlayThumbsSprit = ''; } elseif (!empty($_GET['v'])) { $video = Video::getVideo($_GET['v'], "", true, false, false, true); //$video['id'] = $_GET['v']; } elseif (!empty($_GET['videoName'])) { $video = Video::getVideoFromCleanTitle($_GET['videoName']); } Video::unsetAddView($video['id']); AVideoPlugin::getEmbed($video['id']); if (empty($video)) { forbiddenPage("Video not found"); } if ($video['status']=='i') { forbiddenPage("Video inactive"); } if (empty($video['users_id'])) { $video['users_id'] = User::getId(); } if (empty($customizedAdvanced)) { $customizedAdvanced = AVideoPlugin::getObjectDataIfEnabled('CustomizeAdvanced'); } forbiddenPageIfCannotEmbed($video['id']); $source = []; $img = ''; $imgw = 1280; $imgh = 720; if ($video['type'] !== "pdf") { if (!empty($video['filename'])) { $source = Video::getSourceFile($video['filename']); $poster = $img = $source['url']; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } } if (empty($poster)) { $poster = ''; if (!empty($video['filename'])) { $images = Video::getImageFromFilename($video['filename']); $poster = $images->poster; if (!empty($images->posterPortrait)) { $img = $images->posterPortrait; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } } else { $images = []; $poster = ''; $imgw = 0; $imgh = 0; } if (empty($poster) && !empty($video['filename'])) { if (($video['type'] !== "audio") && ($video['type'] !== "linkAudio")) { $poster = "{$global['webSiteRootURL']}videos/{$video['filename']}.jpg"; } else { $poster = "" . getCDN() . "view/img/audio_wave.jpg"; } } } require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php'; /* * Swap aspect ratio for rotated (vvs) videos if ($video['rotation'] === "90" || $video['rotation'] === "270") { $embedResponsiveClass = "embed-responsive-9by16"; $vjsClass = "vjs-9-16"; } else { $embedResponsiveClass = "embed-responsive-16by9"; $vjsClass = "vjs-16-9"; } */ $vjsClass = ''; $obj = new Video("", "", $video['id']); $resp = $obj->addView(); //https://.../vEmbed/527?modestbranding=1&showinfo=0&autoplay=1&controls=0&loop=1&mute=1&t=0 $modestbranding = false; $autoplay = false; $controls = "controls"; $showOnlyBasicControls = false; $loop = ''; $mute = ''; $objectFit = ''; $t = 0; if (isset($_GET['modestbranding']) && $_GET['modestbranding'] == "1") { $modestbranding = true; } if (!empty($_GET['autoplay']) || $config->getAutoplay()) { $autoplay = true; } if (isset($_GET['controls'])) { if ($_GET['controls'] == "0") { $controls = ''; } elseif ($_GET['controls'] == "-1") { $showOnlyBasicControls = true; } elseif ($_GET['controls'] == "-2") { $showOnlyBasicControls = true; $hideProgressBarAndUnPause = true; } } if (!empty($_GET['loop'])) { $loop = "loop"; } if (!empty($_GET['mute'])) { $mute = 'muted="muted"'; } if (!empty($_GET['objectFit']) && (intval($_GET['objectFit']) == 1 || $_GET['objectFit'] == 'true')) { $objectFit = 'object-fit: ' . $_GET['objectFit']; } if (!empty($_GET['t'])) { $t = intval($_GET['t']); } elseif (!empty($video['progress']['lastVideoTime'])) { $t = intval($video['progress']['lastVideoTime']); } elseif (!empty($video['externalOptions']->videoStartSeconds)) { $t = parseDurationToSeconds($video['externalOptions']->videoStartSeconds); } $playerSkinsO = AVideoPlugin::getObjectData("PlayerSkins"); $disableEmbedTopInfo = $playerSkinsO->disableEmbedTopInfo; if (isset($_REQUEST['showinfo']) && empty($_REQUEST['showinfo'])) { $disableEmbedTopInfo = true; $modestbranding = true; } $url = Video::getLink($video['id'], $video['clean_title'], false); $title = str_replace('"', '', $video['title']) . ' - ' . $config->getWebSiteTitle(); $photo = User::getPhoto($video['users_id']); if (empty($currentTime)) { $currentTime = 0; } if (User::hasBlockedUser($video['users_id'])) { $disableEmbedTopInfo = true; $video['type'] = "blockedUser"; } ?>