# Feature request for Media: setting startTime and endTime to allow only an interval of a video

**URL:** <https://cl.desmos.com/t/feature-request-for-media-setting-starttime-and-endtime-to-allow-only-an-interval-of-a-video/3681>\
**Category:** Questions\
**Created:** [September 19, 2021, 11:07pm UTC](https://cl.desmos.com/t/feature-request-for-media-setting-starttime-and-endtime-to-allow-only-an-interval-of-a-video/3681 "2021-09-19T23:07:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [September 19, 2021, 11:07pm UTC](https://cl.desmos.com/t/feature-request-for-media-setting-starttime-and-endtime-to-allow-only-an-interval-of-a-video/3681/1 "2021-09-19T23:07:29Z")

</div>

I have a video and would like to be able to programmatically limit the section of the video which is displayed depending on whether/how a student has answered a question.

For instance, let’s say I have a 6 second clip but only want the student to be able to access the section from 1 to 4 seconds.

I would love to have sinks like  
`startTime: 1`  
`endTime: 4`

(Note that even if I used the existing `time` sink that sets the initial time, but doesn’t stop the student from going to an earlier time.)

I can come close to simulating the desired behaviour with the following code

`time: when this.time < 1 or this.time >= 4 1 otherwise this.time`

But this produces a very jerky output, and in fact I was surprised that the code was even accepted because it paves the way for circular definitions.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [September 19, 2021, 11:39pm UTC](https://cl.desmos.com/t/feature-request-for-media-setting-starttime-and-endtime-to-allow-only-an-interval-of-a-video/3681/2 "2021-09-19T23:39:13Z")

</div>

There are a fair number of decent free or open source video editing software. I’ve used OpenShot. The interface looks a little complicated initially, but it’s fairly easy to use.

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [September 20, 2021, 12:08am UTC](https://cl.desmos.com/t/feature-request-for-media-setting-starttime-and-endtime-to-allow-only-an-interval-of-a-video/3681/3 "2021-09-20T00:08:32Z")

</div>

Agree there are workarounds and I have been doing something like this in the past, but I would prefer not to have hundreds of unnecessary files created and then have multiple media components on the one screen just to simulate something that should be straightforward.
