掲示板

Youtube video strange behaviuor

thumbnail
7年前 に Borja Blázquez によって更新されました。

Youtube video strange behaviuor

Junior Member 投稿: 30 参加年月日: 13/10/07 最新の投稿
Hi,

I am trying to show a youtube video in a webcontent with certain structure. i found following:

If I set the video url as a field of the structure and then set this url in a freemarker template into a iframe tag, the video is not displaying due to a cross domain problem.

but

if I set the same iframe inside a structure field which is a HTML ckeditor, the video is displayed properly.

Whics is the difference between this behaviour?

thanks in advanced.

Greets.
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Youtube video strange behaviuor

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Borja Blázquez:
If I set the video url as a field of the structure and then set this url in a freemarker template into a iframe tag, the video is not displaying due to a cross domain problem.

but

if I set the same iframe inside a structure field which is a HTML ckeditor, the video is displayed properly.

Whics is the difference between this behaviour?


Did you try "View Source" to compare the two different HTML fragments?
thumbnail
7年前 に Borja Blázquez によって更新されました。

RE: Youtube video strange behaviuor

Junior Member 投稿: 30 参加年月日: 13/10/07 最新の投稿
Hi! Yes i did it.

I found the problem. The url of the video was different. One was the classic youtube url (getting cross domain error) and the other one (which was working) was the embed url for a youtube video.

The difference:

https://www.youtube.com/embed/gGdGFtwCNBE ----------- https://www.youtube.com/watch?v=gGdGFtwCNBE

Thanks anyway!