How does a flash video player become full screen - javascript

I'd like to create a little chrome extension which plays subtitles over full-screened videos.
However, I'm not sure how to have chrome developer tools open while a flash video is fullscreened (so that I can see what's happening in the DOM), or even whether flash full screen somehow bypasses the DOM entirely.
Answers to either question (as to using developer tools, or how fullscreen interacts with the DOM) will be greatly appreciated.

Flash Player's native fullscreen happens separate from the DOM. Flash Player actually creates a new application window that is the size of your monitor. As for getting developer tools open during this, a second monitor may help, but the fullscreen Flash Player window might close itself if it is not the active Window.
It is conceivable that the Flash Player is being fullscreened by a fullscreen DOM element, but this is unlikely. If it says "Press esc to exit full screen" then it is fullscreened through Flash PLayer's native fullscreen.
Unfortunately, unless the SWF is being fullscreened with a fullscreen DOM element, I can't think of a way to add subtitles over the fullscreen player, using the DOM.

Related

Microphone access on Safari / MacOs when window is in the background

Since the last two major updates on Mac (BigSur, Monterey) i'm having this issue where Safari microhone capture via getUserMedia does only work when the Safari window is visible on the screen (1px is sufficient). Whenever Safari is moved to the background the microphone stops transmitting sound, as if it was muted by a hardware button. For the web-application this is not transparent afaik.
Is there a setting or even a documentation or blog post for this? I wasn't able to find any info on how or why this is happening (even though i can imagine why).
This behaviour is especially inconvenient for multi user web-apps using webrtc, where microphone input can be used together with screen sharing (getDisplayMedia). Users usually assume that they can be heared when sharing their entire screen, even if safari is not in the foreground / visible. It feels inconsistent to on the one hand allow screen sharing when the safari window is not visible, but on the other hand block microphone transmission.
I would be grateful for information on why this is happening and if there is a plan from apple to change this in the future.
It seems that this is actually a bug in audio context and has nothing to do with getUserMedia. In my case the microphone stream was processed through an audio context. The bug causes audio contexts to be halted, when the Safari window is moved to the background.
Here is the link to the bugtracker:
https://bugs.webkit.org/show_bug.cgi?id=231105

Javascript - fullscreen API issue webkit browsers

I have a script where I can toggle a fixed DIV in FullScreen mode. This div can also contains an HTML5 video which allows fullscreen (a video in a lightbox for example). However, in webkit browsers it creates a big conflict if the div goes in fullscreen and the div is also in fullscreen.
When the fullscreen mode is exited from the video player and the div, the layout is completely destroy because webkit browser still think that we are in FullScreen mode... In fact when everything is not in FullScreen, the user user agent stylesheet for the HTML5 video (:-webkit-full-screen-ancestor:not(iframe)) is still present and even with !important rules it doesn't change anything.
Does anyone have a solution about this issue? Is there some workarounds or maybe a way to turn off fullscreen from the DIV before the video goes in fullscreen...
Here a small example (the video styles are not preserved when turn off fullscreen): https://fiddle.jshell.net/VbfPC/4/
It's working fine in IE, FireFox but not in Google Chrome and Safari.

Prevent YouTube Embedded Player from Fullscreening

Since the YouTube API has no means of programmatically triggering fullscreen (apparently for good reasons, relating to legacy Flash support, as described here), I'm getting by just by using the HTML5 Element.requestFullscreen API to fullscreen the player IFrame.
Unfortunately, if a user triggers fullscreen in the YouTube player, then the player itself goes fullscreen instead of the IFrame, and doesn't produce any events to signal that it has done so. That breaks my UI and causes other synchronization problems when the rest of the application doesn't know what things are and are not fullscreen anymore. A partial solution is to use the chromeless player and then render my own player controls, so that users can't click the YouTube fullscreen button- but, it turns out that double clicking on a YouTube video will also cause it to enter fullscreen mode, again with no way of signalling the rest of the application that it has done so.
So, is there any consistent way of preventing an embedded YouTube player from going fullscreen under any circumstances, without impacting other functionality?
The best solution I have so far is to set pointer-events:none on the iframe. That's not quite perfect, however, as it also makes it impossible to dismiss ad banners displayed over YouTube videos. An ideal solution would block the "fullscreen on double-click" response, without messing up anything else. (Single-click to play, for example, is just fine, because the YouTube player does emit play events that let me keep the rest of the application in-sync.)
When embedding using the iframe tag, you can use the parameter fs = "0" to disable to the fullscreen button. See http://codepen.io/anon/pen/zvOqKJ
There is something weird going on with this. I was unable to prevent fullscreen when I passed in "fs: 0" with the playerVars as per this page
https://developers.google.com/youtube/player_parameters?playerVersion=HTML5
(even though some other player vars were making a difference)
God knows what's wrong, but I fixed it with:
var ourYT = document.getElementById('player');
ourYT.allowFullscreen = false;
Use this;
iframe {pointer-events: none;}
you can disabling click events on youtube player (play,pause,fullscreen);

ShadowBox Js - open videos in fullscreen directly

Is there a way to configure shadowBox to open up videos in fullscreen directly? I want this when you surf on the site with a mobile device instead of a popup.
If you are embeding flash based video players then answer is no.
Since there are security restrictions by which you can not call video full screen mode from javascript or from any other place that is outside of flash environment.
But you can make some pseudo full screen by placing your video player in some DIV that has width and height 100% and make some GUI elements and javascript logic to close that DIV on some event like onclick.
In case your video is HTML based, video tag you can call full screen mode from javascript.
More on calling full screen on video tag from javascript can be found here: https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode?redirectlocale=en-US&redirectslug=DOM%2FUsing_full-screen_mode

Is it possible to make an swf object fullscreen with jquery? [duplicate]

I need a link to invoke a flash movie (with javascript) that takes the view to full screen, and show the page content. Exactly as if the user has pressed F11. Is there such flash movie?
Edit
This is different from what the flash player does on Youtube and other video sites in that the flash movie has no content to show and after the page goes fullscreen I want the normal page content to be displayed. The only role of the flash object would be invoking the fullscreen mode.
JavaScript (and therefore Flash) does not have access to activating full-screen mode (and thank god it doesn't!).
The best you can do is measure the user's screen size and open a new window that emulates this layout.
See: How to make the window full screen with Javascript (stretching all over the screen)
No. Flash full screen mode (which can only be triggered with a click) is independent from browser full screen mode (which not all browsers have anyway).

Categories

Resources