Provide timeline speed getter


#1

When you play a timeline, you can set its speed. But unless I’m missing something, there is no way to retrieve it later. I’d like to be able to retrieve it so I can play a timeline forward or in reverse depending on certain circumstances. Not that this is a big deal, I can just declare an external variable to monitor the timeline’s speed, but it just bothers me and I don’t see a reason why I shouldn’t be able to get the timeline’s current speed as a property.


#2

Hi @marks,

In relation to a timeline node’s play(...) function, speed is merely a parameter which doesn’t necessarily warrant providing a getter function for in the backend, as it’s something that could be achieved through a variable in your project.

Using this method would look something like this:

let playSpeed = 1;

symbol.controllers.Active_Menu.elements.myTimeline.play(playSpeed);

...

let currentSpeed = playSpeed;  

In the example above, we pass in the playSpeed variable as the play(...) function’s speed parameter, instead of a hard-coded value, allowing us to reference this variable later on in our script and retrieve its value.

Is this the kind of usage you were looking for? If not let me know and I’ll see how else I can help.

All the best,
Seb


#3

Yes, I know I can do that. I just thought it’d be nicer to have the speed as a timeline property. And it makes sense because it is an information the timeline holds and pertains to it.


#4

Hey @marks,

I agree it would make the syntax look cleaner. I’ll mention this to the team and let you know when we have some more information to share.

Thanks again,
Seb