यह मेरा कोड है, लेकिन जब मैं मेडियाप्लेयर शुरू करता हूं तो इसमें केवल ध्वनि आती है और सतह को कुछ भी नहीं दिखाया जाता है। क्यूं कर?वीडियो प्ले करें जब वीडियो usinng mediaplayer
मुझे इस पर कोई जानकारी नहीं है। क्या आपके पास कुछ कोड है जो मुझे इसके साथ सीखने में मदद करता है।
videoV = (SurfaceView) findViewById(R.id.SurfaceView1);
sh = videoV.getHolder();
File path = Environment.getExternalStorageDirectory();
File file = new File(path, "sample2.mp4");
sh.addCallback(this);
mp = new MediaPlayer();
mp.setDataSource(file.getAbsolutePath());
mp.setDisplay(sh);
mp.prepare();
mp.start();
हनीकॉम के रूप में विधि सेट टाइप को बहिष्कृत किया गया है। –