switching between videos, two surfaceView

All your problems with Audio, Video and Images.

switching between videos, two surfaceView

Postby raski » Tue Aug 16, 2011 4:17 pm

Firstable: hello to all!

I'm developing app, which display movies from the Web. I have to display midroll ad. I can't use one surfaceView, because when I call release on MediaPlayer (in order to display ad), buffer of main movie is lost.

I've found that thread:
sharing_a_surfaceview_between_2_mediaplayer-t6766.html

In most of devices that solution work great, but I have one device that display only black screen (sound is ok, in native player movie is displayed well).

Resizing surfaceViews is very simple:
Code: Select all
private final LayoutParams max = new AbsoluteLayout.LayoutParams(200, 200, 0, 0);
private final LayoutParams min = new AbsoluteLayout.LayoutParams(1, 1, 1, 1);
surface[0].setLayoutParams(min);
surface[1].setLayoutParams(max);


Here is simple app to test that thing:
http://dl.dropbox.com/u/4904006/VideoTest.zip
(you have to put mp4 and 3gp files on sdcard and click Play in order to switch videos)

All help will be appreciated. I will be also grateful if you test apk on your device and comment if everything is working + info about device (model, soft).
raski
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Aug 16, 2011 3:46 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 8 guests