Master programming and take your career to new heights with clear, concise C, Android, and Web Development courses for just Rs. 999 / $ 12. Get lifetime access and certificate. Click here to enroll: courses.sandipbhattacharya.com/s/store
Thank you for your useful video. I am trying to get the video in my app to play, but it's not working. Error on Logcat says: E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
@@SandipBhattacharya Appreciate the quick response! I've switched it out for a shorter video (just 3 mb) and this is what logcat says: E/GraphicExt: GraphicExtModuleLoader::CreateGraphicExtInstance false
Follow the instructions. I've tested the code and it works for me. In the class scope declare a MediaController object reference. MediaController mediaController; Instantiate mediaController and write other necessary codes in onCreate(). In the same Activity, write: @Override public void onBackPressed() { mediaController.setVisibility(View.GONE); super.onBackPressed(); } Hope that helps!
Hello, Using the RUclips share link you can only get the link pointing to the actual video file and not the file itself. Now, if you want to embed RUclips video in your android app, you can explore following options. 1. Using WebView 2. Using RUclips Android Player API
Friend, could you add a filter of intentions so that the application comes out with other applications when opening it from the option to open with this application and is more complementary?
Hi Emna, thanks for asking a question. Follow the steps. Step 1: Remove or comment following 3 lines. MediaController mediaController = new MediaController(this); mediaController.setAnchorView(videoView); videoView.setMediaController(mediaController); Step 2: Start the video. videoView.start(); Step 3: Attach OnPreparedListener with videoView and set the Looping. videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { mp.setLooping(true); } }); Hope that helps!
Try setting volume of media player. You can do this by first setting OnPreparedListener() on videoView object and then in onPrepared(MediaPlayer mediaPlayer) method set desired volume mediaPlayer.setVolume(0, 0); If this doesn't solve the problem then you might have problem with codecs. Try with another video.
Master programming and take your career to new heights with clear, concise C, Android, and Web Development courses for just Rs. 999 / $ 12. Get lifetime access and certificate. Click here to enroll: courses.sandipbhattacharya.com/s/store
What a lovely apperance! Love u
Thank you for your useful video. I am trying to get the video in my app to play, but it's not working. Error on Logcat says: E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
Try with a short .mp4 file.
@@SandipBhattacharya Appreciate the quick response! I've switched it out for a shorter video (just 3 mb) and this is what logcat says: E/GraphicExt: GraphicExtModuleLoader::CreateGraphicExtInstance false
Better to split your video into different files whose size will be less than 2MB, put inside the raw folder, and use from them.
Tnx
You're welcome.
Thnk sir...
You are welcome. 🙂
Muchas gracias , mejor que otro video que ya habia visto.
@Oscar Leon, gracias! 😀
A good Job Bro But I have a question, how can the video automatically repeat when the video is over? thankyou
Check the comments for answer.
This video is really helpful
Thank you. 😊
Thank you so much for this kind of tutorial!!
You are so welcome!
Can you show how to play many videos not one please
Will try.
its saved my time thanks
Thanks for your kind words. 😊
Bro.. How run a video in card view? Or how to add videos in grid lay out please make video on this thanks
Sure 👍
Hai sir , how to write code for video particular time limit , like 30sec or 30mintes.
You can use a CountDownTimer for this.
Very helpful!
Glad you think so! 😀
How can I hide the controller video when pressing the back button?
You mean, how can you hide the controller when pressing the back button?
@@SandipBhattacharya yes
Follow the instructions. I've tested the code and it works for me.
In the class scope declare a MediaController object reference.
MediaController mediaController;
Instantiate mediaController and write other necessary codes in onCreate().
In the same Activity, write:
@Override
public void onBackPressed() {
mediaController.setVisibility(View.GONE);
super.onBackPressed();
}
Hope that helps!
@@SandipBhattacharya thanks
@@مصطفىالمحمود-ن8ب You're most welcome!
i have a question, how make video in fullscreen?
Hey, I made a video on that a few days back. Check this out:
ruclips.net/video/B1s2GFI-1H0/видео.html
I hope you find this useful!
is there anyway to loop the video, thanks?
Try this.
Declare this in class scope:
VideoView videoView;
In onCreate(), write:
VideoView videoView = findViewById(R.id.videoView);
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
videoView.setVideoPath("android.resource://"+getPackageName()+"/"+ R.raw.sandip);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
videoView.setMediaController(mediaController);
videoView.start();
Hope that helps!
How can we upload video through database
thks bro!
You're welcome! 🙂
How to downLod video in apl
Like youtube share link
Any method in android studio ???
Hello,
Using the RUclips share link you can only get the link pointing to the actual video file and not the file itself. Now, if you want to embed RUclips video in your android app, you can explore following options.
1. Using WebView
2. Using RUclips Android Player API
sorry, but my video cannot play. why ?
What's the error message you're getting in Logcat?
hello brother what about full screen
pleas make a video how to do that
Coming soon.
@@SandipBhattacharya Thanks
Hey, I made it. If you're still looking, check this out:
ruclips.net/video/B1s2GFI-1H0/видео.html
Friend, could you add a filter of intentions so that the application comes out with other applications when opening it from the option to open with this application and is more complementary?
Hi @Robotics Mex, thanks for asking a question. I'll definitely try to make a tutorial on this. :)
Thanks !!!
You're welcome!
Thanks dude I'm using Kotlin but Java is understandable to me
Glad I could help
how can i remove the mediacontroller and display the video on loop ?
Hi Emna, thanks for asking a question. Follow the steps.
Step 1: Remove or comment following 3 lines.
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
videoView.setMediaController(mediaController);
Step 2: Start the video.
videoView.start();
Step 3: Attach OnPreparedListener with videoView and set the Looping.
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
Hope that helps!
@@SandipBhattacharya yeeees :D it works perfectly
thank you
Thank you so much! 😀
Always Be Creating.
Good day sir can i add scroll view in video view layout?
Hi Jevan, I am not sure about using ScrollView in VideoView.
How about full screen ???
Sure, I'll try to create a tutorial on that.
@@SandipBhattacharya ok❤
Hey, I made a video on that a few days back. If you still looking for it, check this out:
ruclips.net/video/B1s2GFI-1H0/видео.html
How could I play all videos from my Server !!!
Hi @Rajat, I'll try to make a video on that.
'cant play this video' error when i run the app inspite doing every step u did :( any solution ??
Try using a small size video.
And, try this code:
setContentView(R.layout.activity_main);
VideoView videoView = findViewById(R.id.videoView);
String uriPath = "android.resource://"+getPackageName()+"/"+R.raw.sandip;
Uri uri = Uri.parse(uriPath);
videoView.setVideoURI(uri);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
videoView.setMediaController(mediaController);
videoView.start();
Hi i did the same code but audio is not coming can u please help me
Hi Surya, have you checked your emulator's audio level?
@@SandipBhattacharya yes volume is up and when i run the audio app audio is coming but no audio from video view
Share your code so that I can check.
@@SandipBhattacharya same as u r code
Try setting volume of media player. You can do this by first setting OnPreparedListener() on videoView object and then in onPrepared(MediaPlayer mediaPlayer) method set desired volume mediaPlayer.setVolume(0, 0);
If this doesn't solve the problem then you might have problem with codecs. Try with another video.
Bro audio not coming from video view can u help
Pls check your emulator's audio level first. The level may be zero by default.
@@SandipBhattacharya i have tried installing in my device too same issue
You may email me your source code so that I can have a look.
Check out the latest app and see for any improvements: ruclips.net/video/B1s2GFI-1H0/видео.html
Bro how to do full screen
Coming soon
Hey, I made it. If you're still looking, check this out:
ruclips.net/video/B1s2GFI-1H0/видео.html
how can i add video into fragment ?
Same problem, any answer ? 😭
ko tao raw dc
Hii, sir
Mein Apko contact Karna chahatahun apka email address mil Sakta hai kya???
Please reply me sir ?
Pls check the About section of this channel for contact details.
@@SandipBhattacharya sir email nahi hai check Kiya tha