package com.sheep.gamegroup.util;

import android.net.Uri;

import com.danikula.videocache.file.FileNameGenerator;

/**
 * Created by realicing on 2018/11/15.
 * realicing@sina.com
 */
public class MyFileNameGenerator implements FileNameGenerator {
    @Override
    public String generate(String url) {
        Uri uri = Uri.parse(url);
        String lLastPathSegment = uri.getLastPathSegment();
        return FileUtil.getFileName(lLastPathSegment, "mp4");
    }
}
