diff --git a/src/Adapters/Vimeo.php b/src/Adapters/Vimeo.php new file mode 100644 index 0000000..20908e0 --- /dev/null +++ b/src/Adapters/Vimeo.php @@ -0,0 +1,38 @@ +isValid([200, 403]) && $request->match([ + 'https?://*.vimeo.com*', + 'https?://vimeo.com*', + ]); + } + + /** + * @inheritDoc + */ + protected function run() { + if ($this->request->getHttpCode() === 403) { + $this->addProvider('oembed', new Providers\OEmbed()); + + return; + } + + parent::run(); + } + +} diff --git a/src/Providers/OEmbed/Vimeo.php b/src/Providers/OEmbed/Vimeo.php new file mode 100644 index 0000000..1a03bf8 --- /dev/null +++ b/src/Providers/OEmbed/Vimeo.php @@ -0,0 +1,33 @@ + $url->withScheme('http')->getUrl()]; + } +}