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!
Related
Scenario:
I have a keynote presentation of 32 slides. The first slide contains a video playing in a loop. The video has a length of 3m 24s. The presentation will be displayed on an iPad connected to a TV during a trade show in kiosk mode.
Requirement:
The presentation should restart after a fixed period of minutes of inactivity. In keynote, I can only enter full minutes, not seconds
Issue:
The presentation also restarts while being on the first slide. Since the video length does not match the inactivity interval, the video does not loop continously, but gets restarted somewhere in the process of playing.
Question(s):
Is there anywany to change the period of inactivity to respect seconds as well?
Is it possible to have the presentation being restarted, ONLY if it is NOT on the first slide? Maybe with AppleScript?
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。
For my app, I want to display a different image and text for different times of day. How would I go about doing this? Thanks!
To get the current time:
Get current system time?
Then use an if statement with the times that your program should change background.
You can refer to set background image for entire iPhone / iPad app for how to change the background.
I am hitting low FPS on one of the application that I am working on. I found that GPUView can be used for debugging graphics performance issues. I have collected Merged.etl file for use case. This shows FPS chart for my application. I am trying to understand co-relation between this chart and GPU Hardware Queue and CPU Context Queue. Basically I want to know how this FPS chart has been derived? If there is any event that can trace this information I am thinking of adding real time tracing of this event so that I can display the FPS as widget while I run my application, something similar to http://blogs.msdn.com/b/jgoldb/archive/2008/09/26/etw-event-tracing-in-wpf.aspx
look for D3D9-Present, and DX-Flip for DX1X. span around for significant amount of time say 1 second. Press Ctrl+E, which will show event viewer, from that, select D3D9-Present or DX-Flip events. Left pane in the event viewer will give you number of these events and you already have the time span you have Zoomed to. I think dividing the number of events by the time would give you average fps for that duration. How gpu view does it, might be running average or instantaneous (1/ deltaT), where deltaT may be time between two events.
Can you try this little math and post some results for reader :)
The FPS chart is derived from the event "D3D9 - Present"(maybe other similar name for d3d10/11)
the "D3D9 - Present" event is produced when the D3D runtime calls into the user mode graphic driver's interface Present
The FPS chat in GPUview only consider the counter of Present called, but for some application, like windows media player, it will call Present twice for one frame in DWM off for tearing free, first one to present top half, and second one to present bottom half. In this case, the FPS in GPUview actually is double of real FPS. To get real FPS, you also need look the "DX - blt" event, if there are "Present Blt" information in "DX - Blt" event, it indicates the "DX-blt" is for "Present", and then look the Source Rect and Dest Rect information in this event to determine whether the Present is for a full frame or a part of frame.
How do I automatically expand an embedded youtube video when the user presses play?
The situation:
- For various reasons the ideal layout of the webpage mans that the video player must appear initially at a small size (let's say 480x385) when the user arrives on the page
- The video being shown contains some detail and is difficult to watch at 480x385
- Right now the user must click on the "full-screen" icon which comes standard in every youtube video player. This is irritating to many people.
The desired solution:
- When users click on the video to play it, the player automatically expands to a more reasonable size (e.g., 640x385 or 853x505) and plays at that size
- The video could be played in a modal overlay, but other solutions would be welcome as well
- Upon completion of the video, the expanded view should automatically disappear and the video should appear in it's original size on the page
You basically need two things:
The ability to detect when the the video is playing. You should be able to figure that out from this YouTube example.
Resize the player by changing the height and width properties of the "object" node that contains the player.