Text Field: allowscreen parameter is stripped off from the youtube iframe script

  • Benflips
    Asked on January 10, 2017 at 7:15 AM
    The only problem is that this html seems to disable the Full Screen button.
    Do you know how I could remedy this?
  • omerorkun JotForm Data Scientist
    Replied on January 10, 2017 at 8:32 AM

    Hi Ben,

    On the embed code of your video full screen is actually set to be allowed: 

    <iframe width="560" height="315" src="https://www.youtube.com/embed/Sk2FTx6szMM" frameborder="0" allowfullscreen></iframe>

    However, the full screen button being disabled may have been caused by your browser settings. Please see this guide:

    https://support.google.com/youtube/answer/6276924

    Actually, I have a better suggestion for you since embedding with HTML tool looks problematic on full screen mode. I suggest you to use YouTube embed widget again. But this time with an addition on the URL of your video on YouTube:

    Since you do not want the related videos to be shown when the video ends you should use this URL:

    ?rel=0

    The part that I highlighted with yellow on the URL will make the related videos disabled for your video. Please copy this URL into the widget and see how it goes. It seems OK on my end. Full screen will also be enabled so all your troubles with YouTube embed will be gone with this method. 

    Do contact us again if you need any further assistance. 

  • Benflips
    Replied on January 10, 2017 at 5:26 PM

    Hi. I input that code, and at the end of the vid there are still suggested videos. Not the same ones as used to come up, but 4 videos nonetheless.

    Also, it seems to have removed the wizard so I can't get back to the URL. Not sure why that is the case.

    If we do find a workaround to this (and are still using the YouTube widget)...can you also tell me how to centre the label above the video screen? Currently it is set to TOP which is of course aligned to the left margin.

    I will look at the browser settings above for the text box workaround and see if my browser settings are at fault...

  • Benflips
    Replied on January 10, 2017 at 6:15 PM

    Hi.

    I had actually looked at that help screen prior to sending you my question.

    I am currently using chrome as my primary browser. I look at the settings page in there and there is no obvious setting for you-tube or full-screen applications (the advice at the link you sent me was primarily for firefox).

    I also looked at my extensions and there is nothing there that would interrupt or cause this problem (that I can see).

    At the bottom of the help page you directed me to it says something along the lines of "The app developmer may have disabled full-screen"...is there any chance that putting the HTML into a text box as you have suggested has this limitation?

    Does full-screen work for you on my form in a different browser? 

  • Kiran Support Team Lead
    Replied on January 10, 2017 at 11:31 PM

    It seems that the allowscreen parameter is stripped off from the code and hence the fullscreen function is disabled. As I tried to embed the script on a normal HTML webpage, it worked fine. Some of the parameters are not allowed with the code injected to Text field due to security reasons which may be the case allowscreen is disabled.

    Can you also tell me how to centre the label above the video screen? Currently it is set to TOP which is of course aligned to the left margin.

    This question is moved to a separate thread and shall be addressed there shortly.

    https://www.jotform.com/answers/1031298

     

    Thank you! 

  • Kiran Support Team Lead
    Replied on January 11, 2017 at 12:00 AM

    I am also forwarding the issue to our backend team to take a look. If we have any update in this regard, you'll be posted here.

    Thank you!