Custom Medias
If you need to add any of your medias to the WebPlayer's, without changing the composition file ... there is a way of adding your elements directly to the carrousel !
Adding Custom Media
- Frameworks
- Native
You can add custom media to the WebPlayer by importing the WebPlayerCustomMedia
component.
It needs to be a child of the WebPlayer
component.
You can then add any media type to the carrousel, such as images, videos, ... simply by adding them as children of the WebPlayerCustomMedia
component.
Properties
index
: specify the position of the custom media in the carrousel. You can use negative values to add the media at the end of the carrousel.thumbnailSrc
: the thumbnail image to display in the gallery
Example
import { WebPlayer, WebPlayerCustomMedia } from "@car-cutter/framework-webplayer";
<WebPlayer ...>
<WebPlayerCustomMedia index={2} thumbnailSrc="...">
<img src="..." />
</WebPlayerCustomMedia>
<WebPlayerCustomMedia index={-1} thumbnailSrc="...">
<img src="..." />
</WebPlayerCustomMedia>
</WebPlayer>
You can add custom media to the WebPlayer by using the cc-webplayer-custom-media
component.
It needs to be a child of the cc-webplayer
component.
You can then add any media type to the carrousel, such as images, videos, ... simply by adding them as children of the cc-webplayer-custom-media
component.
Properties
index
: specify the position of the custom media in the carrousel. You can use negative values to add the media at the end of the carrousel.thumbnail-src
: the thumbnail image to display in the gallery
Example
<cc-webplayer ...>
<cc-webplayer-custom-media index="2" thumbnailSrc="...">
<img src="..." />
</cc-webplayer-custom-media>
<cc-webplayer-custom-media index="-1" thumbnailSrc="...">
<img src="..." />
</cc-webplayer-custom-media>
</cc-webplayer>
You can put as many Custom Medias as you want in the Web Player.
Technically, you can add any HTLM element to the carrousel but keep in mind that it can interfer with the WebPlayer's functionalities.