Posts

Post not yet marked as solved
5 Replies
1.4k Views
I can't find a way to correctly and reliably order two annotation view on the MapKit map.i tryed to change zindex, some other strange hacks I forgot, but never found a reliable way to achieve this.As an example, please see the eclosed screen capture of our app: the arrow should display under the harbor annotation.https://ibb.co/qWxMcS4Is there a solution?
Posted
by martt_1er.
Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
HiI'm using the iOS11 `AVAggregateAssetDownloadTask` API to download an HLS AVAsset with differents subtitles.Here's the code to create a download task:downloadTask = self.session.aggregateAssetDownloadTask(with: urlAsset, mediaSelections: mediaSelections, assetTitle: "my downloads", assetArtworkData: nil, options: [AVAssetDownloadTaskMinimumRequiredMediaBitrateKey: 2000000])To create the media selection array, I'm duplicating the urlAsset's `preferredMediaSelection` and select the subtitles I want to download.Here's the code:let preferredMediaSelection = asset.urlAsset.preferredMediaSelection var mediaSelections: [AVMediaSelection] = [] if let group = asset.urlAsset.mediaSelectionGroup(forMediaCharacteristic: .legible) { group.options.forEach { option in guard let mediaSelection = preferredMediaSelection.mutableCopy() as? AVMutableMediaSelection else { return } mediaSelection.select(option, in: group) mediaSelections.append(mediaSelection) } }But the session download the whole video for each media selections, instead of downloading the video once, then the french subs, then the english ones, etc...How to download multiple subtitles (or audio) and the video once?Thanks
Posted
by martt_1er.
Last updated
.