iOS 9: syncing problems with AVPlayer.masterClock - avplayer

in my app I use AVPlayerItem to play sound and AVPlayer to play video. To sync both players I use the following code:
CMClockRef nc = CMTimebaseGetMasterClock(avPlayerItem.timebase);
self.avPlayer.masterClock = nc;
On iOS 7 and iOS 8 it worked like a charm. But with iOS 9 I keep having problems. The playback starts but then always jumps back several seconds - so the playback is not fluent.
I would be grateful for every hint.
Thank you.
Update
It seems as if the masterClock is not the cause of the problem. I tried it without setting the masterClock and still had the same problem.
In another app I use an AVAudioPlayer for audio playback and an AVPlayer with AVPlayerItem for video playback and everything works fine.
In this app I have an AVPlayer with AVPlayerItem for both - audio and video playback and this seems to cause the problem. It worked fine with older iOS versions but not with iOS 9.
Update
I tested it with iOS 10 and the bug was gone.
This problem only occurs under iOS 9.

Related

WKWebView on iOS 14 only loads content after a significant delay

There seems to be some issue with loading content in WKWebViews in iOS 14. Whenever something is loaded (either a webpage or html string) it takes 25 seconds before the loading actually starts.
I've tried this with a production project and a couple boilerplate WKWebView projects written in Swift and Objective-C, all of them have the same 25 second delay.
This happens in the simulator for both iPhone and iPad on two Macs, both running Catalina and Xcode 12 beta 3.
I haven't tried this on an actual device yet as my primary phone is the only device I have that is capable of running iOS 14 and I prefer not to install iOS 14 on it just to check if this issue is present.
Has anyone else seen this issue?
After two nights working on this thinking it was a mistake I made in SwiftUI (WKWebView inside UIViewRepresentable), I came to the conclusion that this is an issue with iOS 14, but only on the simulator. Not fixed in Xcode 12 beta 4.
There is no delay in iOS 13 on the simulator. You can easily test this by opening Safari in a simulator running iOS 13 and in a second simulator running iOS 14. Any webpage in Safari iOS 13 will open almost instantly. Any webpage in Safari iOS 14 will open with a delay of 20-30 seconds (unless it is a link you click on the website itself).
There is also no delay if you open a webpage in WKWebView or Safari on a real device with iOS 14 (tested with iOS 14 beta 4).
I reported this issue to Apple via the Feedback Assistent app.
[UPDATE] Seems fixed in Xcode 12 beta 5: no longer a delay in the simulator.

Windows Phone 8 AAC File Sync issue

I want to stream an audio file that type is aac. when i play an aac file,I heard same voice different times on WP8 and WP8 is hanging back. I dont see that problem IOS and Android. Do you have any idea? How can i solve this sync. problem. Thanks

music player in iphone simulator 4.2

I am trying to add music player to my iphone app using the MediaPlayer framework. I dont have a real device with me and want to test it on simulator. But, the simulator doesnt support MPMusicPlayer and crashes when i run the add media app.
Is there a way I could test MPMusicPlayer on simulator?
You can't add music to the simulator so MPMusicPlayer will fail. It will have to be tested on a device.

Stream/Play audio files on mobile browsers

I am trying to create a mobile website and want to be able to play/stream audio files.I have tried html5's audio tag and tried testing it on opera mobile 10 simulator but it does not work. I have lots of audio files and the audio should be auto played.
sidenote:
Also, i need to test my website for android and iphone mobile phones. I am downloading android emulator for windows. I tried searching for iphone emulator for windows but there are none...
Phone emulators aren't always a good indicator as they do not usually have a media player installed. The best way to test is to find someone with an actual Andriod / Blackberry / iPhone.
You should try the same HTML5 code with an actual phone. Note that Opera Mobile 10 does not have support for the video/audio tag. If you're interested in streaming to mobiles without HTML5, you should check this FAQ entry for more information.

Phonegap on iPhone 4 device

I have a PhoneGap app that works perfectly on the iPhone 3.2 simulator and also iPhone 3 and 3GS devices.
I have just downloaded and installed the latest iOS SDK, changed the settings in Project>Edit Project Settings to allow the application to work, and run it successfully within the iPhone 4 simulator and even the iPad simulator.
However when I run it on a provisioned iPhone 4 device, nothing seems to happen when I run it. I get the splash screen, but nothing happens after that. In the log I get this:-
2010-09-13 10:11:34.156 MyApp[89:307] Going to play default movie
2010-09-13 10:11:34.169 MyApp[89:307] Can't find filename default.mov in the app bundle
2010-09-13 10:11:34.948 MyApp[89:307] Device initialization: DeviceInfo = {"name":"iPhone","uuid":"548444a41eee3aec9dd66511e12e6a6b1b277a2a","platform":"iPhone","gap":"0.9.0","version":"4.0.2"};
2010-09-13 10:11:35.022 MyApp[89:307] Docs Path:/var/mobile/Applications/D887FEA7-0C56-4991-890F-E790361A9D64/Documents
2010-09-13 10:11:35.037 MyApp[89:307] Free space is 15497396224
And nothing else!!
Really annoying. Anybody know what might be happening here? I tried fiddling with a few settings in the Project Settings but that doesn't seem to have fixed it.
Any help would be really appreciated.
Regards
Nick
Update - my problem. I had some external javascript which was crashing due to the way I was calling it from the HTML file. Weird that it only affected the iPhone/iPad device but not the simulators, but there you go....

Resources