can't play a video on android
in
Android Processing
•
7 months ago
Hii...
I am trying to play a video on my android device. I uploaded the program successfully on my android device but when i tried to play that, it shows me
"cannot play video"..
.I am using window XP, processing 2.0b6 and video is in data folder of processing sketch.
Here is my code
- import apwidgets.*;
- APVideoView videoView;
- APWidgetContainer container;
- void setup()
- {
- container = new APWidgetContainer(this); //create a new widget container
- videoView = new APVideoView(10, 50, 1200, 780, false); //create a new video view, without media controller
- videoView.setVideoPath("/sdcard/VID-WA0000.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(255); //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
- }
Need your valuable suggestions
Thanking you in anticipation
1