Hi,
I use the code below to play a video from URL. It work on the simulator but
does not work on android device (xperia z3+)?
The code :
protected void postTestForm(Form f) {
try {
Media media;
media =
MediaManager.createMedia("http://178.128.204.162:3000/images/Lcode.maSpotMoutadaribine.mp4",
true);
if (media.isNativePlayerMode()) {
media.setNativePlayerMode(true);
}
findCntVideoF().addComponent(media.getVideoComponent());
media.play();
Timer t = new Timer();
TimerTask ta = new TimerTask() {
public void run() {
media.pause();
}
};
t.schedule(ta, 6000);
} catch (Exception ex) {
Dialog.show("Video Error", ex.getMessage(), "Ok", "Cancel");
}
}
Kind regards,
IDE: NetBeans 12
Desktop OS
Simulator
Device
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/887cf3da-8aa4-4262-b896-6b3e8f94cb2do%40googlegroups.com.