<p>I see 2 things you are trying to achieve here:</p>
<ol>
<li><p>video is private, but becomes public. at <a href="https://api.video" rel="nofollow noreferrer">api.video</a>, we have the concept of private videos - where users must have a one time token to watch.  Anyone else using that token will be unable to watch the video.  Once you reach your view threshold, you can make the video public - removing this token behavior.</p>
</li>
<li><p>Monitoring the views of each user.  We have a concept of <a href="https://api.video/blog/tutorials/dynamic-metadata" rel="nofollow noreferrer">dynamic metadata</a> - where you can attach session information to each view.  You could track each user's viewing in this way. For example, if you wanted to tag a view as watched by Bob:</p>
<p><a href="https://embed.api.video/vod/vi2ZEgTAhfOEeYN7ZnEGsm3i?metadata%5Buser%5D=bob" rel="nofollow noreferrer">https://embed.api.video/vod/vi2ZEgTAhfOEeYN7ZnEGsm3i?metadata[user]=bob</a></p>
</li>
</ol>
<p>When you load the page of videos - you can query the <a href="https://docs.api.video/reference#get_analytics-videos-videoid" rel="nofollow noreferrer">video analytics</a> for sessions for user=bob.  Each session will list the videoId, and the start/end time of the session.  Your app logic can decide if enough of the video was watched to unlock the next video.</p>

CC BY-SA 4.0
2020-11-06T07:48:48.983Z
2020-11-06T07:48:48.983Z
Doug Sillars
<p>I am writing a web application with video lessons in sequence. I want to use a streaming service for high availability and compressing content for different viewports. I would like the user to watch a video to unlock the next one. And I would like to monitor the number of views to know when to release the next one. And I would also like to keep the option of releasing the video publicly with those views counting toward the total number of views.</p>
<p>I read about <a href="https://stackoverflow.com/questions/12642980/view-vimeo-private-video-with-an-oauth-token">OAuth on Vimeo</a> and think that something like tokens could work, although I'd also need to make an API call to check if a user with a token did finish watching the video.</p>
<p>Does any video streaming service do such a thing?</p>
<p>(Migrated from <a href="https://webapps.stackexchange.com/questions/143435/video-hosting-with-local-control">WebApps</a> where the question got no answers in one week.)</p>

<streaming>
Video hosting with local control
emonigma
# Video hosting with local control

(Asked by: username_0 on 2020-06-30)

I am writing a web application with video lessons in sequence. I want to use a streaming service for high availability and compressing content for different viewports. I would like the user to watch a video to unlock the next one. And I would like to monitor the number of views to know when to release the next one. And I would also like to keep the option of releasing the video publicly with those views counting toward the total number of views.

I read about [OAuth on Vimeo](https://stackoverflow.com/questions/12642980/view-vimeo-private-video-with-an-oauth-token) and think that something like tokens could work, although I'd also need to make an API call to check if a user with a token did finish watching the video.

Does any video streaming service do such a thing?

(Migrated from [WebApps](https://webapps.stackexchange.com/questions/143435/video-hosting-with-local-control) where the question got no answers in one week.)

**Tags:** streaming


---

## 1 answers

### Answer by username_1 on 2020-11-06. Score: 1

I see 2 things you are trying to achieve here:

1. video is private, but becomes public. at [api.video](https://api.video), we have the concept of private videos - where users must have a one time token to watch. Anyone else using that token will be unable to watch the video. Once you reach your view threshold, you can make the video public - removing this token behavior.
2. Monitoring the views of each user. We have a concept of [dynamic metadata](https://api.video/blog/tutorials/dynamic-metadata) - where you can attach session information to each view. You could track each user's viewing in this way. For example, if you wanted to tag a view as watched by Bob:

   [https://embed.api.video/vod/vi2ZEgTAhfOEeYN7ZnEGsm3i?metadata[user]=bob](https://embed.api.video/vod/vi2ZEgTAhfOEeYN7ZnEGsm3i?metadata%5Buser%5D=bob)

When you load the page of videos - you can query the [video analytics](https://docs.api.video/reference#get_analytics-videos-videoid) for sessions for user=bob. Each session will list the videoId, and the start/end time of the session. Your app logic can decide if enough of the video was watched to unlock the next video.


---

