Integrate photo, audio, and video content into your apps.

Media Documentation

Posts under Media tag

61 Posts
Sort by:
Post not yet marked as solved
2 Replies
483 Views
We have implemented a check on our app, that validates when a user has seen a video in it's entirety and hasn't skipped any section. We were using the video.played TimeRange Buffer available on a video HTML5 element. The expected behaviour For a user playing a video once and letting it end, it means you get one TimeRange where start is zero and end is the duration of the video in seconds. The end is not always the exact duration but it was always within 1 second of it. The issue After iOS15 the end integer is never the correct one or even close to the duration when a video ends (The "ended" event fires). It almost always is close to the start timer. When pausing the video though the end duration is correct on the played TimeRange. Testing on iOS 15.0.2
Posted
by spideyNR.
Last updated
.
Post not yet marked as solved
2 Replies
297 Views
Used to be able to assign a Live Photo as a new Wallpaper showing the static and video image prior to iOS 16. The beta version of iOS 16.0 accepts the Live Photo as a static image only. Not sure if this is a bug in the current prerelease or a permanently dropped feature. Anyone else observed this issue?
Posted
by DJHarter.
Last updated
.
Post not yet marked as solved
0 Replies
51 Views
Hello, We are trying to setup a web stream server with Mpeg-2 (H262) video format in the HLS container. Is there a way to play Mpeg-2 codec video on iPhone safari? Take care
Posted
by uguru.
Last updated
.
Post not yet marked as solved
1 Replies
186 Views
With the iOS version 15.5 the CCS object-fit attribute does not work initially on Safari with videos anymore. When we inspect the DOM and uncheck the attribute, to recheck it, it works. But, of course that's not a proper workaround. Adding "important" does not work as well. If you reset the height: The result is flickering. On 15.4 everything works as expected.
Posted
by GeraldR.
Last updated
.
Post not yet marked as solved
1 Replies
120 Views
Hi! I have limited mobility so I want to create voice command short cuts to navigate my video settings. How do I create custom shortcuts to: Take cinematic video Take Time lapse Take Slow motion Also is there a way to set a time limit? I find Siri and even sometimes voice control does not allow voice control when recording because it’s using the microphone to record. so I would like to try a shortcut Like this: ”Take Timelapse” Start Timelapse immediately stop recording after 2 min. thanks!
Posted Last updated
.
Post not yet marked as solved
0 Replies
92 Views
I have an SPA web app I've built for Safari iOS. One feature I have is that (with user's permission!) I would like to play audio alerts of various sorts based on events that take place in the app. (Think a chat app playing a "message received" sound.) ... again, this would be with the user's permission. This is very much a feature of the app and not nagware or adware. Currently, of course, this isn't possible. Audio can only be played in response to some user-initiated action, and that "permission" only lasts until the page closes or is reloaded. So, question: Is there a way a user can permanently give permission to a website on iOS to autoplay sound files?
Posted
by broofa.
Last updated
.
Post not yet marked as solved
0 Replies
93 Views
hi, the current scrubbing direction is counter intuitive. how can i change it? this is similar to natural vs apple mouse scrolling. i would prefer a natural scrubbing direction. thanks alfred
Posted Last updated
.
Post not yet marked as solved
2 Replies
492 Views
I am trying to use AVPlayerView Controller But when i try to play the video its crash This is my Code `import UIKit import AVKit import SwiftyJSON import Alamofire import EffyIosFramework class VideoViewController: UIViewController, AVPlayerViewControllerDelegate { var player : AVPlayer! var vc = AVPlayerViewController() var isVideoPlaying = false var instance = VideoViewController() //View Did Load override func viewDidLoad() { super.viewDidLoad() vc.delegate = self } //Play Video func playVideo(url: URL) { player = AVPlayer(url: url) vc.player = player player.automaticallyWaitsToMinimizeStalling = false vc.delegate = self vc.showsPlaybackControls = false vc.videoGravity = AVLayerVideoGravity.resizeAspectFill let playerLayer = AVPlayerLayer(player: player) playerLayer.opacity = 0 self.isVideoPlaying = true self.vc.player?.play() DispatchQueue.main.asyncAfter(wallDeadline: .now()+0.2) { self.vc.view.frame = self.view.window!.bounds self.vc.view.backgroundColor = .clear DispatchQueue.main.async { self.vc.view.addSubview(self.view) } self.view.window?.addSubview(self.vc.view) } } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
186 Views
I am going to be using AVAudioPlayer to play sound effects and looping music in a game. I haven’t been able to find any recent discussion of what format to use (given I almost certainly need to compress it). https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2-SW28 is deprecated (and talks about “AAC” but afconvert -hf shows at least 7 different formats that can be saved in a CAF). Has that guide been updated? Does hardware vs software playback still matter in iOS 9+? I’m not really worried about performance in terms of impacting frame rate.
Posted
by ddunham.
Last updated
.
Post not yet marked as solved
6 Replies
1.2k Views
We implemented the new PHPicker and have run into an issue we haven't been able to replicate on our own devices but see a lot of users running into it. The problem is an error after getting the PHPickerResults and trying to get the UIImages. Because the user can select several images at once, what we do is get the results and iterate over each itemProvider object. I'm following apple's guidance and checking if itemProvider canLoadObjectOfClass:UIImage.class, before executing itemProvider loadObjectOfClass:UIImage.class. However we are getting hundreds of reports of users where this last method returns an error. Firstly, this is how we configure our PHPickerViewController: PHPickerConfiguration *configuration = [[PHPickerConfiguration alloc] init]; configuration.selectionLimit = self.pictureSelectionLimit; configuration.filter = PHPickerFilter.imagesFilter; configuration.preferredAssetRepresentationMode = PHPickerConfigurationAssetRepresentationModeCurrent; PHPickerViewController *pickerViewController = [[PHPickerViewController alloc] initWithConfiguration:configuration]; pickerViewController.delegate = self; pickerViewController.modalPresentationStyle = UIModalPresentationFullScreen; [viewController presentViewController:pickerViewController               animated:YES              completion:nil]; And this is what we do with the PHPickerResult. This is a method that returns a block with an array of an object NewPicture instantiated with the UIImage I should be getting. NSMutableArray *picArray = [[NSMutableArray alloc] init]; NSArray *itemProviders = [self.results custom_map: ^id _Nullable (PHPickerResult *_Nonnull current) {   return current.itemProvider; }]; dispatch_group_t dispatchGroup = dispatch_group_create(); for (NSItemProvider *itemProvider in itemProviders) { dispatch_group_enter(dispatchGroup); /**  We cannot properly retrieve raw type images with the current authorization status.  If the image is of type raw, we ignore it. */ if ([itemProvider hasItemConformingToTypeIdentifier:@"public.camera-raw-image"]) { NSException *exception = [NSException exceptionWithName:@"ImageIsTypeRaw"                         reason:[NSString stringWithFormat:@"Object is type raw. ItemProvider: %@", itemProvider.description]                        userInfo:nil]; // Log exception... dispatch_group_leave(dispatchGroup); continue; } if ([itemProvider canLoadObjectOfClass:UIImage.class]) { [itemProvider loadObjectOfClass:UIImage.class completionHandler: ^(__kindof id NSItemProviderReading _Nullable object, NSError *_Nullable error) {   if ([object isKindOfClass:UIImage.class]) { NewPicture *picture = [[NewPicture alloc]initWithImage:object]; [picArray addObject:picture]; }   if (error) { NSException *exception = [NSException exceptionWithName:@"CouldNotLoadImage"                         reason:[NSString stringWithFormat:@"Object is nil. UserInfo: %@", error.userInfo]                        userInfo:error.userInfo]; // Log exception... }   dispatch_group_leave(dispatchGroup); }]; } } dispatch_group_notify(dispatchGroup, dispatch_get_main_queue(), ^{ picturesBlock(picArray); }); The most common error we see our users are getting is: Object is nil. UserInfo: { NSLocalizedDescription = "Cannot load representation of type public.jpeg"; NSUnderlyingError = "Error Domain=NSCocoaErrorDomain Code=260 \"The file \U201cversion=1&uuid=*&mode=current.jpeg\U201d couldn\U2019t be opened because there is no such file.\" UserInfo={NSURL=file:///private/var/mobile/Containers/Shared/AppGroup/*/File%20Provider%20Storage/photospicker/version=1&uuid=*&mode=current.jpeg, NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/*/File Provider Storage/photospicker/version=1&uuid=***&mode=current.jpeg, NSUnderlyingError=0x283822970 {Error Domain=NSPOSIXErrorDomain Code=2 \"No such file or directory\"}}"; } I'm having a really hard time understanding why this sometimes fails. I'd really appreciate it if someone could give me a hand with this. I'm attaching the stack trace: stack_trace - https://developer.apple.com/forums/content/attachment/051f7018-05ff-4ad1-a626-29f248d0b497
Posted Last updated
.
Post not yet marked as solved
0 Replies
130 Views
Hello. How to receive keyboard events in PHContentEditingController on macOS? When extension is active tapping any key will result in Funk sound. First i tried to override keyDown in my subclass of PHContentEditingController, which does nothing. I also tried override keyDown in my subclass of NSView for my subclass of PHContentEditingController. Then i followed instructions from WWDC "Advances in macOS Security" session and implemented Input monitoring permissions request via CGEvent.tapCreate which only partially works. My extension now listed in System security / Privacy / Input Monitoring but it's impossible to turn it on. On each attempt to enable system fires alert with request to relaunch the app but does nothing. When alert disappear extension persist unchecked. My goal is to provide keyboard shortcuts for various task in Photo Editing Extension. How i can achieve that?
Posted Last updated
.
Post not yet marked as solved
1 Replies
215 Views
I'm working on a music app where I need to set supported formats in a request to the server (to check if transcoding will be required). The best resource I can find is on the old documentation page for OS X 10.5 - https://developer.apple.com/library/archive/documentation/MusicAudio/Conceptual/CoreAudioOverview/SupportedAudioFormatsMacOSX/SupportedAudioFormatsMacOSX.html Is there an updated resource for iOS?
Posted Last updated
.
Post marked as solved
2 Replies
245 Views
So basically I’m trying to build the application which can receive Translator audio via RTP multicast over Wi-Fi network or local area network The scenario: via VLC on computer by sending broadcast and receiving broadcast on VLC app. Also if possible for you to share swift code or direction to make at least how to play RTP stream for 239.178.14.25:5001 (multicast)
Posted
by nilayvp.
Last updated
.
Post not yet marked as solved
0 Replies
163 Views
Since installing the latest MacOS beta (macOS 12.4 beta (21F5058e)) on my MacBook Air M1 (8GB) I have problems installing additional sounds to Logic Pro 10.7.3. Sound files get downloaded properly, but the Apple Music Apps Content Installer fails to do the installation. I know that the network is working properly and there is plenty of room on the hard disk, and I have rebooted the MacBook en re-started Logic several times. Here is an image of the installer opening: Here is the result: Here is a report that shows that the small file was downloaded properly, but not installed: I suspect the problem has something to do with the rights for write access to the folder: HD/Library/Application Support/Logic/Sampler Instruments I'm running the same version of Logic Pro on a Mac Mini M1 (16GB) with MacOS Monterey 12.3.1 on the same network without any problems.
Posted Last updated
.
Post not yet marked as solved
2 Replies
400 Views
I have an app that has been rejected with "Guideline 5.2.3 - Legal". The content of the app is a shoutcast audio server stream that broadcasts voice audio recordings only. There is no music or copyrighted material besides the voice audio files that are owned by the creator and partner in this app. There is also an HTML/javascript photo gallery of images that are taken by the partner also. These images are of public payphones mostly in ny. How do we best provide documentation of ownership on this content made by us? Especially with the voice only custom content.
Posted
by startkey.
Last updated
.
Post not yet marked as solved
0 Replies
192 Views
If i upload a video 2 times to IG stories, the first time i got FPS drops but the second it uploads smoothly as i film in the camera app. I got an iPhone 11 and this happens from time to time, not always and i got a lot of friends with the same problem. How can i fix this?
Posted Last updated
.