cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Getting Streamable URL of Video using API v2 in iOS app

Getting Streamable URL of Video using API v2 in iOS app

RasiniK
New member | Level 2
Go to solution

 

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

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
2 Replies 2

Greg-DB
Dropbox Staff
Go to solution
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:ob...:

RasiniK
New member | Level 2
Go to solution
Thank You. The solution is working.
Need more support?