ios7 musicplay in background with time - time

Music player in ios7 change
First I find "remoteControlReceivedWithEvent" changed in ios7,as,"UIEventSubtypeRemoteControlTogglePlayPause:" is useless and change to
"UIEventSubtypeRemoteControlPause:"
"UIEventSubtypeRemoteControlPlay:"
and then I found ios7 MuiscPlay in bacground appear time.. and my player's time is empty like this:https://www.dropbox.com/s/l84wxl2jl4z3hr3/2013-11-11%2019.09.36.png
and how can I get the time with duration and current..
Thank you for your reading, hope you can help me。

Related

Mac control center "now playing" info not showing duration over 1h

For a Mac app I'm trying to use the MPNowPlayingInfoCenter with playback controls and track info.
I'm using the MPMediaItemPropertyPlaybackDuration property to set the track duration, with the number of seconds as NSNumber wrapped value.
Tracks over 1 hour do not show the full duration and roll over at 59:59.
Is there any way to make items in the control center show their full duration & elapsed time?
Notes:
The image shows Control center information for a track with a duration of 1:52:33 and current play position is 1:00:05.
The seek bar works correctly.
That looks like a macOS bug since media played using QuickTime Player also exhibits the same erroneous behavior. Please file a macOS feedback report!

How to stop sound and go back to idle animation on movement in ue4

so I'm making Emotes for my game and I need it so if the player moves at all it cancels the Animation and the Sound, does anyone know how to do this?
Here is my code in ThirdPersonCharacter for the emote:
I also need it so once the B key is pressed you can't press it again until you move. Without this you can spam the key and the sound goes crazy.
Thanks everyone!
P.S. The emote and sound loops, the sound is playing a cue
This can be done easily friend , you need to attach an audio component to your actor so that you have a reference to play it and stop it when your player starts to move or is standing idle, I recommend binding a function to where your player moves to stop the sound . The audio component has a stop function . You can also create a function to choose which sound should the audio component plays.
Now as for your second problem of sound going crazy a do once with delay node back to complete should do the trick , nonetheless there is also an input delay node which I forgot , YAAAAAAY time to learn new nodes!
I hope it helps . Keep on working :).
The issue here is that you're using the animations directly from the asset when, in fact, this is a perfect opportunity to use a Montage and blend the emote into the character.
If you detect movement input you can then cancel the whole thing. To stop the sound, you'll need to save a reference to the spawned SpawnSound2D in a variable. From there, a simple Stop node will do the trick. I'd probably leave the Montage running until it finishes to avoid unnatural character animations but if you truly need to stop the animation as well, use a Stop Anim Montage node
Be careful, though, sudden disruption of player feedback can feel clunky.

MediaElement repeat play

I want to play a video file in mediaelement repeatedly, but when I try to play video again in the MediaEnded event MediaElement clears screen and screen is still clear for some little but appreciable time range. How to decrease this time range or dispose of it?
Thanks.
Could you provide the code for the MediaEnded-event? A bit looking for me resulted in this:
How to: Repeat Media Playback
Social.MSDN: Repeat MediaElement
Perhaps one of these approaches works better?
I also found out that this is a known issue in Silverlight (don't know if this also relates to the WP7 version): Looping with Silverlight media element - a small delay at end of clip before it plays
Hope this helps!

Mediaplayer.play method taking time

We are developing a XNA game with high interactivity. The game includes some background music.
We are trying to play the background music through the MEdiaplayer.play method. But this seems to block the smooth gameplay for a while. How can this be overcome?
Had tried using the soundeffect instance for this initially and it worked fine. But that approach doesn't seem to go well with the certification requirements. Pls help
Thank You
I think this is normal for large music files. You could however try to put
IsFixedTimeStep = false;
after
TargetElapsedTime = TimeSpan.FromTicks(???);
I have found that that makes a smoother gamepay. At least back in 7.0 - but I still use it.
I of course assume that you use elapsed time for all animations.

How to use "currentTime" property for MpMoviePlayerController

I am trying to use the property of MPMoviePlayerController i.e "currentTime". But its showing warning "warning: 'MPMoviePlayerController' may not respond to '-currentTime' ". Can you please help me for how to use this property.
Actually i am trying to find out the duration of time for played video . So that i will check with timer ( NSTimer ) and than calculate how much time the played video is played or seek forward . And next time while i am playing the same video so i will start from the last spot time and play from that time when i resumed .
Thanks,
KamalBhr.
You would not see currentTime as part of MPMoviePlayerController thats a part of AVPlayer.

Resources