نوشته شده توسط : dotnek

Videos can be found in files such as source files, is files that are traced to raw folders or subfolders of these folders, video files that are placed on a memory card and used for display, such as files that It can be used to display online, which can also be accessed via URL. So, in this tutorial we want to tell you how to display different types of video files on Android systems . It is recommended that you follow this tutorial.

Introducing VideoView on Android

- SetVideoUri () and setVideoPath () methods:

It should be noted that these methods are used to specify the video address.

- Pause () method:

This method is also used to stop the video that is playing.

- CanPause () method:

It should be noted that this method is also used to determine whether or not the video can be stopped. In other words, this method is used to check whether the playing video can be stopped or not. The output and result of this method is true or false, which is the result of checking whether the playing video can be stopped or not.

- SeekTo (int millisecond) method:

Using this method, you can specify from which part and which second the video will start playing. In other words, using this method, we specify from which part the video will start playing.

- Resume () method:

We also use this method to start playing the video we stopped before from there.

- StopPlayback () method:

This method also issues a command to stop the video. In fact, the main command issued to pause the video is done by this method.

- CanSeekForward () method:

It should be noted that this method also checks whether it is possible for the video to jump forward. In other words, this method is used to check if the videos can be thrown forward. The result of this method is true or false, which will tell whether it is possible to jump forward in this video or not.

- CanSeekBackward () method:

This method also checks whether the video has the ability to go back. This method will display the true and false results. Because it checks whether the video can go back or not. If it is not possible to go backwards it will show false and if it is possible to go backwards it will show true as output.

- GetDuration () method:

This method is also used to get the duration of the video. In other words, the output of this method will be the video duration.

- IsPlaying () method:

This method will also check if the video is playing. Like other methods, the output of this method will be true or false because it checks whether the video is playing or not, and if the video is playing, it will show the output is true and otherwise false.

- SetOnPreparedListener method (MediaPlayer.OnPreparedListener):

This method has many uses and can be used in different places and some settings that we want to give to videos can be done using this method. 

Read more on:https://www.dotnek.com/Blog/Apps/how-to-display-video-files-on-android-systems

link:https://dotnek.mystrikingly.com/

Related link:DotNek app programming





:: بازدید از این مطلب : 90
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : دو شنبه 18 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: