-
Notifications
You must be signed in to change notification settings - Fork 80
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
Why ASS.resize() doesnt work? #34
Comments
Problem solved with: fullscreen.addEventListener('click', () => {
const src = document.querySelector('.subtitleElement.active').getAttribute('src');
if (src.endsWith('.ass')) {
fetch(src).then(res => res.text()).then(text => {
assHardStop()
ass = new ASS(text, video, {
container: document.querySelector('.ASS-container'),
resampling: 'video_height',
});fullsc
assHardStop = ass.destroy.bind(ass);
}).catch(err => {
console.log(err);
});
} |
Problem solved with: var assHardStop = () => {};
...
fullscreen.addEventListener('click', () => {
const src = document.querySelector('.subtitleElement.active').getAttribute('src');
if (src.endsWith('.ass')) {
fetch(src).then(res => res.text()).then(text => {
assHardStop()
ass = new ASS(text, video, {
container: document.querySelector('.ASS-container'),
resampling: 'video_height',
});
assHardStop = ass.destroy.bind(ass);
}).catch(err => {
console.log(err);
});
} But you must add line when you destroy and recreate the ASS class assHardStop = ass.destroy.bind(ass); |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ASS is exactly the library I want, but it doesn't work even though I call the resize function when the screen size changes or my player is full screen.
The text was updated successfully, but these errors were encountered: