PHP code example of sitegeist / media-components

1. Go to this page and download the library: Download sitegeist/media-components library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sitegeist / media-components example snippets

html
<fc:picture
    src="{originalImage: {fileUid: 5}, srcset: \'400,800,1200\'}"
    sources="{desktop: {originalImage: {fileUid: 5}, srcset: \'1000, 1200, 1400, 1600, 1800, 2000\'}}"
    width="500"
    height="100"
    maxDimensions="true"
    alt="Alt text"
    title="Title text"
    lazyload="true"
    preload="true"
/>
html
<fc:video
    sources="{0: 7}"
    tracks="{0: 8}"
    width="800"
    height="600"
    autoplay="false"
    controls="true"
    loop="true"
    muted="false"
    poster="{fileUid: 4}"
    preload="metadata"
    fallbackText="Fallback"
    crossorigin="anonymous"
    playsinline="true"
/>