[Tease Program] Tease-AI Java (1.4)

Webteases are great, but what if you're in the mood for a slightly more immersive experience? Chat about Tease AI and other offline tease software.

Moderator: 1885

User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

ThePurpleSnowglobe wrote: Mon Feb 08, 2021 5:53 pm I have a question regarding the Tumblr images issue, mentioned in the pull request #23 by FrozenWolf. In my understandig this fix was included in the version 1.3 of TAJ, so the issue should be resolved, I guess.
Unfortunately, the tumblr fix is not part of version 1.3. Version 1.3 was created by GodDragon on 14th Dec 2020, and pull request #23 was merged in to the source on 16th Jan 2021, but hasn't been incorporated into a new release yet.
ThePurpleSnowglobe wrote: Mon Feb 08, 2021 5:53 pm The thing is, I still expierence this problem. While playing Spicy I get lots and lots of black screens. After every session the Downloaded Images folder is filled with seemingly corrupted images. By closer inspection I noticed that these files, though having the normal .jpg, .gif extensions in reality containing HTML code of a tumblr page with the actual image embeded.

I am using Windows 10 and started TAJ two weeks ago (after several months of abstinence) when it updated to version 1.3 automatically. Only thereafter I installed and configured Spicy. At first I missed to configure a media folder for tease images and so I thought the black screens were my fault of having something else not configured correctly. Only recently I discorved what was going on in the Downloaded Images folder.
Yes, you're correct, the downloaded images are indeed HTML, not actual images; they're the proxy pages that normally host the images.

Hopefully GodDragon will have a chance to make a new release when he's ready.
ThePurpleSnowglobe
Explorer
Explorer
Posts: 5
Joined: Sun Feb 07, 2021 10:55 pm
I am a: Switch

Re: [Tease Program] Tease-AI Java (1.3)

Post by ThePurpleSnowglobe »

FrozenWolf wrote: Mon Feb 08, 2021 10:17 pm
ThePurpleSnowglobe wrote: Mon Feb 08, 2021 5:53 pm I have a question regarding the Tumblr images issue, mentioned in the pull request #23 by FrozenWolf. In my understandig this fix was included in the version 1.3 of TAJ, so the issue should be resolved, I guess.
Unfortunately, the tumblr fix is not part of version 1.3. Version 1.3 was created by GodDragon on 14th Dec 2020, and pull request #23 was merged in to the source on 16th Jan 2021, but hasn't been incorporated into a new release yet.
Thank you for your quick reply. I was under the impression that version 1.3 was released mid-january. I do not know where I picked this up. So while we wait for GodDragon to compile the next version: do you know, if there is an option to temporaly deactivate tumblr images without breaking the personalty scripts? Spicy has some scripts that heavily rely on online tease images. It is so strange when your Mistress taunts you with how difficult it is to look at all these sexy images while you looked at a black screen for the last couples of minutes. :lol:
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

ThePurpleSnowglobe wrote: Tue Feb 09, 2021 1:46 pm
FrozenWolf wrote: Mon Feb 08, 2021 10:17 pm
ThePurpleSnowglobe wrote: Mon Feb 08, 2021 5:53 pm I have a question regarding the Tumblr images issue, mentioned in the pull request #23 by FrozenWolf. In my understandig this fix was included in the version 1.3 of TAJ, so the issue should be resolved, I guess.
Unfortunately, the tumblr fix is not part of version 1.3. Version 1.3 was created by GodDragon on 14th Dec 2020, and pull request #23 was merged in to the source on 16th Jan 2021, but hasn't been incorporated into a new release yet.
Thank you for your quick reply. I was under the impression that version 1.3 was released mid-january. I do not know where I picked this up. So while we wait for GodDragon to compile the next version: do you know, if there is an option to temporaly deactivate tumblr images without breaking the personalty scripts? Spicy has some scripts that heavily rely on online tease images. It is so strange when your Mistress taunts you with how difficult it is to look at all these sexy images while you looked at a black screen for the last couples of minutes. :lol:
I don't think there's anything easy that could be done to switch off URL fetches. There are a few routes through which a URL can be selected for download, nothing that's trivial to disable either through a configuration option or by modifying the personality. While some changes could be made to the configuration, the result would be an error message in the log and the default would be to show a black image anyway, so not much use there :-P

