0

I am attempting to create a VideoPlayer demo for Android using the VideViewDemo from the SDK.

I have found a sample video online - both 3gp and mp4. Using the code sample from the SDK, these videos play without issue on the device (in this case it is Google TV).

To clarify, in the code, this value is set:

private String path = "http://commonsware.com/misc/test2.3gp";

If I download those samples and save them to a local IIS instance on my machine, the same VideoPlayer demo will not play the clip.

Here are the settings for the IIS 7 web site and the video files contained within it:

  • Anonymous authentication - enabled

  • Permissions - Everyone/Full control (just to eliminate any permission issues); IIS_IUSRS (read/write, list and read)

I can open these files via a browser - no problem.

As soon as I attempt to play them through the Android app, the app will sit there for several minutes and then a dialog will appear with the error: "Cannot play video - Sorry, this video cannot be played".

I am on an internal network, but my machine IP and the Google TV IP are on the same segment - 10.4.48.229 and 10.4.48.165, respectively.

DDMS has very little info:

12-16 16:35:38.237: D/MediaPlayer(6687): Couldn't open file on client side, trying server side
12-16 16:37:46.361: E/MediaPlayer(6687): error (0, 0)
12-16 16:37:46.361: E/MediaPlayer(6687): Error (0,0)
12-16 16:37:46.361: D/VideoView(6687): Error: 0,0

What I know:

  • The sample code works

  • Both 3pg and mp4 are set as valid MIME Types in IIS (.3gp-video/3gpp and .mp4-video/mp4)

  • The sample video files work in the Android app when accessed from their source location

  • The sample video files work in the browser when accessed from their source location

  • The sample video files DO NOT work in the Android app when access from the local IIS web server

Is there something going on with IIS? With Windows firewall? I'm at a loss as to why this won't work...in my mind, it has to be something with IIS, but I don't know what. I've tried to put the video files on another web server, but all of our servers are HTTPS, which fails immediately in the Android app.

Any advice/direction would be greatly appreciated.

Kyle
  • 606
  • 5
  • 16

1 Answers1

0

I tried various HTTP servers and many of them did not work with the media player on Google TV. This one did work:

http://code.google.com/p/wireme/source/browse/src/com/wireme/mediaserver/HttpServer.java?r=b0db9c440b168cd50ca74fb2bec86feea587d4d9

Leon Nicholls
  • 4,623
  • 2
  • 16
  • 17
  • I've managed to get it working on a Windows 2000 server running standard install of IIS, so it should be possible on Win7 with IIS without having to setup/use a separate HTTP server. – Kyle Dec 19 '11 at 13:53