Open video page at Youtube in full screen mode programmatically - javascript

I built a WPF application that attempts to navigate to a URL in Youtube that contains a video. I want the video to be played in full screen mode when opened as if the user manually clicked the full screen mode button. I know that such things can be done using Javascript. Can someone show me the way how to do it in a WPF application using Visual Studio? Or is there another way to do this?
Appreciate it.

You can change the URL to an embedded one, just parse the video id from URL and
use the following format, still not full screen though.
"https://www.youtube.com/embed/{0}?autoplay=1"
Ex:
https://www.youtube.com/embed/UkWd0azv3fQ?autoplay=1

Related

HTML & Js make video url open in default device video player app

I'm creating a mediaplayer website where I can play my uploaded videos.
I'd like to add a button where an user can click and the devices asks with which app play the video.
I tried something like that:
window.open("video.mkv", '_blank');
But the browser on my android device just download the video without reading the file as a playable video with an external player.
Is this something related to the browser or I can give a hint to the browser on how to open the file?
I think that if the click on the link directly downloads the file is because the device hasn't any app that has explicitly told the system that it can manage that kind of content.
Or if you use a regular link <a>...</a> instead of a window.open you can add some mime/type information to the link, it maybe helps...
Or keep the window.open and add some extra information as defined here: https://developer.mozilla.org/en-US/docs/Web/API/Window/open

hide html attribute in inspection browsers

i want to create a video learning site.
I want people can't get to download my videos.
how to hide element attribute in inspection browsers because people can't get the video URL in inspection browsers
how to disable download button in video element
You can't hide a HTML element from the browser. You could create a seperate website which host the video's but doesn't show the real link to the video (proxy website) and only allow the ip-address of the "front-end" website to access those videos.
It's simply not possible. It will be visible in the HTML source code anyways. Only server-side code won't appear in the page's source on client-side.
Sidenote: Even if you could hide the video tag or the video's URL in the source, the browser should download the video itself which can be found in Chrome (or other browser's) Developer Console.

Can I record my screen/webpage by clicking a button from that html file?

I want to add a screen recorder to my html webpage. So i.e. I will have a button and by clicking on that button, to start recording my screen. I know there is such a tool in HTML5 and a JS framework, but I am wondering if it is possible in HTML4. Any suggestions, links are welcome.
There is no tool for that even in HTML5. You may start a external Application like here

GoogleChrome-fullscreen issue

I tried with different options for automatically making a page full screen using javascript
I tried with the window.open("index.html","","fullscreen=yes,location=no, cursor=none");
I tried with the Native FullScreen JavaScript API- It only works on a button click or any other events , but I need to make the page automatically open on fullscreen.
...I need to make the page automatically open on fullscreen
You can't, and for good reason. That's why the fullscreen API (and window.open, typically) only works in response to a user event. It's by design to prevent web pages from hijacking the user's workspace.

Trigger click on embedded PDF

I have a PDF embedded in a web page using the following code:
<object id="pdfviewer" data='test_full.pdf#page=1&toolbar=0&statusbar=0&messages=0&navpanes=0'
type='application/pdf'
width='500px'
height='350px'>
The PDF itself is set to open in full screen mode which shows no controls. The user can advance the slides by clicking on the view.
What I'd like to have is some way to trigger that click so that I can advance 2 similar PDF:s side-by-side (one for the actual slideshow and one for the speaker notes). Is this possible to do in javascript and/or jQuery? I have tried using the click()-method but it doesn't get through to the embedded PDF.
Update: Can't find any info on it, so I guess I'm out of luck and have to try a workaround. Am currently juggling 3 embeds of the same pdf (current page, next page and previous page), hiding and showing them and loading more pages as the user clicks around.
I doubt it. Allowing web page scripts to pass input events to the PDF viewer could be a security risk (since the viewer generally has access to system file dialogues via things like Save As).

Categories