Lines Matching refs:parameters
116 $parameters = $this->getParameters($match);
117 $embed_type = $this->getEmbedType($parameters);
118 $parameters['type'] = $embed_type;
124 … $validated_parameters = $this->parseYouTubeVideoString($parameters);
130 … $validated_parameters = $this->parseYouTubePlaylistString($parameters);
139 $validated_parameters = $this->parseFusionString($parameters);
144 $validated_parameters = $this->parseOtherEmbedString($parameters);
232 private function renderJSON(string $request, array $parameters): string { argument
233 $parameters['disclaimer'] = DEFAULT_PRIVACY_DISCLAIMER;
234 $parameters['request'] = $request;
235 $type = $parameters['type'];
237 $parameters['size'] = $this->getEmbedSize($parameters);
239 $parameters['size'] = '';
242 if($parameters['embed-position'] == "centre") {
244 } else if($parameters['embed-position'] == 'right') {
246 } else if($parameters['embed-position'] == "left") {
254 $parameters['url'],
255 $parameters['autoplay'],
256 $parameters['loop'],
257 $parameters['mute'],
258 $parameters['controls'],
259 $parameters['embed-position']
262 …if(key_exists($parameters['domain'], DISCLAIMERS)) { //if there is a unique disclaimer for the dom…
263 if(!empty(DISCLAIMERS[$parameters['domain']])) {
264 $parameters['disclaimer'] = DISCLAIMERS[$parameters['domain']];
267 $dataJSON = json_encode(array_map("utf8_encode", $parameters));
268 …return '<div class="' . $position . ' externalembed_embed externalembed_TOS ' . $parameters['size'…
277 private function getEmbedSize(&$parameters): string { argument
278 switch($parameters['height']) {
280 $parameters['width'] = '640';
283 $parameters['width'] = '854';
286 $parameters['width'] = '1280';
289 $parameters['width'] = '1920';
308 private function getEmbedType(&$parameters): string { argument
309 if(key_exists('url', $parameters) === false) {
312 …$parameters['domain'] = $this->validateDomain($parameters['url']); //validate and return the domai…
316 if($parameters['domain'] === 'youtube.com' || $parameters['domain'] === 'youtu.be') {
318 if(strpos($parameters['url'], 'playlist?list=') !== false) {
320 …} else if((strpos($parameters['url'], '/watch') || strpos($parameters['url'], 'youtu.be/')) !== fa…
326 if($parameters['domain'] === 'inventopia.autodesk360.com') {
381 private function parseYouTubeVideoString($parameters): array { argument
386 if(preg_match($regex, $parameters['url'], $match)) {
387 $parameters['video_id'] = $match[5];
392 return $this->checkParameters($parameters, $video_parameter_types, $video_parameter_values);
402 private function parseYouTubePlaylistString($parameters): array { argument
407 if(preg_match($regex, $parameters['url'], $matches)) {
408 $parameters['playlist_id'] = $matches[2]; //set the playlist id
410 … return $this->checkParameters($parameters, $playlist_parameter_types, $playlist_parameter_values);
420 private function parseFusionString($parameters): array { argument
424 … return $this->checkParameters($parameters, $fusion_parameter_types, $fusion_parameter_values);
434 private function parseOtherEmbedString($parameters): array { argument
438 return $this->checkParameters($parameters, $other_parameter_types, $other_parameter_values);
515 private function getVideoRequest($parameters): string { argument
516 if($parameters['autoplay'] === 'true') {
522 if($parameters['mute'] === 'true') {
528 if($parameters['loop'] === 'true') {
534 if($parameters['controls'] === 'true') {