android-videoview

Android VideoView not playing sequential videos

試著忘記壹切 提交于 2019-12-21 05:04:38
问题 I want to play 2 videos in a row. The first video always plays just fine. After it finishes, you can see in the log that it sets the new video URL, but then SurfaceView throws an error and the VideoView just freezes with the last frame of the first video. Nothing else happens. Any thoughts ? Thanks ! LE: Surprisingly, the OnPreparedListener gets called for the second video. LE2: Sometimes the second video plays just fine, sometimes it doesn't... and I haven't changed a line of code between

Disable Android's VideoView requestAudioFocus when playing a video?

断了今生、忘了曾经 提交于 2019-12-21 03:36:07
问题 I'm building an app that records and plays back video. I would like to do so without affecting background music playback, i.e. if I begin playing a video, I do not want to pause other apps' audio. However, on Lollipop, Android's VideoView class automatically requests audio focus when the private method VideoView.openVideo() is called: AudioManager am = (AudioManager) super.getSystemService(name); am.requestAudioFocus(null, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); Any

Video Frame by Frame seeking

左心房为你撑大大i 提交于 2019-12-21 01:58:12
问题 Is there a way to step through a video file frame by frame? I've tried using a VideoView and I've had minor success. I can get the video the step through key frames but not individual frames. I figured this would be the default settings, especially with the way video compression works. Is there a way to override this default behavior or a configuration I can change? 回答1: The default behaviour in stagefright media framework is always to seek to key frame. (As opposed to the earlier framework's

Why VideoView in android is taking too much time to load and play the video from http link?

∥☆過路亽.° 提交于 2019-12-20 18:26:25
问题 Below is my Code : package com.example.videoplayer; import android.app.Activity; import android.app.ProgressDialog; import android.media.MediaPlayer; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.widget.MediaController; import android.widget.VideoView; public class VideoPlayerActivity extends Activity { String TAG = "com.example.VideoPlayer"; ProgressDialog progDailog; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate

Android Native Video player with subtitles

人走茶凉 提交于 2019-12-20 14:41:48
问题 I'm currently developing a video player for android. I've created a simple textview that shows the current subtitle. The problem is: MediaPlayer getCurrentPosition() method only gives me time in seconds. And I need that value in milliseconds to correctly synchronize the subtitle with the movie. The getCurrentPosition is supposed to give me the time in milliseconds, but it gives the time in seconds*1000 (every number ends with "000"). Do you know a better way of doing this? How do I get the

Seamless video Loop with VideoView

*爱你&永不变心* 提交于 2019-12-20 08:35:03
问题 I have the following code to take a video as a raw resource, start the video and loop it but I need the video to loop seamlessly as of now when it comes to an end of the clip and starts the clip again the transition between causes a flicker for a split second, which I really can't have for my app. public class Example extends Activity { VideoView vv; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)

Seamless video Loop with VideoView

∥☆過路亽.° 提交于 2019-12-20 08:33:04
问题 I have the following code to take a video as a raw resource, start the video and loop it but I need the video to loop seamlessly as of now when it comes to an end of the clip and starts the clip again the transition between causes a flicker for a split second, which I really can't have for my app. public class Example extends Activity { VideoView vv; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)

How to capture a frame from video in android?

南楼画角 提交于 2019-12-20 02:34:45
问题 Hi i have made a custom video played in android.with some simple "play","pause","play again" and "capture" button.NOw i have done all this functionalities except "capture".I have seacrched lot many links and googled a lot,But i can't find how to capture a frame from running video in android? my code is as below: please help me for is: Main.java package org.apache.android.media; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import

android-black screen on displaying video by using VideoView

戏子无情 提交于 2019-12-19 10:02:02
问题 this is my layout : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <FrameLayout android:id="@+id/frameLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" > <VideoView android:id="@+id/geoloc_anim" android:layout_width="fill_parent" android:layout_height=

Android - Load video from private folder of app

余生颓废 提交于 2019-12-19 08:22:09
问题 I have a problem that I have been trying to find a solution for a long time. My situation is as follows: I have an app that downloads zipped videos and unzips them at the application's private folder and more specifically at a subfolder. For example at /data/data/my.app.package.name.here/files/assets/assets-955. Inside this folder the video is unzipped. The unzipping process is completed successfully since I can pull and view the video without problems when running the app on the emulator. I