android-videoview

IllegalStateException in VideoView's MediaPlayer.prepareAsync() from Expansion File

别说谁变了你拦得住时间么 提交于 2019-12-24 04:32:07
问题 I have an Expansion File (zip) full of mp4 videos that I'd like to play with the VideoView. When calling videoView.setVideoURI() it throws and IllegalStateException (prepareAsync called in state 1) in my VideoView's openVideo(). I retrieve the URI to the video from an extended APEZProvider class. The expansion file got packed like below and renamed to "main.3.com.my.application.obb" zip -r -0 [desiredZipFileName.obb] [folderWithVideos] VideoView: Uri uri = ExpansionAPEZProvider.buildUri("vid

get path of video file selected from gallery getting NULL. How to get path of video file?

本小妞迷上赌 提交于 2019-12-24 02:14:05
问题 get path of video file selected from gallery getting NULL . How to get path of video file ? Get URi in Activity Result also give null. converting Uri to String also getting Null . Intent intent; String selectedVideo1Path, selectedVideo2Path; EditText e1,e2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.videos_activity); Button button1 = (Button) findViewById(R.id.video1_btn); Button button2 = (Button) findViewById(R

[Java]Android Videoview works only with local files

对着背影说爱祢 提交于 2019-12-23 19:25:47
问题 I tried to play a video from a url, but only local videos works in my code. If I try to open a video from a url my nexus 7 displays Can not play this video. Here is the code for the playback of a local file, it works fine (both are the same videos) package com.sample.prog; import java.io.File; import android.app.Activity; import android.os.Bundle; import android.os.Environment; import android.widget.VideoView; import android.net.Uri; public class MainActivity extends Activity { static private

Setting background colour for VideoView hides the video

拜拜、爱过 提交于 2019-12-23 13:19:12
问题 I am using a VideoView in my app and when I set the background colour with either the layout properties, or in the code itself, the background colour is laid over the top of my video and I cannot see it. 回答1: VideoView extends SurfaceView , which relies on PorterDuff.Mode.CLEAR to cut a hole in the view hierarchy so that you can see a native rendering surface underneath. If you make it fill itself back in with a solid color, you will not be able to see the video. While the video is playing,

How do I not recycle only the first 2 views of my recyclerview or any items?

冷暖自知 提交于 2019-12-23 13:06:42
问题 I am using a recyclerview for displaying and broadcasting videos of users. However, when I scroll through the recycler view, I see my first view, which has my video gets recycled hence why it's not visible to other users. Is there a way I can make sure that the first view is not recycled so I dont have to worry about my video view getting resetrecycled every single time I scroll through my list? Here's my code : In my fragment... ... <android.support.v7.widget.RecyclerView android:id="@+id

Play two videos in one VideoView at the same time

有些话、适合烂在心里 提交于 2019-12-23 10:49:42
问题 This is not a question about playing two separate videos in two separate VideoViews on the one activity. I have been asked to see if it is possible to create an activity with a single VideoView. When the user opens the Activity, they are asked to select a base video and then select a second video. Both videos will be playing in the one VideoView at the same time, but the base video will have an alpha of 255 and the second video will have an alpha of 150. For testing though, video files

Strange Behavior - VideoViewer Fragment not working with MediaController

拜拜、爱过 提交于 2019-12-23 07:59:09
问题 I am trying to create a VideoViewer fragment. Below are the 2 cases I have tried and the observations. For both the cases the fragment's view is inflated from the following layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center"> <VideoView android:id="@+id/fragment_video_viewer_video" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout

Android videoview mediacontroller pause or play button

馋奶兔 提交于 2019-12-23 03:49:14
问题 My video works fine but i cant controll it. I cant see play or pause button.i need play or pause button .mediaController not working fine. i using this codes import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.view.Display; import android.view.WindowManager; import android.widget.MediaController; import android.widget.VideoView; public class avid extends Activity { private String path = "http://techslides.com/demos/sample-videos/small.mp4"; private

video & image viewPager

耗尽温柔 提交于 2019-12-23 02:22:40
问题 I have a problem in my code can anyone help me? I need to make app play story like Messenger app I want to display a list of images and videos in viewpager automatically or manually I do it but I faced some problem First: when page of image is view and the next page play video the sound of video is playing when view the image because the pager load the next fragment i used mViewPager.setOffscreenPageLimit(0); but i didn't do any thing Second one: when I move manually from video to image the

android media player not working

孤街醉人 提交于 2019-12-22 18:27:24
问题 I'm trying to develop an app that has many videos embedded in it, and I'd like to call Android's Media Player, with the video on VideoView object. However, i get these strange errors: I/MediaPlayer( 2874): Info (1,26) E/MediaPlayer( 2874): Error (-4,-4) D/VideoView( 2874): Error: -4,-4 when i try to play a mp4 video, or another 3gp video that is not recorded from my phone. My code is something like: import android.app.Activity; import android.os.Bundle; import android.util.Log; import android