Android vimeo video uploading

血红的双手。 提交于 2020-02-23 06:04:21

问题


How to upload video using vimeo SDK com.vimeo.networking:vimeo-networking? In the documentation and example project there is no example how to upload video. Also methods VimeoClient.getInstance().putContent and VimeoClient.getInstance().postContent are not documented. I've implemented method:

        VimeoClient.getInstance().postContent(videoUri, CacheControl.FORCE_CACHE, null, new ModelCallback<Video>(Video.class) {
        @Override
        public void success(Video video) {
            toast("Staff Picks Success! " + video);
        }

        @Override
        public void failure(VimeoError error) {
            toast("Staff Picks Failure :( " + error);
        }
    });

but I'm receiving error when try to upload video. Here is stack trace

W/System.err: java.lang.IllegalArgumentException: url == null W/System.err: at okhttp3.Request$Builder.url(Request.java:121) W/System.err: at retrofit2.RequestBuilder.build(RequestBuilder.java:204) W/System.err: at retrofit2.RequestFactory.create(RequestFactory.java:67) W/System.err: at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:122) W/System.err: at retrofit2.OkHttpCall.enqueue(OkHttpCall.java:58) W/System.err: at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.enqueue(ExecutorCallAdapterFactory.java:57) W/System.err: at com.vimeo.networking.VimeoClient.POST(VimeoClient.java:1167) W/System.err: at com.vimeo.networking.VimeoClient.postContent(VimeoClient.java:1061)


回答1:


The Vimeo Networking library you are referring to does not support upload; a separate upload library will be released at a later date. In order to upload you will need to follow the API documentation yourself.

As the documentation states, it's a several step process. We have simplified the process down to 2 steps, however, it is not yet available to the public. Since there was no open sourced 4 step java library, we are not yet releasing the simplified java version until we open it up to the public, which is different than our iOS counterpart.

Unfortunately for now you will need to follow those API docs if you wish to upload in Android.




回答2:


You can use this library: https://github.com/clickntap/Vimeo It is listed in the https://developer.vimeo.com/api/libraries



来源:https://stackoverflow.com/questions/38311974/android-vimeo-video-uploading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!