Comments (2)
That's a known issue, and one that is difficult to fix without using up extra CPU.
We reverse our own video with CSS. In full screen or picture in picture, however, the video is handles by the browser, and our CSS doesn't apply.
A solution would be to funnel the video to a Canvas, reverse it there, and then funnel the Canvas to the HTMLVideoElement. This will possibly cause extra CPU usage and might cause tearing. I'll try it to see how well it works at some point, but it's pretty low on my list of priorities.
from galene.
Taken from Stack Overflow, it's impossible to apply transforms to a fullscreened element. However, we can add a parent element to a video, fullscreen that element, and apply the transformation to the child video. I don't know if there's a performance penalty.
This has some drawbacks, though.
- On Firefox 84 the controls are shown reversed until the mouse hovers the video, then they are flipped and rendered correctly;
- On Chrome 87 the controls are flipped.
Below is a working example. I think the controls issue can be dealed with if we use custom controls or manipulate the shadow DOM, but that would require mastery and cross-browser testing.
A thought: if any element can be full-screened, we could full-screen the parent of all the videos and have a nice uncluttered view of all the videos.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Video</title>
<meta charset="utf-8">
</head>
<body>
<p>By default, the gray noise is on bottom right. If it is on the bottom left, the video is mirrored.</p>
<button id="fullscreen">Fullscreen</button>
<label for="mirror"><input type="checkbox" name="mirror" id="mirror" autocomplete="off">Mirror</label>
<div id="container">
<video id="video" src="http://v2v.cc/~j/theora_testsuite/320x240.ogg" controls></video>
</div>
<script>
let btn = document.getElementById("fullscreen");
let box = document.getElementById("mirror");
let container = document.getElementById("container");
btn.onclick = function(e) {
e.preventDefault();
container.requestFullscreen();
};
box.onchange = function(e) {
video.style.transform = box.checked ? "scaleX(-1)" : null;
};
document.onfullscreenchange = function(e) {
if(document.fullscreenElement) { /* entering */
video.style.width = "100%";
video.style.height = "100%";
video.style["object-fit"] = "contain";
} else { /* exiting */
video.style.width = null;
video.style.height = null;
video.style["object-fit"] = "inherit";
}
};
</script>
</body>
</html>
from galene.
Related Issues (20)
- issue with recording HOT 2
- suggestion : prompt operator/presenter that the room is locked HOT 3
- Bitrate limitation ineffective on Firefox HOT 1
- Not being able to see others video/audio, revival HOT 6
- Menu disappears behind broadcasted files HOT 4
- Get rtptime.Jiffies is zero at a while HOT 1
- Feature request: listening on a unix socket HOT 3
- Recording issue with no usable tracks found HOT 5
- Test failure HOT 1
- Selective forwarding HOT 3
- galene 0.6 allows users to connect before /unlock HOT 2
- Commit 31ed146a959ec7602b82e8573abe540cba4461df breaks Galène behind Apache reverse-proxy HOT 7
- Changes required for FreeBSD compatibility HOT 1
- JWT token authentication fails HOT 6
- Galene Yunohost Update 0.6.2 Affects Group Links HOT 9
- Allow to prefill username/password through URL param HOT 1
- WHIP: panic on /whip HOT 2
- Browser refuse to connect to WebSocket when using insecure Galene behind a reverse proxy HOT 2
- No entry in the Free Software Directory yet HOT 1
- Odd spacing glitch on Microsoft edge on Manjaro Linux HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from galene.