The 'Images/System/Downloaded Files' directory contains the cache of downloaded files so that it won't fetch the same thing more than one. The filenames are the same as those found in the text files in the 'Images/System/URL Files' directory. My suggestion here would be to edit the text files to leave only a single image reference in there (i.e. it would be three lines in total, leaving the top two lines alone). Then create an image of your choice for that category with the corresponding filename in the 'Images/System/Downloaded Files' directory. That's quite still quite a bit of grunt work though. I think you'd also need to disable the 'Use for tease' checkboxes for each URL in "Settings->Media->URL Files". Don't forget that if you're hacking around in those files, it's a good idea to do it while TAJ isn't running. Also, I think that'll work, but I haven't actually tried it myself. If you do try that and it doesn't work, I promise to stand in the corner for half an hour :lol:
ski23
Explorer At Heart
Explorer At Heart
Posts: 466
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease Program] Tease-AI Java (1.3)

Post by ski23 »

GodDragon wrote: Mon Jan 25, 2021 7:07 pm
FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm Good stuff. I think when looking back at it, the only thing that might be different is that the new onCall() methods take Integers as duration values whereas you tweaked the original version to accept Numbers to cope with fractional values. I was doing a cross-comparison at the the time with the sendMessage implementation that only deals with Integers as duration values and probably got my wires crossed. Do you think that all of the API functions that accept durations should handle fractions (even if they're rounded to the nearest integer)? The actual media functions could even use the Duration type for stronger internal consistency.
I made it accept fractional values since for some reason the behaviour of Nashorn seemed to change from Java Version to Java Version. Beforehand I provided the JavaScript call with a 1 and it would yield a 1 as an integer, but in a higher Java Version it ended up being translated to a double in java and thus broke it. Additionally there might be cases where in JavaScript these Integers are calculated using float precision and then casting it just to get it to be a valid parameter seems to much for me. I think it should indeed accept fractional values just for the case of safety. I couldn't guarantee Spicy wouldn't break without the support for it.
FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm I did have a go at modifying the original, and my poor brain couldn't handle it :wacko:. Luckily I've got enough spare time at the moment to be able to tackle bits like this.

Are any other parts of TAJ that you'd like me to look at? I could look into the other API implementations and convert those to use reflection too; it might weed out other some other bugs. Other than that I'll just see if I can find potential issues.
Well, yes indeed reworking the other API calls might be worth a shot.
Apart from that the statistic system was made by ski (I don't use it aynway, dunno if any personality would use it rather than use a custom one, but since I never used it it could need a major rework, because from what I've seen the code isn't optimal in my eyes.

Same goes for the Personality Settings, although I think that one looks better and I've made a few minor changes to fix some things back then.

The Lazy Sub Interface could be prettier and alllow for more and custom options possibly.

The Image ripping from reddit (using a library) was implemented by ski too, so no idea how that one compares.

I mean design wise TAJ could be a bit prettier or allow the theme to change more than that if you want to dig into that.

Estim integration was also made by ski, I can't really test it anyway, since I am lacking such a device for now.
I didn't do the estim integration. If you want to you could drop it.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

ski23 wrote: Wed Feb 17, 2021 3:41 pm
GodDragon wrote: Mon Jan 25, 2021 7:07 pm
FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm Good stuff. I think when looking back at it, the only thing that might be different is that the new onCall() methods take Integers as duration values whereas you tweaked the original version to accept Numbers to cope with fractional values. I was doing a cross-comparison at the the time with the sendMessage implementation that only deals with Integers as duration values and probably got my wires crossed. Do you think that all of the API functions that accept durations should handle fractions (even if they're rounded to the nearest integer)? The actual media functions could even use the Duration type for stronger internal consistency.
I made it accept fractional values since for some reason the behaviour of Nashorn seemed to change from Java Version to Java Version. Beforehand I provided the JavaScript call with a 1 and it would yield a 1 as an integer, but in a higher Java Version it ended up being translated to a double in java and thus broke it. Additionally there might be cases where in JavaScript these Integers are calculated using float precision and then casting it just to get it to be a valid parameter seems to much for me. I think it should indeed accept fractional values just for the case of safety. I couldn't guarantee Spicy wouldn't break without the support for it.
FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm I did have a go at modifying the original, and my poor brain couldn't handle it :wacko:. Luckily I've got enough spare time at the moment to be able to tackle bits like this.

Are any other parts of TAJ that you'd like me to look at? I could look into the other API implementations and convert those to use reflection too; it might weed out other some other bugs. Other than that I'll just see if I can find potential issues.
Well, yes indeed reworking the other API calls might be worth a shot.
Apart from that the statistic system was made by ski (I don't use it aynway, dunno if any personality would use it rather than use a custom one, but since I never used it it could need a major rework, because from what I've seen the code isn't optimal in my eyes.

Same goes for the Personality Settings, although I think that one looks better and I've made a few minor changes to fix some things back then.

The Lazy Sub Interface could be prettier and alllow for more and custom options possibly.

The Image ripping from reddit (using a library) was implemented by ski too, so no idea how that one compares.

I mean design wise TAJ could be a bit prettier or allow the theme to change more than that if you want to dig into that.

Estim integration was also made by ski, I can't really test it anyway, since I am lacking such a device for now.
I didn't do the estim integration. If you want to you could drop it.
Thanks Ski, I'll certainly consider that; I can see that Spicy contains references to eStim, but I'm not sure if it's active or not. I don't have an eStim setup myself, so it's not something I could test anyway. Does Mischevious use anything like that?

I'm putting together a testing personality to stress the API as best I can. Eventually I hope to be able to cover every variation of every function. It's here if anyone is interested: https://github.com/FrozenWolf4887/Tease ... ersonality. This seems to be the best way for me to verify that any changes I propose to TAJ haven't broken it.

I was also thinking that adding doxygen comments to each API call might help with extending some of the wiki documentation. I think doxygen/moxygen might be able to output something that's wiki format friendly.
ski23
Explorer At Heart
Explorer At Heart
Posts: 466
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease Program] Tease-AI Java (1.3)

Post by ski23 »

FrozenWolf wrote: Wed Feb 17, 2021 10:08 pm
ski23 wrote: Wed Feb 17, 2021 3:41 pm
GodDragon wrote: Mon Jan 25, 2021 7:07 pm

I made it accept fractional values since for some reason the behaviour of Nashorn seemed to change from Java Version to Java Version. Beforehand I provided the JavaScript call with a 1 and it would yield a 1 as an integer, but in a higher Java Version it ended up being translated to a double in java and thus broke it. Additionally there might be cases where in JavaScript these Integers are calculated using float precision and then casting it just to get it to be a valid parameter seems to much for me. I think it should indeed accept fractional values just for the case of safety. I couldn't guarantee Spicy wouldn't break without the support for it.



Well, yes indeed reworking the other API calls might be worth a shot.
Apart from that the statistic system was made by ski (I don't use it aynway, dunno if any personality would use it rather than use a custom one, but since I never used it it could need a major rework, because from what I've seen the code isn't optimal in my eyes.

Same goes for the Personality Settings, although I think that one looks better and I've made a few minor changes to fix some things back then.

The Lazy Sub Interface could be prettier and alllow for more and custom options possibly.

The Image ripping from reddit (using a library) was implemented by ski too, so no idea how that one compares.

I mean design wise TAJ could be a bit prettier or allow the theme to change more than that if you want to dig into that.

Estim integration was also made by ski, I can't really test it anyway, since I am lacking such a device for now.
I didn't do the estim integration. If you want to you could drop it.
Thanks Ski, I'll certainly consider that; I can see that Spicy contains references to eStim, but I'm not sure if it's active or not. I don't have an eStim setup myself, so it's not something I could test anyway. Does Mischevious use anything like that?

I'm putting together a testing personality to stress the API as best I can. Eventually I hope to be able to cover every variation of every function. It's here if anyone is interested: https://github.com/FrozenWolf4887/Tease ... ersonality. This seems to be the best way for me to verify that any changes I propose to TAJ haven't broken it.

I was also thinking that adding doxygen comments to each API call might help with extending some of the wiki documentation. I think doxygen/moxygen might be able to output something that's wiki format friendly.
I never used any of the estim stuff anywhere including mischevious.
lotar232
Explorer
Explorer
Posts: 76
Joined: Sat Nov 01, 2008 6:34 pm

Re: [Tease Program] Tease-AI Java (1.3)

Post by lotar232 »

GodDragon wrote: Sat Jan 09, 2021 3:18 pm
lotar232 wrote: Fri Jan 08, 2021 10:59 pm delivering "media modules" / organization:

so I've been playing around with a spicy fork, and mostly have been doing video modules... i.e. I've found some video where a mistress shocks a slave(Pishock now , or potentially e-STIM), or milks via controlling a vibrator or fleshlight (Lovense), and have been writing a script that actuates toys in sequence with the video( if I get the timing correct and the RF/BT/network gods are smiling. ;) )....


I was wondering how to share these modules since the scripts are tightly coupled with the media... and the media is heavy (500MB-1GB videos)... typically we put all the media in one directory and all the personality code in another...

I was wondering if it made sense to create some top level folder for "modules" (similar to video, audio, and Images) where code could sit next to the media... and if anyone had thought about this, or if it made sense to have a standard "module structure" (i.e. like mini-personalities that could be called)

any thoughts?
You can quite easily play a video from a file inside your personality code files even though I don't think that's optimal. I mean probably the best way to go about this would be to upload the videos to some video plattform and then stream them into TAJ with via a new feature.
I think my main challenge is latency of intervening calls while the video is playing.... I can watch a video, and mark in time say 50 places in video where I want to call some function (lovense vibrator or pishock, which themselves may make network calls)... but when I play the video in over time the accumulated delay of all those calls gets me out of sync and I need to replay it a bunch of times and iteratively "fixup" the delays.... Its probably impossible to set up a bunch or wall-clock based interupts, so I think I just need to stick to doing the manual fix-ups (or come up with some algorithm to reduce every nth delay by a second to stay in-sync)
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

lotar232 wrote: Sat Mar 06, 2021 4:59 am
GodDragon wrote: Sat Jan 09, 2021 3:18 pm
lotar232 wrote: Fri Jan 08, 2021 10:59 pm delivering "media modules" / organization:

so I've been playing around with a spicy fork, and mostly have been doing video modules... i.e. I've found some video where a mistress shocks a slave(Pishock now , or potentially e-STIM), or milks via controlling a vibrator or fleshlight (Lovense), and have been writing a script that actuates toys in sequence with the video( if I get the timing correct and the RF/BT/network gods are smiling. ;) )....


I was wondering how to share these modules since the scripts are tightly coupled with the media... and the media is heavy (500MB-1GB videos)... typically we put all the media in one directory and all the personality code in another...

I was wondering if it made sense to create some top level folder for "modules" (similar to video, audio, and Images) where code could sit next to the media... and if anyone had thought about this, or if it made sense to have a standard "module structure" (i.e. like mini-personalities that could be called)

any thoughts?
You can quite easily play a video from a file inside your personality code files even though I don't think that's optimal. I mean probably the best way to go about this would be to upload the videos to some video plattform and then stream them into TAJ with via a new feature.
I think my main challenge is latency of intervening calls while the video is playing.... I can watch a video, and mark in time say 50 places in video where I want to call some function (lovense vibrator or pishock, which themselves may make network calls)... but when I play the video in over time the accumulated delay of all those calls gets me out of sync and I need to replay it a bunch of times and iteratively "fixup" the delays.... Its probably impossible to set up a bunch or wall-clock based interupts, so I think I just need to stick to doing the manual fix-ups (or come up with some algorithm to reduce every nth delay by a second to stay in-sync)
I could add something like "GetVideoPlaybackPositionMillis()" to tell you how far into the video you are so you just need to "wait()" until the next desired timestamp. That would at least accommodate for the video startup time and for the general JavaScript latency in performing other operations. There would still be some latency as you say when performing the action when reaching the desired timestamp, but at least it wouldn't lose synchronisation.
leezer3
Explorer
Explorer
Posts: 38
Joined: Sat Mar 28, 2020 10:31 am

Re: [Tease Program] Tease-AI Java (1.3)

Post by leezer3 »

@FrozenWolf-
You've probably seen this, but I've submitted a PR to your integration branch. Started off just getting Gradle working elsewhere, but I've done some marginal hacky work to stop it throwing a black-screen / displaying unwanted stuff on various invalid image cases, which you / GodDragoner may be interested in.

The *better* way to do this (at least IMHO) would be to re-write the entire thing as a function with return status (e.g. Success, Invalid Image, RemovedImage, WebException etc. etc.) and an out variable for the returned file, so that callers can re-request or switch to a local image on failure.
Don't especially like using exceptions for flow control either, but that was what the original function used to trigger a re-roll of the image.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

leezer3 wrote: Tue Mar 09, 2021 1:09 pm @FrozenWolf-
You've probably seen this, but I've submitted a PR to your integration branch. Started off just getting Gradle working elsewhere...
Thanks for the pull-request. I didn't have notifications set up for pull requests (I do now!) so I didn't see it.

The local-integration branch is just my local stuff that I'm keeping independent from GodDragon's master branch; it contains some other bits that aren't intended for merging with the master, such as the minimum-ui patch (that was suggested by candriver) and the change-typing-colour which is a tweak for my colour scheme. The gradle changes that you made look good though. I just crowbarred a basic gradle script together to get something that allowed me to build locally on Linux with the libraries that came with the original TAJ installation, all going in to the 'gradle' branch. One of the commits '7ef184cd - Add links to media directories', won't make much sense to anyone else. Well spotted on the missing properties file; I inherited the .gitignore file and hadn't realised that it excluded *.properties. What I'll probably do is patch up the 'gradle' branch and merge the update back into the 'local-integration' branch.

It's great that you got it building under Windows; I haven't used Windows for about six months now and every time I boot back into it there seems to be a stack of critical updates that need to be installed, and I've pruned most of the development tools that I used to have on there anyway.
leezer3 wrote: Tue Mar 09, 2021 1:09 pm I've done some marginal hacky work to stop it throwing a black-screen / displaying unwanted stuff on various invalid image cases, which you / GodDragoner may be interested in.
The *better* way to do this (at least IMHO) would be to re-write the entire thing as a function with return status (e.g. Success, Invalid Image, RemovedImage, WebException etc. etc.) and an out variable for the returned file, so that callers can re-request or switch to a local image on failure.
Don't especially like using exceptions for flow control either, but that was what the original function used to trigger a re-roll of the image.
There are some nice ideas there. Note that the error images from tumblr are not always the same size, it seems to depend on the resolution of the image that was requested. I was thinking of scanning the decoded image to see if the outer edge was that particular blue/purple colour.

If you have a look at the branch 'fortify-media-playback', you'll see the commit '5a0e0f06 - WIP - Fix media stability issues' which takes a bit of a sledgehammer to the MediaHandler. Really all it does is separate the responsibilities of each media type and solve some bugs along the way. I'm testing these changes out with TeaseAIJava-TestPersonality and so far it is stable, but I have many more tests to write before I'm happy with it. Once that's done, I'll most certainly come back to your pull-request to see what we can merge in, there's lots of good things we can help to improve in this area.
leezer3
Explorer
Explorer
Posts: 38
Joined: Sat Mar 28, 2020 10:31 am

Re: [Tease Program] Tease-AI Java (1.3)

Post by leezer3 »

That's interesting- Everything I've seen is the same size so far.
Possibly might depend on the blog in question and from there the CDN it's fetching it from or something of that nature.
Pixel reading would probably work to an extent, but it's too broad a brush for my tastes.

Fundamentally, I suspect that there are few enough of these though that we might as well just use the file length. Probably going to be cheaper. You could also start shutting this behind a URL switch, but that's making work for no real use.

Your branch just seemed the place most development was going on at the minute, and it's hacky stuff :-P
Plus there was the fact that Gradle already half-worked there, rather than me trying to stop the thing exploding from scratch.

Really thogh, Gradle wasn't too hard to get going on Windows, biggest problem is that I'm a C# guy, and Java is just that little bit different....
Note that JavaFX is still broken for anyone else checking out (unless you dump it in the appropriate place)
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

Created a pull request to address the problem of favouring clothed pictures regardless of how long into the session you are:
https://github.com/GodDragoner/TeaseAIJava/pull/27

Originated from: viewtopic.php?p=298226#p298226
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

Created a pull request to help fortify the media playback.
https://github.com/GodDragoner/TeaseAIJava/pull/28

It's a big-ol' change that might take some time to review (sorry GD!). I've tested it a lot under Linux with the Spicy Personality and with my Testing Personality: https://github.com/FrozenWolf4887/Tease ... ersonality.

A rallying call to other developers:
Spoiler: show
The main bug that I cannot resolve (and may be related specifically to Linux) is any call to
playVideo
with a URL reference. For example, the Test Personality calls
playVideo('http://localhost:8000/Videos/testing-video1.mp4')
to play a video served from a local python HTTP server (
python3 -m http.server
). The video always plays fine, but about 50% of attempts, the MediaPlayer object issues no callbacks whatsoever to indicate that it's finished, and its status remains as PLAYING indefinitely. Calling stop() on the MediaPlayer object when it's in this state doesn't do anything either. This can cause TAJ to hang in situations where it's waiting for the video to finish.

Note that this problem is also present in the TAJ 1.3 release from 2020-12-14, although I wish I'd checked that two weeks ago rather than assuming it was something that I'd screwed up!

I've spent a crazy number of hours trying to research and track this down and I wonder if it's something specific to my platform. It occurs with both OpenFX 15.0.1 and OpenFX 16; I haven't tried other versions. :wall: I'm starting to see the test videos in my dreams now.

@leezer3 - is this something that you could try out since you have a good cross-platform setup? Perhaps it won't happen under Debian, or Ubuntu, or Slackware, or OpenSuSE, or anything other than what I've got.
lotar232
Explorer
Explorer
Posts: 76
Joined: Sat Nov 01, 2008 6:34 pm

Re: [Tease Program] Tease-AI Java (1.3)

Post by lotar232 »

FrozenWolf wrote: Sun Mar 07, 2021 9:34 am
lotar232 wrote: Sat Mar 06, 2021 4:59 am
GodDragon wrote: Sat Jan 09, 2021 3:18 pm

You can quite easily play a video from a file inside your personality code files even though I don't think that's optimal. I mean probably the best way to go about this would be to upload the videos to some video plattform and then stream them into TAJ with via a new feature.
I think my main challenge is latency of intervening calls while the video is playing.... I can watch a video, and mark in time say 50 places in video where I want to call some function (lovense vibrator or pishock, which themselves may make network calls)... but when I play the video in over time the accumulated delay of all those calls gets me out of sync and I need to replay it a bunch of times and iteratively "fixup" the delays.... Its probably impossible to set up a bunch or wall-clock based interupts, so I think I just need to stick to doing the manual fix-ups (or come up with some algorithm to reduce every nth delay by a second to stay in-sync)
I could add something like "GetVideoPlaybackPositionMillis()" to tell you how far into the video you are so you just need to "wait()" until the next desired timestamp. That would at least accommodate for the video startup time and for the general JavaScript latency in performing other operations. There would still be some latency as you say when performing the action when reaching the desired timestamp, but at least it wouldn't lose synchronisation.
(sorry for the late response... work blackhole ;) )

yeah, a function like that could be awesome... it would let me do something like:

startVideo()

while ( GetVideoPlaybackPositionMillis() < firstEventTime)
{sleepmili's(100);}
do_first_event;
while ( GetVideoPlaybackPositionMillis() < secondEventTime)
{sleepmili's(100);}
do_second_event;
...


would you be able to put it in anytime soon?
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 434
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [Tease Program] Tease-AI Java (1.3)

Post by FrozenWolf »

lotar232 wrote: Wed Mar 24, 2021 4:36 pm
FrozenWolf wrote: Sun Mar 07, 2021 9:34 am
lotar232 wrote: Sat Mar 06, 2021 4:59 am

I think my main challenge is latency of intervening calls while the video is playing.... I can watch a video, and mark in time say 50 places in video where I want to call some function (lovense vibrator or pishock, which themselves may make network calls)... but when I play the video in over time the accumulated delay of all those calls gets me out of sync and I need to replay it a bunch of times and iteratively "fixup" the delays.... Its probably impossible to set up a bunch or wall-clock based interupts, so I think I just need to stick to doing the manual fix-ups (or come up with some algorithm to reduce every nth delay by a second to stay in-sync)
I could add something like "GetVideoPlaybackPositionMillis()" to tell you how far into the video you are so you just need to "wait()" until the next desired timestamp. That would at least accommodate for the video startup time and for the general JavaScript latency in performing other operations. There would still be some latency as you say when performing the action when reaching the desired timestamp, but at least it wouldn't lose synchronisation.
(sorry for the late response... work blackhole ;) )

yeah, a function like that could be awesome... it would let me do something like:

startVideo()

while ( GetVideoPlaybackPositionMillis() < firstEventTime)
{sleepmili's(100);}
do_first_event;
while ( GetVideoPlaybackPositionMillis() < secondEventTime)
{sleepmili's(100);}
do_second_event;
...


would you be able to put it in anytime soon?
It's not too difficult to do, probably just one day with testing, although I'd want to do it on top of pull-28 because that changes quite a few things in that area, so we might have to wait for a bit until GodDragon's had a chance to review it. In the interim period, you could create your own stub version of getVideoPlaybackPositionMillis() that provides the amount of time since the video *might* have started, i.e.:

startVideo()
videoStartTimeMillis = getCurrentTimeMillis();

while ( getVideoPlaybackPositionMillis() < firstEventTime)
{sleepmili's(100);}
do_first_event;
while ( getVideoPlaybackPositionMillis() < secondEventTime)
{sleepmili's(100);}
do_second_event;
...

function getVideoPlaybackPositionMillis() {
    return getCurrentTimeMillis() - videoStartTimeMillis;
}
Post Reply