1
votes

Is there a way to have the video player NOT start playing video the moment it is created, and let the user choose to play it through the native controls?

Container container = new Container(new BorderLayout());
Media video = com.codename1.media.MediaManager.createMedia(url, true);
video.setNativePlayerMode(true);
video.pause(); // <-- not doing anything
container.add(BorderLayout.CENTER, video.getVideoComponent());
1

1 Answers

0
votes

Try the build hint ios.enableAutoplayVideo=false to disable that OS specific behavior on iOS. The pause approach might work after the form is shown and isPlaying() returns true.