Get Video Details From Vimeo iOS SDK Once Uploaded?

685 Views Asked by At

I have used VimeoUpload SDK in My App to upload videos and its working fine.

During Development I noticed that the SDK created upload URL has a video_file_id and it does not match with the video_id once upload is completed.

SDK generated URL :

https://1511928471.cloud.vimeo.com/upload?ticket_id=59821e7edc5840322fc360b63d9414c7_45995664&video_file_id=520623428&signature=ec0ce3b5852802957cc1e19c2cccbfa8&v6=1

How can I get the video details of last uploaded video in Vimeo?

2

There are 2 best solutions below

0
On

Great question, from the reply to the Github issue you filed:

You can get the video object associated with the file you just uploaded in three ways:

  1. The video object is returned in the "activate" response. This request is made by the OldUploadDescriptor as soon as the file upload completes. Check out the .Activate case here. Actually, now that I'm writing this, the video object might actually come back in the .Settings response. Either way the example of how to do this is at the same link above.

  2. You can also request a video object separately from anything related to the upload flow by making a GET request to the video's uri. The VideoOperation class contains an example of this.

  3. You can also access the video.uri and entire video object on the descriptor itself (once the upload is complete). Look here.

Let us know if you have other questions (I'm an author of the library).

0
On

Yes it is worked correctly. I can get the video url at .Settings case after upload the video. In the .Activate case, I could only get like https://1511928471.cloud.vimeo.com/upload?ticket_id=59821e7edc5840322fc360b63d9414c7_45995664&video_file_id=520623428&signature=ec0ce3b5852802957cc1e19c2cccbfa8&v6=1.

but in the .Settings case, I could get videoUrl

Thanks, Alfie Hanssen.