Why on my page with youtube video scrolling of my page does not work? |
Why on my page with youtube video scrolling of my page does not work? |
nilovsergey |
Jul 16 2023, 09:23 AM
Post
#1
|
Newbie Group: Members Posts: 10 Joined: 15-July 23 Member No.: 28,988 |
On my page I show youtube video by youtube_key field I got from server :
CODE <iframe src="https://www.youtube.com/embed/{{ $news->youtube_key }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> and opened page show youtube video ok, but when I try to scroll up or down scrolling on my page does not work at all. If I ckick out of video area then scrolling of my page works ok If I ckick inside of video area then scrolling of my page DOES NOT work. If there is a way to make scrolling of my page working always ? |
Darin McGrew |
Jul 16 2023, 07:43 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,366 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
That's the way iframes work. When the focus is on the iframe, the iframe scrolls. When the focus is outside of the iframe, the page scrolls.
|
nilovsergey |
Jul 16 2023, 11:18 PM
Post
#3
|
Newbie Group: Members Posts: 10 Joined: 15-July 23 Member No.: 28,988 |
That's the way iframes work. When the focus is on the iframe, the iframe scrolls. When the focus is outside of the iframe, the page scrolls. Thank you for your feedback! If there is a way to show youtube video without iframe? Maybe some external libraries compatible with jquery 3.6 ? |
Christian J |
Jul 17 2023, 04:30 AM
Post
#4
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
That's the way iframes work. When the focus is on the iframe, the iframe scrolls. But only if the iframe has scrollbars; if it's large enough to contain the framed content, no scrollbars will appear and the whole page should scroll even with the focus on the iframe (unless videos work different from framed pages?). If there is a way to show youtube video without iframe? With the VIDEO element? |
Lo-Fi Version | Time is now: 26th September 2024 - 07:28 AM |