android-video-player

Exoplayer error in Recyclerview, Source error None of the available extractors

假装没事ソ 提交于 2020-04-13 08:06:12
问题 I am using ExoPlayer to stream videos in a RecyclerView. I am implementing the ExoPlayer inside my RecyclerView Adapter's bind method inside my ViewHolder. The video format I am using is m3u8 and the URL I am using works in a browser. So I know that the video link is valid. I've also testing a youtube link in there. Here is the code from the Recyclerview adapter's ViewHolder -> class ViewHolder private constructor(val binding: FeedRowBinding) : RecyclerView.ViewHolder(binding.root) { fun bind

Exoplayer error in Recyclerview, Source error None of the available extractors

回眸只為那壹抹淺笑 提交于 2020-04-13 08:06:09
问题 I am using ExoPlayer to stream videos in a RecyclerView. I am implementing the ExoPlayer inside my RecyclerView Adapter's bind method inside my ViewHolder. The video format I am using is m3u8 and the URL I am using works in a browser. So I know that the video link is valid. I've also testing a youtube link in there. Here is the code from the Recyclerview adapter's ViewHolder -> class ViewHolder private constructor(val binding: FeedRowBinding) : RecyclerView.ViewHolder(binding.root) { fun bind

VideoView & Fullscreen & Orientation changes - Android

让人想犯罪 __ 提交于 2020-01-11 05:08:57
问题 I implemented a e-Reader that has embedded video players on it, I need a option to toggle fullscreen mode from the player. My question is the following: Which is the best way to play a video on fullscreen and let the user come back from this state to the page he is reading before and also keep the current time of the video. Another complicated situation I need to handle is: There's different visualizations of a page on portrait and landscape, if the user toggle fullscreen on portrait and

Problem with audio while recording video

妖精的绣舞 提交于 2020-01-03 00:54:11
问题 I am able to record video but I am not getting audio for that video. Can any one help me to record video&audio at same time. my code is as follows: mr = new MediaRecorder(); mr.setAudioSource(MediaRecorder.AudioSource.MIC); mr.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); mr.setVideoSource(MediaRecorder.VideoSource.DEFAULT); mr.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); mr.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP); mPreview = new Preview(RecordVideo.this,mr);

Exit Full Screen Video Mode on Back Press

最后都变了- 提交于 2020-01-02 15:24:07
问题 I just started with this GMF example provided by Google. I would like to know How can I Exit Full Screen Video Mode by doing tap on back button, I tried using below code, but did not get any success, here you can see the actual code of MainActivity.java boolean isFullScreen = false; // globally declared @Override public void onGoToFullscreen() { isFullScreen = true; videoListView.setVisibility(View.INVISIBLE); } @Override public void onReturnFromFullscreen() { videoListView.setVisibility(View

How to start(play) video once buffer reaches 20% in android video view

十年热恋 提交于 2020-01-02 04:11:11
问题 I have a video view to play video by using url which comes from server. I want video to be played once buffering reaches 20% . So i have added listener for setOnBufferingUpdateListener to mediaplayer like below. Uri video = Uri.parse(videoUrl); videoView.setVideoURI(video); videoView.requestFocus(); videoView.setOnPreparedListener(new OnPreparedListener() { public void onPrepared(MediaPlayer mp) { mp.setOnBufferingUpdateListener(Activity); progressVideoView.setVisibility(View.GONE); videoView

Check if android device support 4K video?

倾然丶 夕夏残阳落幕 提交于 2019-12-30 08:19:06
问题 I am trying to play a 4K video in my application, but as long as all devices can not play 4K videos I'm having some troubles. How can I check at runtime if that device support it or not before playing the video? 回答1: First of all, you have to remember 4k is just a resolution, but you have to also remember about bitrate. Here's a method to test whether resolution/bitrate combination is achievable on a certain device: boolean areSizeAndRateSupported (int width, int height, double frameRate)

stream live video to Android

强颜欢笑 提交于 2019-12-28 08:08:16
问题 How can I stream live video to Android (2.1 and higher), I have two links: m3u8 and f4m (As I know, f4m is not supported). From what I saw on stackoverflow, there is a way to stream m3u8 with vitamio (but the link is not working ). Is there any other way to stream m3u8 video ? Maybe there is other format that I can use ? Thanks. 回答1: Because no one answered my question, I will do it myself. If you want to perform HLT (HTTP Live Stream) on Android 2.1 and higher you may use the vitamio library

How to play YouTube video in Android native player?

北城以北 提交于 2019-12-25 04:34:24
问题 How to play YouTube video in Android native player? If any one achieved this please let me know the way. 回答1: http://apiblog.youtube.com/2012/12/no-webview-required-with-native-youtube.html maybe this link will be of some assistance ? There are various API's out there that can achieve this for you. API, an abbreviation of application program interface, is a set of routines, protocols, and tools for building software applications. A good API makes it easier to develop a program by providing

Using large number of videos in android application

回眸只為那壹抹淺笑 提交于 2019-12-24 17:16:57
问题 I want to use videos in my android application. There are 80 videos (total size 700MB), so how will I use them in android application? What will I have to do if I want to use videos with total size as mentioned above? Where I need to store large video files in android? In Listview one item 10 videos I want to show these videos in GridView. I want to read 10 video for one item in my LIstView like each item 10 videos I want to read in my application. It's a stand alone application we are not