使用VideoView流媒体或渐进式下载视频流媒体、渐进式、视频、VideoView

2023-09-12 21:36:20 作者:青春美少女噢耶

我感到困惑VideoView如何可以用来播放视频:从本地文件,作为渐进式下载和流媒体

This例如通过下载该文件,并发挥它在本地工作对我来说(至少在1.5和2.0)。

但是否有必要打之前下载视频:是不是可以播放视频作为渐进式下载,或通过流,只需使用setVideoPath或setVideoURI,如VideoViewDemo的API样品中

在VideoViewDemo code建议使用setVideoURI流媒体,但我并不清楚什么样的URL我应该使用。是否有人有一个例子网址,可以传输到使用VideoViewDemo code Android模拟器的视频?

可渐进式下载与VideoViewDemo使用?我得到使用setVideoPath与正常工作与连接到上面的博客例子网址抱歉,该视频无法播放消息。(这是在模拟器有问题?我已经试过1.5和2.0。)

我发现了很多例子,在线文档,但到目前为止,没有真正回答这个问题。

解决方案   

是它可以播放视频作为   渐进式下载,或通过流,   只需使用setVideoPath或   setVideoURI,如在VideoViewDemo在   API的样本?

应该是的。这当然与工作的MediaPlayer VideoView 只是一个〜200行包装的MediaPlayer SurfaceView

  

在VideoViewDemo code建议使用   setVideoURI流媒体,但我不   明确什么样的URL的应该是我   使用。

的http:// 的rtsp:// 可以正常工作,如果视频是EN codeD正常。

  

是否有人有一个例子网址为   可以传输到视频   使用Android模拟器   VideoViewDemo code?

此视频与的MediaPlayer ,作品除了在了Nexus一。

视频下载工具 Streaming Video Recorder V5.0.6特别版 流媒体下载工具下载

修改:其实,该链接可以与Nexus One的还有

I'm confused about how VideoView can be used to play video: from a local file, as progressive download and streaming.

This example work for me (on 1.5 and 2.0 at least) by downloading the file and playing it locally.

But is it necessary to download the video before playing: is it possible to play video as progressive download, or by streaming, simply by using setVideoPath or setVideoURI, as in VideoViewDemo in the API samples?

The VideoViewDemo code suggests using setVideoURI for streaming, but I'm not clear what kind of URL I should be using. Does someone have an example URL for a video that can be streamed to the Android emulator using the VideoViewDemo code?

Can progressive download be used with VideoViewDemo? I get a 'sorry, this video cannot be played' message using setVideoPath with URLs that work fine with the blog example linked to above.(Is this a problem in the emulator? I've tried 1.5 and 2.0.)

I've found a lot of examples and documentation online but, so far, nothing that really answers this question.

解决方案

is it possible to play video as progressive download, or by streaming, simply by using setVideoPath or setVideoURI, as in VideoViewDemo in the API samples?

It should. It certainly works with MediaPlayer, and VideoView is just a ~200 line wrapper around MediaPlayer and a SurfaceView.

The VideoViewDemo code suggests using setVideoURI for streaming, but I'm not clear what kind of URL I should be using.

http:// and rtsp:// can work, if the video was encoded properly.

Does someone have an example URL for a video that can be streamed to the Android emulator using the VideoViewDemo code?

This video works with MediaPlayer, except on the Nexus One.

EDIT: Actually, that link works with the Nexus One as well.

 
精彩推荐
图片推荐