-
Notifications
You must be signed in to change notification settings - Fork 29
libjass.deserialize dialogue style changes not work #107
Comments
Yes, every One way to fix it is to to change But that won't actually work, since the The immediate solution is to do something like: var result = libjass.deserialize(JSON.stringify(data));
for (const dialogue of result.dialogues) {
dialogue._style = result.styles.get(dialogue.style.name);
}
var renderer = new libjass.renderers.DefaultRenderer(video, result);
/* ... */ to reset the Also, in var style = renderer.ass.styles.get("Default");
style._fontSize = 80;
renderer.ass.styles.set("Default",style); you don't need the third line. |
I'll keep this open since it's a bug. You can unsubscribe from it if you don't want notifications. |
Previously, I'm ask the way to generate ASS object from JSON object. I have some problem. The problem is when i try to change styles Map object generate from
libjass.deserialize
. Then callrender.resize()
style property in dialogue don't change.I use
libjass.deserialize
to create ASS object and render. Then i try to change property in 'Default' styles. when i change_fontSize
and callrender.resize()
. Dialogue use 'Default' style_fontSize
not change.So I tested with
libjass.ASS.fromUrl
. it's work, when i I change styles Map and callrender.resize()
dialogue style property has change. I'm very confused. how can i change dialogue style fromlibjass.deserialize
object render?The text was updated successfully, but these errors were encountered: