By default the mediacontroller for video view appears only for 3 sec. I want it to be there untill the song is playing. I know I have to use this peice of code: -
mediacontrollername.show(0);
But apparently it doesn't seems to be doing its job correctly
What should I do for this?
Just in case anyone searched for this issue and still needs a solution, have a look at this: MediaController 3 Second Issue
Related
I am really new to Android. I want to edit video before display from YouTubePlayerView. I want to apply some shadders and effects before
playerView.initialize(DeveloperKey.DEVELOPER_KEY, this).
I have no idea what to do nor i found any related material on internet. I have wasted my couple of hours on this task.Please help me in this regard.Thanks
Please present new controller 'viewcontroller1' from your existing view controller.
Data needs to be captured from 'viewcontroller1' and used appropriately.
(void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^)(void))completion NS_AVAILABLE_IOS(5_0);
Hi I'm developing a game by using andengine.I have a player in my game created with TiledSprite.Also there box2d physic engine.Here is the porblem: Player is moving ahead.But a while later there is a wall on his top and if he wanna continue to go ahead, he has to incline.Incline method just make "player.setCurrentTileIndex(12);". So player image is getting small(incline position).Till here everything is right.But playerBody isn't getting small.That's why he still can't pass the wall by inclining.How can I solve it?
You can understand the problem with photos better:
In this picture, he can't go in there:
http://t1310.hizliresim.com/1g/j/tmpyd.png
In this picture, he can go in there but he can't:
http://j1310.hizliresim.com/1g/j/tmpz2.png
I searched this stutation and found this: destroy the fixture and create new one. But I need this solution with code examples. I couldn't get it well.
You have to create new body for it everytime.
I am using a com.google.android.youtube.player.YouTubePlayerView to play my youtube videos, I extend YouTubeBaseActivity. I am having an issue where I call .pause() on the youtube player instance and and set the view VISIBILITY to View.GONE but it keeps buffering after the view has been set to View.GONE and throws and error because it cannot play in a hidden view. I called YouTubePlayer.pause() before hiding the view. Is there another way to stop playback? I want to stop the player and remove the com.google.android.youtube.player.YouTubePlayerView when a button is pressed. Thanks for taking a look.
if(youTubePlayer.isPlaying()){
youTubePlayer.pause();
youTubePlayerView.setVisibility(View.GONE); }
The pause function will will not stop it. You should try to release it for stopping it. Try the following code
youTubePlayer.release();
It's too late to answer - But still, someone might be benefited -
You can set player style in youtube player.
youtubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT) // To set player as youtube provided.
youtubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.MINIMAL) // To set minimal version of the youtube player. In this style you'll not get the player control options.
youtubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.MINIMAL) This line will do the work of Stopping the youtube player playback custom view
I have created a soundboard and am having trouble getting just one sound to play at a time. If another button is pressed I want the current button to stop playing and the new button to begin. I also want sounds to stop when pressing the next or back button.
Is there any code that can help me out with this?
Here's some information for you that can help you solve your problem:
http://developer.android.com/reference/android/media/SoundPool.html
http://www.androidsnippets.com/playing-sound-fx-for-a-game
But like Falmarri pointed out, we're here to help on code and correct in need, not to write an app for you :)
The Android docs do not tell you how to build something, they only tell you what the parts do. Kinda like throwing parts at someone with detailed information of the parts, then expecting them to build an engine. The real world doesn't work that way!!
Here is what you need Paul. I use this code a lot:
private static SoundManager SM;//Field variable to hold sound manager.
SM = new SoundManager(); //Create sound manager
SM.initSounds(getBaseContext());
SM.addSound(1, R.raw.snd_loop_1);//Add sounds. Sounds go in /res/raw
SM.addSound(2, R.raw.snd_loop_2);
SM.addSound(3, R.raw.snd_ok_1);
Then you can call the sounds on demand with SM.playSound(1);
If you need a permanent running background loop, you can call the same sound with SM.playLoopedSound(2);
I hope it helps!
I was using audiotrack to play some sounds in a loop. Now I need to know in which period of time I'm right now, so i decided to use setPositionNotificationPeriod which works quite good.
The problem is that it just work for the first "loop" but stop being called after that :\
The code looks like the following:
...
audioTrack.setPositionNotificationPeriod(bufferSize/numCalls);
audioTrack.setPlaybackPositionUpdateListener(this);
audioTrack.setLoopPoints(0,bufferSize,-1);
...
public void onPeriodicNotification(AudioTrack track)
{
Log.d("Hey I'm on call: "+numCall++);
}
With that I got just #numCalls# calls but I want them to be forever.
Any idea how to fix it?
Thank you very much
EDIT: I forgot to say I'm using an static audiotrack instead of stream