# Perspective Video Player Eneded Status - Navigation ability from change script

**URL:** <https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 24, 2022, 1:51am UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936 "2022-05-24T01:51:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamie\_Baker](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jamie\_Baker](https://forum.inductiveautomation.com/u/Jamie_Baker)\
**Post date:** [May 24, 2022, 1:51am UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/1 "2022-05-24T01:51:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [May 25, 2022, 2:50pm UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/2 "2022-05-25T14:50:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 25, 2022, 5:00pm UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/3 "2022-05-25T17:00:30Z")

</div>

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

```auto
	if currentValue and currentValue.value:
		system.perspective.navigate(page="/")

```

---

<div class="post-metadata">

**Author:** ![Jamie\_Baker](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jamie\_Baker](https://forum.inductiveautomation.com/u/Jamie_Baker)\
**Post date:** [May 25, 2022, 8:36pm UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/4 "2022-05-25T20:36:53Z")

</div>

This is the code I have tried:

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

```

Thanks Andrews.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 25, 2022, 8:40pm UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/5 "2022-05-25T20:40:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jamie\_Baker](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jamie\_Baker](https://forum.inductiveautomation.com/u/Jamie_Baker)\
**Post date:** [May 25, 2022, 8:41pm UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/6 "2022-05-25T20:41:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 25, 2022, 9:20pm UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/7 "2022-05-25T21:20:46Z")

</div>

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:

```auto
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()`.

---

<div class="post-metadata">

**Author:** ![Jamie\_Baker](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jamie\_Baker](https://forum.inductiveautomation.com/u/Jamie_Baker)\
**Post date:** [May 25, 2022, 9:42pm UTC](https://forum.inductiveautomation.com/t/perspective-video-player-eneded-status-navigation-ability-from-change-script/59936/8 "2022-05-25T21:42:01Z")

</div>

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