在 Android 上从服务器访问视频
我们正在尝试将一些媒体文件从应用程序移动到服务器,但我们似乎无法弄清楚。我创建了一个视频,将其嵌入到我的应用程序中,并且播放得很好。所以我将相同的视频文件发送给某人并放在服务器上。然后,我转到浏览器并输入“http://www.server.com/Android-app/testVideo.mp4”,然后收到一条错误消息:“抱歉,该视频无法流式传输到此设备。”我正在使用三星时刻。所以我认为服务器出了问题。但该视频确实可以在某人的 Droid 上运行,因此这听起来像是手机兼容性问题。但这与之前在手机上运行的文件完全相同。
是否有需要更改的设置(在电话或服务器上)?从那以后我就做不到了。感谢您的任何帮助。
We are trying to move some of our media files from our application to a server, but we can't seem to figure it out. I created a video, embedded it in my app, and it played fine. So I sent that same video file to someone to put on the server. I then went to my browser and typed in "http://www.server.com/Android-app/testVideo.mp4" and I get an error saying "Sorry, this video is not valid for streaming to this device." I am using a Samsung Moment. So I was thinking it was something wrong with the server. But the video does work on someone's Droid, so that makes it sound like a phone compatibility issue. But it is the exact same file that worked on the phone earlier.
Is there a setting (on phone or server) that needs to be changed? I just can't make since of it. Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您还没有真正提供足够的详细信息来给出明确的答案,但我要做的第一件事是检查响应标头中的内容类型。
You haven't really given enough details to give a definitive answer, but the first thing I'd do would be to check the Content-Type in the response header.