Android Vimeo视频上传

编程入门 行业动态 更新时间:2024-10-08 19:48:41
本文介绍了Android Vimeo视频上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何使用vimeo SDK com.vimeoworking:vimeo-networking上传视频? 在文档和 example 项目中,没有示例如何显示上传视频.此外,方法VimeoClient.getInstance().putContent和VimeoClient.getInstance().postContent也未记录.我已经实现了方法:

How to upload video using vimeo SDK com.vimeoworking: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:位于okhttp3.Request $ Builder.url(Request.java:121) W/System.err:在retrofit2.RequestBuilder.build(RequestBuilder.java:204) W/System.err:在retrofit2.RequestFactory.create(RequestFactory.java:67) W/System.err:在retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:122) W/System.err:位于retrofit2.OkHttpCall.enqueue(OkHttpCall.java:58) W/System.err:位于retrofit2.ExecutorCallAdapterFactory $ ExecutorCallbackCall.enqueue(ExecutorCallAdapterFactory.java:57) W/System.err:在com.vimeoworking.VimeoClient.POST(VimeoClient.java:1167) W/System.err:位于com.vimeoworking.VimeoClient.postContent(VimeoClient.java:1061)

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.vimeoworking.VimeoClient.POST(VimeoClient.java:1167) W/System.err: at com.vimeoworking.VimeoClient.postContent(VimeoClient.java:1061)

推荐答案

您所指的Vimeo网络库不支持上传;一个单独的上传库将在以后发布.要上传,您需要自己遵循API 文档.

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.

如文档所述,这是一个分几个步骤的过程.我们已将过程简化为2个步骤,但是尚未向公众公开.由于没有开源的4步Java库,因此在向公众开放之前,我们尚未发布简化的Java版本,这与我们的 iOS对应版本.

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.

不幸的是,如果您现在想在Android中上载,则需要遵循这些API文档.

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

更多推荐

Android Vimeo视频上传

本文发布于:2023-11-26 18:46:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634746.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上传   视频   Android   Vimeo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!