cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Getting Streamable URL of Video using API v2 in iOS app

New member | Level 2
New member | Level 2

 

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
Highlighted

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

Dropboxer
Dropboxer
2 Replies 2
Highlighted

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

Dropboxer
Dropboxer
Highlighted

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

New member | Level 2
New member | Level 2
Thank You. The solution is working.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?