Skip to main content
Version: Android SDK v1.0.3

Update & Delete Videos

Updating and deleting videos happens through the video store component that you can retrieve with VideoKit.videos(). Just like other network APIs, you will need a valid session to perform these operation successfully. In addition, the current session identity must match the identity of the session who originally created the videos.

Updating videos

To update videos, you need to create an update request:

// Option 1: Simple constructor
val request = UpdateRequest(title = "New Title")

// Option 2: Java-style builder
val request = UpdateRequest.builder()
.title("New Title")
.tags("New Tag")
.metadata("New Key", "New Value")
.location(latitude, longitude)
.build()

// Option 3: Kotlin-friendly builder
val request = UpdateRequest.builder {
title("New Title")
tags("New Tag")
metadata("New Key", "New Value")
location(latitude, longitude)
}

Then, the request must be passed to the video store:

val videos: VideoStore = VideoKit.videos()
videos.update(request).onSuccess {
// Updated!
}.onError {
// Something went wrong
}

Deleting videos

To delete videos, all you need is the id of the video:

val videos: VideoStore = VideoKit.videos()
videos.delete("id").onSuccess {
// Deleted!
}.onError {
// Something went wrong
}