public static function renderWrapperAttrs(array $embed): string
    {
        // attributes to be rendered
        $classes = array();
        $styles = array();
        // shortcuts
        $d = &$embed['dimension'];
        // determine classes
        $classes[] = 'video-wrapper';
        if ($d->dynamic) {
            $classes[] = 'wrap-'.$d->scale_model;
        }
        // determine inline CSS style(s)
        if ($d->dynamic && ($d->scale_model == 'scale-width-height')) {
            $styles[] = 'padding-bottom: ' . ($d->factor * 100) . '%;';
        }
        // render the attributes
        $class = implode(' ', $classes);
        $style = implode('; ', $styles) . (!empty($styles) ? ';' : '');
        return 'class="'.$class.'" style="'.$style.'"';
    }