diff --git a/README.md b/README.md index 3558486..582ad7c 100644 --- a/README.md +++ b/README.md @@ -260,27 +260,29 @@ or As of version 3.x, EmbedVideo supports embedding video content from the following services: -| Site | Service Name(s) | ID Example | URL Example(s) | -|----------------------------------------------------------|---------------------------------|--------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| -| [Archive.org Videos](https://archive.org/details/movies) | `archiveorg` | electricsheep-flock-244-80000-6 | https://archive.org/details/electricsheep-flock-244-80000-6
https://archive.org/embed/electricsheep-flock-244-80000-6 | -| [Bandcamp](https://bandcamp.com/) | `bandcamp` | 1003592798 | https://emptyhousesmusic.bandcamp.com/album/empty-houses (Click on share/embed, and copy the id after `album=`) | -| [Bilibili](https://www.bilibili.com/) | `bilibili` | BV1Hz4y1k7ae | https://player.bilibili.com/player.html?bvid=1Hz4y1k7ae&page=1 | -| [DailyMotion](https://dailymotion.com/) | `dailymotion` | x1adiiw_archer-waking-up-as-h-jon-benjamin_shortfilms | http://www.dailymotion.com/video/x1adiiw_archer-waking-up-as-h-jon-benjamin_shortfilms | -| [KakaoTV](https://tv.kakao.com/) | `kakaotv` | 301157950 | https://play-tv.kakao.com/embed/player/cliplink/301157950 | -| [Loom](https://www.loom.com/) | `loom` | e5b8c04bca094dd8a5507925ab887002 | https://www.loom.com/share/e5b8c04bca094dd8a5507925ab887002 | -| [NaverTV](https://tv.naver.com/) | `navertv` | 27831593 | https://tv.naver.com/embed/27831593 | -| [Niconico](http://nicovideo.jp/) | `niconico` | sm40807360 | https://embed.nicovideo.jp/watch/sm40807360 | -| SharePoint | `sharepoint` | Not Applicable | https://[SUB].sharepoint.com/sites/[PATH]/_layouts/15/embed.aspx?UniqueId=[ID]&embed=[...] | -| [SoundCloud](http://soundcloud.com/) | `soundcloud` | | https://soundcloud.com/skrillex/skrillex-rick-ross-purple-lamborghini | -| [Spotify](http://spotify.com/) | `spotifyalbum` - Art embed | 3B61kSKTxlY36cYgzvf3cP | https://open.spotify.com/album/3B61kSKTxlY36cYgzvf3cP | -| [Spotify](http://spotify.com/) | `spotifyartist` - Artist embed | 0YC192cP3KPCRWx8zr8MfZ | https://open.spotify.com/artist/0YC192cP3KPCRWx8zr8MfZ | -| [Spotify](http://spotify.com/) | `spotifytrack` - Song embed | 6ZFbXIJkuI1dVNWvzJzown | https://open.spotify.com/track/6ZFbXIJkuI1dVNWvzJzown | -| [Twitch](http://www.twitch.tv) | `twitch` - Live Streams | `twitchvod` - Archived Videos on Demand | twitchplayspokemon | -| [Vimeo](http://www.vimeo.com) | `vimeo` | 105035718 | http://vimeo.com/105035718 | -| [Wistia](http://wistia.com) | `wistia` | 62svuailn2 | https://softwareag-2.wistia.com/medias/62svuailn2 | -| [YouTube](http://www.youtube.com/) | `youtube` - Single Videos | pSsYTj9kCHE | https://www.youtube.com/watch?v=pSsYTj9kCHE | -| [YouTube](http://www.youtube.com/) | `youtubeplaylist` - Playlists | PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP | https://www.youtube.com/embed/?listType=playlist&list=PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP | -| [YouTube](http://www.youtube.com/) | `youtubevideolist` - Video List | pSsYTj9kCHE - urlargs=playlist=pSsYTj9kCHE,pSsYTj9kCHE | https://www.youtube.com/embed/pSsYTj9kCHE?playlist=pSsYTj9kCHE,pSsYTj9kCHE | +| Site | Service Name(s) | ID Example | URL Example(s) | +|----------------------------------------------------------|-------------------------------------|--------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| [Archive.org Videos](https://archive.org/details/movies) | `archiveorg` | electricsheep-flock-244-80000-6 | https://archive.org/details/electricsheep-flock-244-80000-6
https://archive.org/embed/electricsheep-flock-244-80000-6 | +| [Bandcamp](https://bandcamp.com/) | `bandcamp` | 1003592798 | https://emptyhousesmusic.bandcamp.com/album/empty-houses (Click on share/embed, and copy the id after `album=`) | +| [Bilibili](https://www.bilibili.com/) | `bilibili` | BV1Hz4y1k7ae | https://player.bilibili.com/player.html?bvid=1Hz4y1k7ae&page=1 | +| [DailyMotion](https://dailymotion.com/) | `dailymotion` | x1adiiw_archer-waking-up-as-h-jon-benjamin_shortfilms | http://www.dailymotion.com/video/x1adiiw_archer-waking-up-as-h-jon-benjamin_shortfilms | +| [KakaoTV](https://tv.kakao.com/) | `kakaotv` | 301157950 | https://play-tv.kakao.com/embed/player/cliplink/301157950 | +| [Loom](https://www.loom.com/) | `loom` | e5b8c04bca094dd8a5507925ab887002 | https://www.loom.com/share/e5b8c04bca094dd8a5507925ab887002 | +| [NaverTV](https://tv.naver.com/) | `navertv` | 27831593 | https://tv.naver.com/embed/27831593 | +| [Niconico](http://nicovideo.jp/) | `niconico` | sm40807360 | https://embed.nicovideo.jp/watch/sm40807360 | +| SharePoint | `sharepoint` | Not Applicable | https://[SUB].sharepoint.com/sites/[PATH]/_layouts/15/embed.aspx?UniqueId=[ID]&embed=[...] | +| [SoundCloud](http://soundcloud.com/) | `soundcloud` | | https://soundcloud.com/skrillex/skrillex-rick-ross-purple-lamborghini | +| [Spotify](http://spotify.com/) | `spotifyalbum` - Art embed | 3B61kSKTxlY36cYgzvf3cP | https://open.spotify.com/album/3B61kSKTxlY36cYgzvf3cP | +| [Spotify](http://spotify.com/) | `spotifyartist` - Artist embed | 0YC192cP3KPCRWx8zr8MfZ | https://open.spotify.com/artist/0YC192cP3KPCRWx8zr8MfZ | +| [Spotify](http://spotify.com/) | `spotifytrack` - Song embed | 6ZFbXIJkuI1dVNWvzJzown | https://open.spotify.com/track/6ZFbXIJkuI1dVNWvzJzown | +| [Spotify](http://spotify.com/) | `spotifyshow` - Podcasts / Shows | 7AWhoFQ3SIkEc6Yp1aOiIM | https://open.spotify.com/show/7AWhoFQ3SIkEc6Yp1aOiIM | +| [Spotify](http://spotify.com/) | `spotifyepisode` - Podcast episodes | 11mET6sr9ghOJ6mi4lmZmZ | https://open.spotify.com/episode/11mET6sr9ghOJ6mi4lmZmZ | +| [Twitch](http://www.twitch.tv) | `twitch` - Live Streams | `twitchvod` - Archived Videos on Demand | twitchplayspokemon | +| [Vimeo](http://www.vimeo.com) | `vimeo` | 105035718 | http://vimeo.com/105035718 | +| [Wistia](http://wistia.com) | `wistia` | 62svuailn2 | https://softwareag-2.wistia.com/medias/62svuailn2 | +| [YouTube](http://www.youtube.com/) | `youtube` - Single Videos | pSsYTj9kCHE | https://www.youtube.com/watch?v=pSsYTj9kCHE | +| [YouTube](http://www.youtube.com/) | `youtubeplaylist` - Playlists | PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP | https://www.youtube.com/embed/?listType=playlist&list=PLY0KbDiiFYeNgQkjujixr7qD-FS8qecoP | +| [YouTube](http://www.youtube.com/) | `youtubevideolist` - Video List | pSsYTj9kCHE - urlargs=playlist=pSsYTj9kCHE,pSsYTj9kCHE | https://www.youtube.com/embed/pSsYTj9kCHE?playlist=pSsYTj9kCHE,pSsYTj9kCHE | ### New Services New services can be requested by using the following [link](https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo/issues/new?assignees=&labels=enhancement&template=embed-service-request.md&title=Embed+Service+Request%3A+Service+Name) or clicking `New Issue`. diff --git a/includes/EmbedService/EmbedServiceFactory.php b/includes/EmbedService/EmbedServiceFactory.php index 86e865b..56193e5 100644 --- a/includes/EmbedService/EmbedServiceFactory.php +++ b/includes/EmbedService/EmbedServiceFactory.php @@ -7,6 +7,8 @@ use InvalidArgumentException; use MediaWiki\Extension\EmbedVideo\EmbedService\Spotify\SpotifyAlbum; use MediaWiki\Extension\EmbedVideo\EmbedService\Spotify\SpotifyArtist; +use MediaWiki\Extension\EmbedVideo\EmbedService\Spotify\SpotifyEpisode; +use MediaWiki\Extension\EmbedVideo\EmbedService\Spotify\SpotifyShow; use MediaWiki\Extension\EmbedVideo\EmbedService\Spotify\SpotifyTrack; use MediaWiki\Extension\EmbedVideo\EmbedService\Twitch\Twitch; use MediaWiki\Extension\EmbedVideo\EmbedService\Twitch\TwitchClip; @@ -38,6 +40,8 @@ final class EmbedServiceFactory { SoundCloud::class, SpotifyAlbum::class, SpotifyArtist::class, + SpotifyShow::class, + SpotifyEpisode::class, SpotifyTrack::class, Twitch::class, TwitchClip::class, @@ -114,6 +118,14 @@ public static function newFromName( string $serviceName, string $id ): AbstractE case 'spotifytrack': return new SpotifyTrack( $id ); + case 'spotifypodcast': + case 'spotifyshow': + return new SpotifyShow( $id ); + + case 'spotifypodcastepisode': + case 'spotifyepisode': + return new SpotifyEpisode( $id ); + case 'twitch': return new Twitch( $id ); diff --git a/includes/EmbedService/Spotify/SpotifyEpisode.php b/includes/EmbedService/Spotify/SpotifyEpisode.php new file mode 100644 index 0000000..1351491 --- /dev/null +++ b/includes/EmbedService/Spotify/SpotifyEpisode.php @@ -0,0 +1,23 @@ +