Skip to main content
oEmbed link added.
Source Link
miststudent2011
  • 1.8k
  • 1
  • 13
  • 37

If it supports oEmbedoEmbed you can use OEmbed Source plugin similar to below.

https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/src/Plugin/media/Source/TikTok.php

If it doesn't support oEmbed you can create your own media source plugin extending MediaSourceBase class similar to below.

https://git.drupalcode.org/project/media_entity_slideshow/-/blob/8.x-2.x/src/Plugin/media/Source/Slideshow.php

Edit 1 :

In order to store it as own media type you need to extended oEmbed class and define providers key to provide oEmbed source. All the additional metadata will be handled by oEmbed class.

You can alter the source data by using hook_media_source_info_alter refer https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/media_entity_tiktok.module#L11

If it supports oEmbed you can use OEmbed Source plugin similar to below.

https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/src/Plugin/media/Source/TikTok.php

If it doesn't support oEmbed you can create your own media source plugin extending MediaSourceBase class similar to below.

https://git.drupalcode.org/project/media_entity_slideshow/-/blob/8.x-2.x/src/Plugin/media/Source/Slideshow.php

Edit 1 :

In order to store it as own media type you need to extended oEmbed class and define providers key to provide oEmbed source. All the additional metadata will be handled by oEmbed class.

You can alter the source data by using hook_media_source_info_alter refer https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/media_entity_tiktok.module#L11

If it supports oEmbed you can use OEmbed Source plugin similar to below.

https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/src/Plugin/media/Source/TikTok.php

If it doesn't support oEmbed you can create your own media source plugin extending MediaSourceBase class similar to below.

https://git.drupalcode.org/project/media_entity_slideshow/-/blob/8.x-2.x/src/Plugin/media/Source/Slideshow.php

Edit 1 :

In order to store it as own media type you need to extended oEmbed class and define providers key to provide oEmbed source. All the additional metadata will be handled by oEmbed class.

You can alter the source data by using hook_media_source_info_alter refer https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/media_entity_tiktok.module#L11

added additional data
Source Link
miststudent2011
  • 1.8k
  • 1
  • 13
  • 37

If it supports oEmbed you can use OEmbed Source plugin similar to below.

https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/src/Plugin/media/Source/TikTok.php

If it doesn't support oEmbed you can create your own media source plugin extending MediaSourceBase class similar to below.

https://git.drupalcode.org/project/media_entity_slideshow/-/blob/8.x-2.x/src/Plugin/media/Source/Slideshow.php

Edit 1 :

In order to store it as own media type you need to extended oEmbed class and define providers key to provide oEmbed source. All the additional metadata will be handled by oEmbed class.

You can alter the source data by using hook_media_source_info_alter refer https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/media_entity_tiktok.module#L11

If it supports oEmbed you can use OEmbed Source plugin similar to below.

https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/src/Plugin/media/Source/TikTok.php

If it doesn't support oEmbed you can create your own media source plugin extending MediaSourceBase class similar to below.

https://git.drupalcode.org/project/media_entity_slideshow/-/blob/8.x-2.x/src/Plugin/media/Source/Slideshow.php

If it supports oEmbed you can use OEmbed Source plugin similar to below.

https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/src/Plugin/media/Source/TikTok.php

If it doesn't support oEmbed you can create your own media source plugin extending MediaSourceBase class similar to below.

https://git.drupalcode.org/project/media_entity_slideshow/-/blob/8.x-2.x/src/Plugin/media/Source/Slideshow.php

Edit 1 :

In order to store it as own media type you need to extended oEmbed class and define providers key to provide oEmbed source. All the additional metadata will be handled by oEmbed class.

You can alter the source data by using hook_media_source_info_alter refer https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/media_entity_tiktok.module#L11

Source Link
miststudent2011
  • 1.8k
  • 1
  • 13
  • 37

If it supports oEmbed you can use OEmbed Source plugin similar to below.

https://git.drupalcode.org/sandbox/Bhanu951-3225164/-/blob/1.x/src/Plugin/media/Source/TikTok.php

If it doesn't support oEmbed you can create your own media source plugin extending MediaSourceBase class similar to below.

https://git.drupalcode.org/project/media_entity_slideshow/-/blob/8.x-2.x/src/Plugin/media/Source/Slideshow.php