| 1 | package LinkEmbedder::Link::Webex; | ||
| 2 | use Mojo::Base 'LinkEmbedder::Link'; | ||
| 3 | |||
| 4 | has provider_name => 'Webex'; | ||
| 5 | has provider_url => sub { Mojo::URL->new('https://webex.com') }; | ||
| 6 | |||
| 7 | sub learn_p { | ||
| 8 | my $self = shift; | ||
| 9 | my $path = $self->url->path; | ||
| 10 | return $self->SUPER::learn_p unless @$path == 2 and $path->[0] eq 'meet'; | ||
| 11 | |||
| 12 | $self->{iframe_src} = $self->url; | ||
| 13 | $self->type('rich'); | ||
| 14 | $self->title("Join the room $path->[1]"); | ||
| 15 | $self->template([__PACKAGE__, 'webex.html.ep']); | ||
| 16 | |||
| 17 | return Mojo::Promise->new->resolve($self); | ||
| 18 | } | ||
| 19 | |||
| 20 | 1; | ||
| 21 | |||
| 22 | __DATA__ |