android-mediaplayer

Unable to play sound with different values

為{幸葍}努か 提交于 2019-12-23 05:25:41
问题 I am working on an Android application that record the audio and play it with different frequency and voice properties. my code working: It records,Stop and play the audio but not in desired format and values just like Voice Changer With Effects Basically this app record voice and play it with different properties like Ghost,Radio,Girl etc etc. I am using list view to achieve this. I want to change the properties of sound just like this application. Here is code for main activity public class

Back button not working in Media player

£可爱£侵袭症+ 提交于 2019-12-23 03:34:09
问题 I am able to press the back button when music is not played . But when the music plays and I try to press the back button,it doesn't work. Even on pausing the music, back button not working. Please help what could be the issue. Pasting below a snippet of the code: Inside MainActivity: public class MainActivity extends Activity implements MediaPlayerControl { private ArrayList<Song> songList; private ListView songView; private MusicService musicSrv; private Intent playIntent; private boolean

com.google.android.exoplayer2.ParserException

萝らか妹 提交于 2019-12-23 03:18:23
问题 I Try to create dash format for video with help of MP4Box When i run command :- MP4Box -dash 2000 -rap -frag-rap -profile onDemand 1OaG8xKJPZg-320.mp4 1OaG8xKJPZg-720.mp4 it show some warningusing Ubuntu 16.4 then after i received 1OaG8xKJPZg-320_dash.mpd 1OaG8xKJPZg-320_dashinit.mp4 1OaG8xKJPZg-720_dashinit.mp4 these file i uploaded in google cloud with publically share link , for Reference i uploaded in google drive with my player activity https://drive.google.com/drive/folders/1t_YF

How do I mute all sounds of my application?

你离开我真会死。 提交于 2019-12-23 02:40:21
问题 I'm creating a quiz app just for learning, and I've got a problem. In my mainactivity I have a media player. It plays music even going through other activities, and I have a mute button to stop the music. I also have a sound effect when I successfully hit the right answer (on a question which is in other activity). But I don't know how to mute this SFX along with the background music when I press the mute button. Any hints? ;) If it has a way to mute my entire application will be so good. I

setNextMediaPlayer not working

梦想与她 提交于 2019-12-23 02:33:01
问题 I am trying to find out how to use the android's MediaPlayer method setNextMediaPlayer which should smoothly transition from one player (song) to another. But do not know how to use the method since there is a lack of documentation. This is what i do and it does not work: final MediaPlayer mp1 = new MediaPlayer(); final MediaPlayer mp2 = new MediaPlayer(); try { mp1.setDataSource("http://song1.MP3"); mp2.setDataSource("http://song2.mp3"); mp1.prepareAsync(); mp1.setOnPreparedListener(new

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 stops playing after some minutes

纵饮孤独 提交于 2019-12-23 01:52:26
问题 I have an issue with Media player always stopping randomly after some few mins, most times, when the phone sleeps and you touch it again, the video hangs and stops playing. I have tried many solutions here on stackoverflow, none worked. I'm almost pulling my hair out !!! I've tried this answer Android MediaPlayer stops playing after some time MediaPlayer randomly stops on Android 4.4 (19) How to prevent mediaplayer to stop when screen goes off? and many more answers, they all didn't work This

Latency in playing a .wav/.mp3/.ogg audio file in Android App

别来无恙 提交于 2019-12-22 23:23:50
问题 I'd written an application for playing 20 millisecond audio clip(.wav format). It simply plays the sound clip repeatedly 1000 times. But due to Latency, number of times it plays lies between 978 and 984. I'd also tried other audio format(.ogg, .mp3, etc). I want reduce the latency and also to get reliable number. I'm sharing my code below: package com.abhinav.soundlooper; import android.media.MediaPlayer; import android.os.Bundle; import android.os.CountDownTimer; import android.app.Activity;

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

Can an Android (Java not C/C++) plugin alter unity textures?

瘦欲@ 提交于 2019-12-22 15:09:07
问题 I'm trying to use an Android plugin to get around the fact that Unity does not support Video Textures on mobile. I do this by getting the texture ID of the texture that will be used for video (supplied by Texture2D.GetNativeTextureID() ) which i then pass into the Java Plugin. The plugin then follows a standard MediaPlayer implementation to play the video into a Surface Texture, which has been assigned the aforementioned texture ID. When i call the MediaPlayer.Start() method, LogCat outputs