Hi there,
I’m facing one issue I’m using video player field in my custom module but it is not picking up if we are specifying custom width and height. Please check the code:
<div class=“main_video_box” id=“full_width_v4” style=“{{ module.style.backgroundimage_field.css }}; background-color:{{ module.style.background_color.css}}; {{ module.style.spacing_field.css }}”>
<div class=“container” style=“”>
<div class=“main_video” >
<h4 class=“text text–2 text–bold”>
{{ module.sub_text }}
</h4>
<h3 class=“text text–61 text–bold” style=“font-family: PublicoHeadline-Roman,Georgia,serif;”>
{{ module.main_heading_text }}
</h3>
{% if module.embed_code_ == ‘embed’ %}
{{ module.embed_code_ }}
{% else %}
{% if module.videoplayer_field.player_id %}
{% set max_width = module.videoplayer_field.size_type == ‘auto_custom_max’ ? module.videoplayer_field.max_width : module.videoplayer_field.width %}
{% set max_height = module.videoplayer_field.size_type == ‘auto_custom_max’ ? module.videoplayer_field.max_height : module.videoplayer_field.height %}
<div class=“test_video” style=“max-width: {{ max_width }}px; max-height: {{ max_height }}px;margin:0px auto;”>
{% video_player “embed_player”
player_id={{ module.videoplayer_field.player_id }}
type={{ module.videoplayer_field.player_type || ‘scriptV4’ }}
full_width={{ module.videoplayer_field.size_type == ‘auto_full_width’ }},
conversion_asset={{ module.videoplayer_field.conversion_asset|tojson|safe }}
autoplay={{ module.videoplayer_field.autoplay }}
hidden_controls={{ module.videoplayer_field.hide_controls }}
loop={{ module.videoplayer_field.loop_video }}
muted={{ module.videoplayer_field.mute_by_default }}
%}
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
Also, note that I’m using a radio box to provide the option to the user to select either embed code or video from HubSpot.
Thanks a lot for the help.