Documentation
v0.1.0
iOSAndroidJavaScript

Video Querying Guide

VideoStore is Where it All Starts

To access all videos in the library, we have a class called VideoStore that allows you to query all your videos.

To access anything in the video store you must have a session in place by calling Account.startSession().

You must ensure the connection state is Account.State.CONNECTED. This can be checked through Account.accountState().

Making a Query

To make a query you use the VideoStore.getVideos() call. There you will be returned a VideoPlaylist in the callback.

Queries are made using tags and metadata. Here are some example queries.

Get all videos:

Metadata metaData = new Metadata();
V.videoStore(this).getVideos(new String[]{}, metaData, new Callback<VideoPlayList>() {
    @Override
    public void onCompletion(VideoPlayList playList, @NonNull Err err) {
        if (err.message != null) {
            // Video results is contained in 'playList'
        } else {
            //Handle error
        }
    }
});

Get videos with tags only:

Metadata metaData = new Metadata();
String [] tags = new String[]{"birthday", "outdoor"};
V.videoStore(this).getVideos(tags, metaData, new Callback<VideoPlayList>() {
    @Override
    public void onCompletion(VideoPlayList playList, @NonNull Err err) {
        if (err.message != null) {
            // Video results is contained in 'playList'
        } else {
            //Handle error
        }
    }
});

Get videos with metadata only:

Metadata metaData = new Metadata();
metaData.put("group","private");
metaData.put("selected","true");
V.videoStore(this).getVideos(new String[]{}, metaData, new Callback<VideoPlayList>() {
    @Override
    public void onCompletion(VideoPlayList playList, @NonNull Err err) {
        if (err.message != null) {
            // Video results is contained in 'playList'
        } else {
            //Handle error
        }
    }
});

Get videos with metadata and tags:

String [] tags = new String[]{"birthday", "outdoor"};
Metadata metaData = new Metadata();
metaData.put("group","private");
metaData.put("selected","true");
V.videoStore(this).getVideos(tags, metaData, new Callback<VideoPlayList>() {
    @Override
    public void onCompletion(VideoPlayList playList, @NonNull Err err) {
        if (err.message != null) {
            // Video results is contained in 'playList'
        } else {
            //Handle error
        }
    }
});