Android: how to play video from assets?

Instead of accessing from assests,You must copy the video into your project’s res/raw folder.
Create raw folder under res folder.
It must be in a supported format (3gp, wmv, mp4 ) and named with lower case, numerics, underscores and dots in its filename likewise:video_file.mp4.

VideoView view = (VideoView)findViewById(R.id.videoView);
String path = "android.resource://" + getPackageName() + "https://stackoverflow.com/" + R.raw.video_file;
view.setVideoURI(Uri.parse(path));
view.start();

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)