本文介绍了MediaPlayer视频大小Codenameone?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用

String file=Capture.captureVideo();
Media video = MediaManager.createMedia(file, true);
f.addComponent(BorderLayout.CENTER, video.getVideoComponent());
f.revalidate();

尝试在MediaPlayer组件中打开Media时,一旦出现该问题,大多数情况下视频在屏幕上显得太小,有时它会适合表格

and once we do that the problem when we try to open the Media in a MediaPlayer component , the video appear too small for the screen most of the time , and sometime it get fit to the form ,

问题是:如何调整MediaPlayer组件内部的媒体以填充整个表格

the question is : how can I adjust the media inside the MediaPlayer component to fill the whole form

此致

推荐答案

这将在设备(而非模拟器)上运行,但我建议使用此API:

This will work on the device (not simulator) but I would recommend this API:

video.setNativePlayerMode(true);

这篇关于MediaPlayer视频大小Codenameone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 01:55