本文介绍了钛的Andr​​oid远程视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我想扮演的是在我们的网络服务器托管在Android手机上的视频。我已经建立了这个为iPhone和它的伟大工程。

I'm trying to play a video that is hosted on our webserver on an android phone. I've already built this for iPhone and it works great.

Droid的,不过是一个不同的问题。而不是让视频的,我刚开始黑屏,没有错误或任何东西。

Droid, however is a different issue. Instead of getting video, I'm just getting a black screen, no error or anything.

在code我用的是:

activeContent = Titanium.Media.createVideoPlayer({
      的contentURL:内容,
      的backgroundColor:'#111',
      movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT
});

activeContent = Titanium.Media.createVideoPlayer({ contentURL: content, backgroundColor:'#111', movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT});

win.add(activeContent);
activeContent.play();

win.add(activeContent);activeContent.play();

视频我下载不使用钛当上了机器人玩,所以我知道它不是一个格式的问题。 (其柜面任何人的.MP4很纳闷。)

The video I'm downloading does play on the droid when not using Titanium, so I know its not a format issue. (its an .MP4 incase anyone is wondering.)

我从今天早些时候用钛SDK的1.5.1和我对1.6.0的持续构建。

I've used Titanium SDK's 1.5.1 and am on the continuous build of 1.6.0 from earlier today.

,钛开发1.2.2

有没有人对此有什么看法?一个用于Android系统的大卖点是其拉媒体从网络能力,我诚实地有点担心这个缺点如果一个问题有二。

Does anyone have any thoughts on this? One of the big selling points for android is its ability to pull media from the net, and I'm honestly a little concerned about this shortcoming if its an issue with Titanium.

推荐答案

对于Android,视频播放器不应该被添加到窗口。 Android将在新窗口中打开它的视频播放器,当你调用播放()。所以,你的code应改为如下所示:

For Android, the video player should not be added to the window. Android will open its video player in a new window when you call play(). So your code should instead look like this:

activeContent = Titanium.Media.createVideoPlayer({的contentURL:内容的backgroundColor:'#111',movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT});

activeContent = Titanium.Media.createVideoPlayer({ contentURL: content, backgroundColor:'#111', movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT });

activeContent.play();

activeContent.play();

祝福!

这篇关于钛的Andr​​oid远程视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 20:39