One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
RasiniK
8 years agoNew member | Level 2
Getting Streamable URL of Video using API v2 in iOS app
Using API V2, I am able to get metadata of a video file using the below code:
[[client.filesRoutes getMetadata:entry.pathDisplay includeMediaInfo:[NSNumber numberWithBool:YES] includeDeleted:[NSNumber numberWithBool:NO] includeHasExplicitSharedMembers:[NSNumber numberWithBool:NO]] setResponseBlock:^(DBFILESMetadata * _Nullable result, DBFILESGetMetadataError * _Nullable routeError, DBRequestError * _Nullable error) { NSLog(@"result %@",result); }];
Result is of type DBFILESMetadata and has values like :
{ "client_modified" = "2017-02-14T11:21:12Z"; "content_hash" = 23423424; id = "id:textdata"; "media_info" = { ".tag" = metadata; metadata = { ".tag" = video; dimensions = { height = 1920; width = 1080; }; duration = 90960; "time_taken" = "2017-02-14T10:11:52Z"; }; }; name = "VID_name.mp4"; "path_display" = "/VID_name.mp4"; "path_lower" = "/vid_name.mp4"; rev = 5520cdbb9; "server_modified" = "2017-02-14T11:21:12Z"; size = 195056981; }
Now I need to play this video in AVPlayer. For this, streamable URL for the video needed. How can I get it in API V2?
In API V1, I was getting it using the delegate :
[self.restClient loadStreamableURLForFile:path];
Which method should I use to get URL?
Please help.
I am using Xcode 8.3.2 and language is Objective C.
Thanks
- The equivalent of that in the API v2 Objective-C SDK would be getTemporaryLink:
https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)getTemporaryLink:
- Greg-DB
Dropbox Staff
The equivalent of that in the API v2 Objective-C SDK would be getTemporaryLink:
https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)getTemporaryLink:- RasiniKNew member | Level 2Thank You. The solution is working.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 5 hours ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!