Comments (8)
What is your chrome version?
Fullscreen on your link works fine for me.
Chrome 39.0.2171.95 m (last stable)
from libjass.
ok, i checked it, it happens when you set default zoom page for example 125%, zoom page to 125% and you will see that default is ok but fs is not ok, maybe it is also in firefox cause in firefox i had it without zoom.
from libjass.
This is a bug in videojs-ass. On going fullscreen, it tells the renderer to resize to (screen.width, screen.height). This does not take browser zoom into account.
Eg: If I have a 1920x1200 monitor and the browser is zoomed to 200%, the fullscreen video element (iframe) is 960x600. However screen.width and screen.height continue to be 1920x1200 since they are measured in device pixels, not viewport pixels.
Instead of using screen.width and screen.height, it should use some method of getting the player's width and height. (It did not seem that player.width() and player.height() report it because they continued to give the pre-fullscreen dimensions. Not sure whether videojs can give that information.)
from libjass.
(DefaultRenderer also has this bug, but videojs-ass doesn't use it so it's not relevant here.)
from libjass.
in reply to this, the only way i was able to fix this problem was to make the player responsive and have libass.css size up to the responsiveness of the player by making the wrapper wrap around the full layer of the player.
IT will work when you zoom out (to a certain degree) and will resize on phones. (subtitles will be all the way at the bottom when in portrait view)
from libjass.
@ChristianMcQuilkin Can you elaborate? Do you mean you put the video element inside the .libjass-wrapper
wrapper, or the .libjass-subs
wrapper? How do you call renderer.resize when going in and out of fullscreen?
from libjass.
I'm basing this off of video-js-ass
What i did was made videojs and vjs-tech relative and have an auto height.
Then i'd have libjass wrapper have a
width: 100%; height: 100% !important; top: 0;
i would also have the libjass-subs wrap around too.
Just take a look here: and look for the differences:
http://anime.genenx.squidix.me/assets/css/libjass.css
Go here for the test:
http://anime.genenx.squidix.me/shows/39-death-parade/seasons/1/episodes/1
from libjass.
I see. That is not correct, unfortunately. Setting width and height to 100% will break with full-screen letterboxed video. For example on your test page, notice how the relative position of the subs is wrong:
Full-screen - the subs are outside the video, and no margins are being applied:
The reason the renderer works with absolute sizes is also because it is essential for calculating widths, margins, zoom, etc. For example, on your page, entering and exiting fullscreen results in an incorrect width calculation - the wrapper and subs are too wide, causing the subs to shift right.
Instead of hacking the renderer's size calculation, you should endeavor to call it with the correct size. For DefaultRenderer, a simple fix was to delay the resize with setTimeout after the actual fullscreenChange event, so that the browser reported the correct full-screen pixel size of the video element. You can probably do the same with videojs.
from libjass.
Related Issues (20)
- "PlayResX" is not treated as optional! -> breaking HOT 15
- When PlayResX or PlayResY are defined as zero, tab crashes. HOT 1
- Unexpected style margin collisions HOT 1
- \n being rendered in plain text, wrapping style 2 HOT 2
- Request for new release HOT 2
- How to crate subtitle from JSON Object ? HOT 2
- libjass.deserialize dialogue style changes not work HOT 2
- When playing preroll ads, sometimes the text appears very small HOT 1
- Why the npm package doesn't contains a type definition file. HOT 1
- Line-specific styles do not override style definitions HOT 2
- \fad with a fadeout of 0 is treated as fading out for the duration of the line HOT 1
- Opt-in support for command execution HOT 3
- [Feature Request]Can you convert a .ass subtitle to VobSub format? HOT 2
- dialogues ID will be created next to the last dialogues ID from previous object HOT 3
- when I create new dialogue can I get a dialogue class tag? HOT 1
- Update Typescript version HOT 6
- Serialize back to .ass HOT 1
- implement smart line wrapping
- Lines can be "pushed away" by other lines on the same layer HOT 2
- Lines are moved down when lines underneath it are removed HOT 1
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 libjass.