protected function Vimeo::getTimeIndex in Video Embed Field 8
Same name and namespace in other branches
- 8.2 src/Plugin/video_embed_field/Provider/Vimeo.php \Drupal\video_embed_field\Plugin\video_embed_field\Provider\Vimeo::getTimeIndex()
Get the time index from the URL.
Return value
string|FALSE A time index parameter to pass to the frame or FALSE if none is found.
1 call to Vimeo::getTimeIndex()
- Vimeo::renderEmbedCode in src/
Plugin/ video_embed_field/ Provider/ Vimeo.php - Render embed code.
File
- src/
Plugin/ video_embed_field/ Provider/ Vimeo.php, line 72
Class
- Vimeo
- A Vimeo provider plugin.
Namespace
Drupal\video_embed_field\Plugin\video_embed_field\ProviderCode
protected function getTimeIndex() {
preg_match('/\\#t=(?<time_index>(\\d+)s)$/', $this->input, $matches);
return isset($matches['time_index']) ? $matches['time_index'] : FALSE;
}