Firemonkey: How can I disable the scroll of a TWebBrowser? - delphi

I want to show a video from youtube in my form, so I put a TWebBrowser and linked to a youtube video, the video shows fine but the user can scroll the webBrowser. How can I block this function? I found nothing on the Object Inspector.
edit: I found this code: WebBrowser1.OleObject.document.body.Scroll := 'no'; but looks like this is for desktop projects, not mobile... or I'm missing some Units on uses?

Related

Delphi webbrowser videostream and disable webbroswer clicking

Im working on a project where I need to stream a television Channel and at the same time increment some variables by pressing keys.
With the webbrowser I cant press those keys because the project is focusing the browser and not the form and I dunno how to disable it.
I would also like to know how to disable the scrollbars on TwebBrowser, i've tried many codes but none worked.

Embedded YT on mobile: autohide=0&controls=1 but controls invisible

When embedding a video with autohide=0 and controls=1 (which is default anyway), one would assume the controls are always visible.
This is however not the case when looking at an embedded video on Android or iOS, where the exact same embed code yields a player without "always-on" controls (e.g. before clicking "play").
I've created a small demo which indeed has YT display the controls when viewed on desktop, but not when viewed on iOS or Android.
My questions:
Is this a bug (and if so; is a solution in the works)?
Is there another way to force the controls to be visible on mobile?
iOS Safari supports HTML5 video (it uses Quicktime to render it). Behind the scenes, the YouTube API is creating an HTML5 video element inside its iframe. There is no HTML5 attribute that specifies whether or not to keep the controls visible, therefore YouTube cannot make the controls stay visible on the iOS.
Unfortunately, at this time, I think the only solution is to build your controls and use the javascript DOM API to control the video.

Delphi webbrowser clone video include frame size

I dont know how to explain this, but here it goes.
Have you seen a delphi code that uses twebbrowser and displays only the frame(height and width) of the video?
I meant if I browsed in youtube the small window of the twebbrowser will resize itself to the size of the video of youtube video.
Even to the other websites that has a video, the twebbrowser automate to resize itself like the video size of the website.
i hope you've seen a code like that one,
thanks
I've seen something similar. If you use Adobe Flash to play the video, you could use Navigate to a URL directly to the .swf file and this would show the file sized to the size of your TWebBrowser component. If you also add what is needed to suppress the border of the TWebBrowser component, it might result in what you're looking for.

Youtube Video Player Fullscreen click event

I am trying to add custom controls to an embeded YouTube player. I am overlaying a html menu. However, when a user clicks on the full screen button within YouTube my html menu will no longer be available on the larger player.
There are two possible solutions I foresee.
First, if I could figure out the element that is generated for the fullscreen player then I could overlay controls on this.
Second, if I could grab the fullscreen click event I could use javascript to get the current available window demenisions an scale the video to the available realestate.
I found this: https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode?redirectlocale=en-US&redirectslug=DOM%2FUsing_full-screen_mode
However, I am not sure if it would work in most browsers and second it looks like it is in the test phase.
The answers I am looking for are:
What is the element or how can I find the element that is generated for the fullscreen player?
Or
How can I capture the click event for fullscreen?
Do you want to capture the click anywhere on the screen or on a link in a menu?
If you want to capture the click on a link on a menu I think this plugin can be useful as an example:
http://www.seanmccambridge.com/tubular/
https://code.google.com/p/jquery-tubular/source/browse/trunk/js/jquery.tubular.1.0.js

Youtube player can't be covered by any HTML element

I have a website which contains youtube flash player. Player's code was copied from Youtube and pasted to an HTML of my page.
When I'm opening the page in iPhone or iPad, the player can't be covered by absolute positioned DIV tag. The div tag has z-index 1000 and covers all elements (youtube flash player too) on the page if I use normal PC. But in iPhone or iPad I can't cover youtube player by this div element.
I used many tricks with OBJECT and EMBED tags of flash element (adding style="position:absolute; z-index:0" and etc.) but no results.
Please assist how can I cover Flash element in iPhone or iPad.
please use an iframe. That's the way I've done it.
I found that on the iphone there are certain things that dont work but will work on a pc. I believe however Iframes are quite versatile with stuff.
Try it out. Let me know if it works.
You just had to add ?wmode=transparent at the end of the url of the youtube embed code to fix the problem.
It should work!

Resources