Youtube Component

Forum to discuss the new web client version of Servoy.

Youtube Component

Postby Gordon McLean » Mon Mar 02, 2020 5:59 pm

Hi
I am getting the following error using the Embedded YouTube component. This is surprising as its a public facing youtube website

https://www.youtube.com/watch?v=7b6_3BL8jNA

Error:
Refused to display 'https://www.youtube.com/watch?v=7b6_3BL8jNA&feature=youtu.be&modestbranding=1&autoplay=1' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Any ideas on how to fix this would be appreciated as it has previously worked with the same video ??

best
Gordon
Gordon McLean
Clickdigital.com
Gordon McLean
 
Posts: 253
Joined: Wed Aug 03, 2005 12:24 pm
Location: UK

Re: Youtube Component

Postby ROCLASI » Tue Mar 03, 2020 12:01 pm

Hi Gordon,

Do you see this with different browsers?
Also you said it worked before, what changed? Did you update/upgrade Servoy? What version did it work with and which didn't ?
Also the IFRAME tag has a 'sandbox' (HTML5) option, when you use the inspect element option in your browser do you see this 'sandbox' option in the IFRAME tag?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Youtube Component

Postby Gordon McLean » Tue Mar 03, 2020 12:36 pm

ROCLASI wrote:Do you see this with different browsers?


In Safari and Firefox is fails to nothing showing, however in Chrome you get a grey box with a sad face and on rollover a message Youtube refused to connect.

The error in the console is "Refused to display 'https://www.youtube.com/watch?v=7b6_3BL8jNA&feature=youtu.be&modestbranding=1&autoplay=1' in a frame because it set 'X-Frame-Options' to 'sameorigin'."

ROCLASI wrote:Also you said it worked before, what changed? Did you update/upgrade Servoy? What version did it work with and which didn't ?

Before I started the latest version of this project I tested a number of features, video and signature being specifics. These were done on 8.4.0, I am now on 2019.12.1.3543, however I did a small test yesterday and the video also failed on 8.4. As fas as I am aware nothing other than Servoy updates have changed and the basic issue is I cant get this component to work. This may well by my fault, I have followed the wiki instructions and placed a URL into the relevant property, also used a button click event to do the same both have failed with the same message.

ROCLASI wrote:Also the IFRAME tag has a 'sandbox' (HTML5) option, when you use the inspect element option in your browser do you see this 'sandbox' option in the IFRAME tag?


I am not seeing "sandbox" !
Code: Select all
<iframe ng-if="!svyServoyapi.isInDesigner()" width="426" height="240" ng-class="model.styleClass" sablo-tabseq="model.tabSeq" id="cd1bc507c5e1164d0d4762e4b8e6e538" ng-src="https://youtu.be/7b6_3BL8jNA?modestbranding=1&amp;autoplay=1" allowfullscreen="" class="ng-scope youtubevideoembedder" tabindex="1" src="https://youtu.be/7b6_3BL8jNA?modestbranding=1&amp;autoplay=1"></iframe>


What would be super helpful is to know the component is working for anyone else and what version of Servoy they are on so that I can narrow down the issue.

best
Gordon
Gordon McLean
Clickdigital.com
Gordon McLean
 
Posts: 253
Joined: Wed Aug 03, 2005 12:24 pm
Location: UK

Re: Youtube Component

Postby Gordon McLean » Wed Mar 04, 2020 9:21 am

It transpires the issue here is the URL provided by YouTube needs to be amended to replace "/watch?v=" with /embed/

This fails for me with the error below:
https://www.youtube.com/watch?v=Y72ZRtiwppo

Code: Select all
The error in the console is "Refused to display 'https://www.youtube.com/watch?v=7b6_3BL8jNA&feature=youtu.be&modestbranding=1&autoplay=1' in a frame because it set 'X-Frame-Options' to 'sameorigin'."


The version here works
https://www.youtube.com/embed/Y72ZRtiwppo
Gordon McLean
Clickdigital.com
Gordon McLean
 
Posts: 253
Joined: Wed Aug 03, 2005 12:24 pm
Location: UK


Return to Servoy NGClient

Who is online

Users browsing this forum: Google [Bot] and 10 guests

cron