-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bugs? setValue on Source for video/audio #295
Comments
I had to dive a bit deeper into the code and found out that there is yet another list where extensions for video/audio are stored: So if at some point in time a new extension needs to be added, it needs to be added in two places. I did have trouble getting the right type of source (MediaSource) back for my videos and now I get why: this other regex is also case sensitive and thus my video .MOV files fell through and ended up as a regular Source object. I have not searched for it, but I can imagine that this whole structure of finding out what kind of Source or Item something is lives in two places (one for Source and one for Item) and thus could/should both be fixed? |
Hi! Thanks for the inquiries and reports! :) To address them: 1 - definitely a bug, for fixing 2 & 3 (looping index and extra stuff for 4 (regex syntax error) - most likely a bug (haven't checked myself), for fixing. As to why the resolution "lives" in separate code blocks, this is honestly a workaround on our end. We tried to unify them in a single utility, but we encountered some bundling problems due to how our mixins work. Putting them together causes the |
|
Action Plan:
|
I'm trying to write an extension to easily replace parts of the paths of my sources.
Example: c:\content\a=b\q=z\media.mov can be changed into c:\content\a=c\q=x\media.mov after the user chooses the settings for a and q. And this for a lot of sources (so no inclination to do this by hand..)
For this I use on Source the getValue, then a regex for the replacement and then setValue for the changed path.
However, I noticed a couple of oddities:
1 - If your source has an extension in capitals (.MOV instead of .mov) it breaks, because on line 10261 of xjs.js a VIDEO_REGEX is used case-sensitive. Since adding a source with capitalized extension works perfectly fine in Xsplit I think it a bit weird that you can not set a value with such extension?
2 - For looping videos for some reason (unclear to me) the file path is followed by stuff in the form of
*0*0
. I'm talking about theitem=
value in the generated xml file that is the .BPres. Trying to replace thisitem=
value (which is what setValue seems to do) does not work because again the VIDEO_REGEX fails (not expecting anything after .mov). However: if Xsplit puts this stuff behind the file path for some reason, why can't xjs.js deal with it? Just leave it be?3 - I noticed that setValue clears the cue points and sets the name as well, next to editing the value.
https://github.com/xjsframework/xjs/blob/a1197da3015af103462a8d7ab4dff60c6b07e329/src/core/source/iplayback.ts#L653
Why is this? There's separate methods to do those things. If I want to change the path of a looping video, but not the cue points this is made impossible this way. (Of course I could fix this for my case by (re)setting the cue points after changing the value, but setValue obviously does more than setting just the value, so the expectation of what it does is broken)
The text was updated successfully, but these errors were encountered: