Perspective Video Player Eneded Status - Navigation ability from change script

Is there a way to navigate from the perspective video player page once the video has ended? I have tried using the change script on the ended status tag with no luck. I have confirmed my script works via the use of a button and confirmed the ended status changes state by tying it to the property of an indicator and changing its colour. For some reason the navigation code isn’t working when the ended status is active.

Thanks

Can you post your code using the </> button to format it.

1 Like

I used the following code and it worked exactly as I’d expect:

	if currentValue and currentValue.value:
		system.perspective.navigate(page="/")
1 Like

This is the code I have tried:

if (currentValue == True):
       system.perspective.navigation('/NewPage')

Thanks Andrews.

navigation is not the right name. You must use exactly system.perspective.navigate, case-sensitive.

1 Like

Hi cmallonee,

I have just tried your code also which hasn’t worked for me either.
I have applied the property change script to - VideoPlayer.prop.status.ended.
I would assume this to be the correct location?

Regards
Jamie

Yes, that is the correct location. Out of curiosity, are you attempting to do this in the Designer? That is the only place I would not expect this to work. Another explanation might be that you did not save the project.

There are multiple reasons the following code will NOT work:

if (currentValue == True):
       system.perspective.navigation('/NewPage')
  1. currentValue is a QualifiedValue object, not a boolean value, and so it will never equal True.
  2. there is no Perspective package function navigate().
1 Like

Thank you for all your help.
Its now working after correcting the function from navigation() to navigate().