小编Yyy*_*Yyy的帖子

Vimeo中的视频上传状态

我正在使用我的应用程序在Vimeo上传视频,但我的一些视频状态没有得到更新 Vimeo网站上的视频截图

我已经关注了此链接中提供的api文档:https://developer.vimeo.com/api/upload/videos:

我使用下面的代码:

public  boolean sendVideo(String file1, String completeURi, String     endpoint, String id) throws FileNotFoundException, IOException {

    File file = new File(file1);

    long contentLength = file.length();
    String contentLengthString = Long.toString(contentLength);
    FileInputStream is = new FileInputStream(file);

    int bufferSize = 20485760; 
    byte[] bytesPortion = new byte[bufferSize];
    int byteNumber = 0;

    while (is.read(bytesPortion, 0, bufferSize) != -1) {
        String contentRange = Integer.toString(byteNumber);
        boolean success = false;
        int bytesOnServer = 0;

        while (!success) {
            long bytesLeft = contentLength - (bytesOnServer); …
Run Code Online (Sandbox Code Playgroud)

vimeo vimeo-api vimeo-android

10
推荐指数
1
解决办法
919
查看次数

标签 统计

vimeo ×1

vimeo-android ×1

vimeo-api ×1