We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want control size that video view container but i don't know How to control video view container size
Source code
import apwidgets.*;
APVideoView videoView;
APWidgetContainer container;
void setup()
{
container = new APWidgetContainer(this); //create a new widget container
videoView = new APVideoView(10, 50, 240, 180, false); //create a new video view, without media controller
//videoView = new APVideoView(false); //create a new video view that fills the screen, without a media controller
//videoView = new APVideoView(); //create a new video view that fills the screen, with a media controller
videoView.setVideoPath("/sdcard/inthehouse.mp4"); //specify the path to the video file
container.addWidget(videoView); //place the video view in the container
videoView.start(); //start playing the video
videoView.setLooping(true); //restart the video when the end of the file is reached
}
void draw()
{
background(0); //black background
text(videoView.getDuration(), 10, 10); //display the length of the video in milliseconds
text(videoView.getCurrentPosition(), 10, 30); //visa hur långt videon spelats
}
void keyPressed() {
if (key == CODED) {
if (keyCode == LEFT) {
videoView.seekTo(0); //"rewind"
}
else if (keyCode == RIGHT) {
videoView.start(); //start playing video file
}
else if (keyCode == DPAD) {
videoView.pause(); //pause the playing of the video file
}
else if (keyCode == DOWN) {
videoView.setVideoPath("sdcard/VIDEO0001.3gp"); //switch to other video file
}
}
}
Answers
do you solve that problem? i got same problem :(
please, tell me if you solve that.
No...
but I get some hint. android video container size be effected by video size