android-videoview

How can i change the position of a progressBar, after the duration of a videoView?

对着背影说爱祢 提交于 2020-01-06 09:55:06
问题 i have the following code: final SeekBar videoBar = (SeekBar) findViewById(R.id.videoBar); final VideoView videoView = (VideoView) findViewById(R.id.videoViewPaint); videoView.setVideoPath(videoPath); videoView.start(); videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { long duration = videoView.getDuration(); videoBar.setMax((int) duration); LogService.log("in runnable", "videoView duration= " + videoView.getDuration());

How can i change the position of a progressBar, after the duration of a videoView?

最后都变了- 提交于 2020-01-06 09:54:52
问题 i have the following code: final SeekBar videoBar = (SeekBar) findViewById(R.id.videoBar); final VideoView videoView = (VideoView) findViewById(R.id.videoViewPaint); videoView.setVideoPath(videoPath); videoView.start(); videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { long duration = videoView.getDuration(); videoBar.setMax((int) duration); LogService.log("in runnable", "videoView duration= " + videoView.getDuration());

How can i change the position of a progressBar, after the duration of a videoView?

不问归期 提交于 2020-01-06 09:54:29
问题 i have the following code: final SeekBar videoBar = (SeekBar) findViewById(R.id.videoBar); final VideoView videoView = (VideoView) findViewById(R.id.videoViewPaint); videoView.setVideoPath(videoPath); videoView.start(); videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { long duration = videoView.getDuration(); videoBar.setMax((int) duration); LogService.log("in runnable", "videoView duration= " + videoView.getDuration());

Video plays upside down when recorded from Front Camera in Android

 ̄綄美尐妖づ 提交于 2020-01-05 18:06:23
问题 I am doing android Video Camera Application. It should have capability of recording with back and front camera. I am done with back camera and everything is fine. But when I record with front camera, video plays upside down. I have to play the videos recorded in my application itself. I am using VideoView, How to set orientation or make it play correctly?. Video when played in default media player also playing upside down. Tried sending the video to iPhone and checked but still it plays

android - error using multiple instance of VideoView

戏子无情 提交于 2020-01-05 14:02:18
问题 I want an activity that show two (or more) videoview in a linear layout. Using videoview with local files as datasource all works fine, but using video by stream rtsp I have a Mediaplayer error code like (1,1), usually the first video show correctly and second show error. I try the two stream one at time, and they works, so there aren't format errors. I read something about resource release of mediaplayer (link) , but I need that each real-time video are shown. this is code in my Activity :

Android video view creates a black screen after the video

家住魔仙堡 提交于 2020-01-05 05:08:12
问题 I'm using Android's VideoView for playing locally stored mp4 videos. My app is a hybrid app, i.e. a webview based app, and i'm using native code to play videos. The video plays in the same activity as that of the webview. I'm facing an issue only with Android version 4.0.X. Before starting the video i toggle the visibility of webview and videoview so that webview is invisible and videoview is visible. After the video is over, i reverse this. I still see a black screen over the webview whose

Starting Activity when video is finished playing

六眼飞鱼酱① 提交于 2020-01-04 11:11:13
问题 In my Android app, I am trying to simply go back to my main Activity once a video that I am playing ends. I have tried many workarounds, but I can't find a way to call StartActivity from the video onCompletionListener - I am getting the "cannot make a static reference to the non-static method startActivity(Intent) from the type Activity" error. I tried getting a context from the Activity that preceded the videoView, and passing that to the intent/startActivity. That allowed the app to compile

How to display a video in a CardView on Android?

这一生的挚爱 提交于 2020-01-04 02:28:08
问题 I'm fairly new to Android and I recently added a CardView to my app to display a few text boxes and images, which work just fine. However, when I tried to display a video the card remains empty. Can someone help me understand what am I doing wrong? I've defined the ImageView like so: <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/card_margin" android:layout_marginLeft="@dimen/card_margin" android

Why is the videoview so slow?

别说谁变了你拦得住时间么 提交于 2020-01-03 15:32:18
问题 I put a videoview in my application and it works fine but when you open up the page it take forever for it to load/buffer. Is there anyway I can fix this. I mean it's a 3 second video . It shouldn't take a long time to load. Right? code: package jslsoftware.co.nr; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.widget.VideoView; import android.widget.MediaController; public class videoview1 extends Activity { /** Called when the activity is first

Cannot play RTSP video in VideoView in Samsung Galaxy S2

╄→尐↘猪︶ㄣ 提交于 2020-01-03 12:05:46
问题 I'm trying to play a live RTSP video (from rtsp://media2.tripsmarter.com/LiveTV/BTV/ ) using VideoView , and here's my code: public class ViewTheVideo extends Activity { VideoView vv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); vv = (VideoView) this.findViewById(R.id.VideoView); Uri videoUri = Uri.parse("rtsp://media2.tripsmarter.com/LiveTV/BTV/"); vv.setMediaController(new MediaController(this)); vv