New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML5 full-screen API is not implemented #1314
Comments
Please provide your Atom-Shell and OS version. Tobias Thyrrestrup notifications@github.com schrieb am Do., 26. Mär. 2015
|
Atom.app - v0.22.2 Here is my sample index.html: <!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
div {
width:640px;
margin:0px auto;
padding:15px;
}
</style>
<title>Hello World!</title>
</head>
<body>
<div>
<iframe width="640" height="360" src="https://www.youtube.com/embed/dIkHPxeslHQ" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe width="640" height="360" src="https://player.vimeo.com/video/106724185?color=ffffff&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe width="640" height="360" src="https://www.youtube.com/embed/dIkHPxeslHQ" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe width="640" height="360" src="https://player.vimeo.com/video/106724185?color=ffffff&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe width="640" height="360" src="https://www.youtube.com/embed/dIkHPxeslHQ" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe width="640" height="360" src="https://player.vimeo.com/video/106724185?color=ffffff&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe width="640" height="360" src="https://www.youtube.com/embed/dIkHPxeslHQ" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe width="640" height="360" src="https://player.vimeo.com/video/106724185?color=ffffff&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
</body>
</html> and here is the app.js: var app = require('app');
var BrowserWindow = require('browser-window');
var mainWindow = null;
require('crash-reporter').start();
app.on('ready', function() {
mainWindow = new BrowserWindow({
'width': 800,
'height': 600,
'node-integration': false,
'web-preferences': {
'web-security': false,
'overlay-fullscreen-video': true,
}
});
mainWindow.loadUrl('file://' + __dirname + '/index.html');
mainWindow.on('closed', function() {
mainWindow = null;
});
}); |
Currently we don't have HTML5 full-screen API implemented, so the HTML5 version of YouTube player can not enter fullscreen. |
will you do it soon? it interest me too |
No, it is quite low priority. |
I ran into this issue as well. Devs- it seems this has been fixed on nwjs, so if it's any help in getting the problem resolved, here's the relevant commit and ticket: For the time being, I'm guessing I will have to monkey patch the html5 fullscreen API, reimplementing it via calls to the equivalent features in the BrowserWindow API. If anyone else has any other ideas, I'd be interested to know. |
Here's my fullscreen monkey patch script if anyone needs it (note: its using ES6): I didin't go through the additional steps of figuring out how to mock trigger the :full-screen pseudo classes and centering on content. My guess is the easiest way to handle that will be to use z-index with a maximum value on the content and set it to 100% width/height. |
Hi -Tobias |
@thyrrestrup The monkey patch should fix the HTML5 API without having to do anything else. For example, if var fullscreen = new Fullscreen();
fullscreen.implementHtml5FullscreenApi(); |
@jameslk - thanks I'm unsure how I should require or import the atom-shell-fullscreen.js file and if this is done in the renderer or in the browser? - If this is done in the renderer could this be done through the preload script? |
@thyrrestrup You will need to run it through an ES6 to 5 transpiler if you haven't done that already (like this one). Then require it in on the browser side (where things are displayed, like HTML and CSS--not on the side that creates the browser frames). |
@jameslk in case you don't wanna go through the transpilation process #1328 (comment) |
@steelbrain Ah nice, thanks for the tip. I'll try that out. |
Hi
I have embedded a couple of videos from youtube and vimeo in my app.
But the fullscreen feature does not work - furthermore if the fullscreen button is clicked the scroll functionality of the app stops working until the page is refreshed..
-Tobias
The text was updated successfully, but these errors were encountered: