CMS Development

TMerkel
Contributor

Video Player Conversion asset not showing form

SOLVE

Hi guys, i am not sure why, but the following code does not show my chosen form as a preroll:

(advanced video features turned on)

          {% video_player "embed_player" 
            overrideable=False 
            type={{ module.video.player_type || 'scriptV4' }} 
            full_width={{ module.video.size_type == 'auto_full_width' }} 
            hide_playlist=True 
            viral_sharing=False 
            embed_button=False 
            width='1920', height='1080' 
            player_id={{ item.video }} 
            conversion_asset={"type":"FORM","id":"{{ module.form.form_id }}","position":"PRE"}
            %}

 

Conversion Asset attribute seems not to understand the form_id. Could someone help me with this? 🙂 Thanks!

 

 

0 Upvotes
1 Accepted solution
TMerkel
Solution
Contributor

Video Player Conversion asset not showing form

SOLVE

I just found the solution for the problem. You need to set the variable and parse it as json like the following example:

 

          {% set conversion_assets = {"type":"FORM","id":module.form.form_id,"position":"PRE"} %}
          {% video_player "embed_player" 
            overrideable=False 
            type={{ module.video.player_type || 'scriptV4' }} 
            full_width={{ module.video.size_type == 'auto_full_width' }} 
            hide_playlist=True 
            viral_sharing=False 
            embed_button=False 
            auto_play=True 
            width='1920', height='1080' 
            player_id={{ item.video }} 
            conversion_asset={{ conversion_assets|tojson|safe }}
            %}

 

 

View solution in original post

0 Upvotes
3 Replies 3
TMerkel
Solution
Contributor

Video Player Conversion asset not showing form

SOLVE

I just found the solution for the problem. You need to set the variable and parse it as json like the following example:

 

          {% set conversion_assets = {"type":"FORM","id":module.form.form_id,"position":"PRE"} %}
          {% video_player "embed_player" 
            overrideable=False 
            type={{ module.video.player_type || 'scriptV4' }} 
            full_width={{ module.video.size_type == 'auto_full_width' }} 
            hide_playlist=True 
            viral_sharing=False 
            embed_button=False 
            auto_play=True 
            width='1920', height='1080' 
            player_id={{ item.video }} 
            conversion_asset={{ conversion_assets|tojson|safe }}
            %}

 

 

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Video Player Conversion asset not showing form

SOLVE

Hi, @TMerkel 👋 Thanks for your question. Hey. @Anton @Kevin-C, do you have any tips you can share with @TMerkel?

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

TMerkel
Contributor

Video Player Conversion asset not showing form

SOLVE

Any news here? 🙂 Would be nice to have a solution for this issue. Thanks!

0 Upvotes