gpt4 book ai didi

iphone - 在自己的应用程序中使用 iPhone 音频文件 - 复制音频文件 - 这可能吗?

转载 作者:行者123 更新时间:2023-12-03 21:11:14 25 4
gpt4 key购买 nike

我希望用户从可用的音频列表中选择一个音频文件并将其复制到我自己的应用程序中。在 Apple 示例代码“AddMusic”中检索到的 userMediaItemCollection 项目中,有一个属性:MPMediaItemPropertyAssetURL。但我无法到达它,因为我收到错误“MPMediaItemPropertyAssetURL undeclared” - 尽管我导入了 MPMediaItem.h

在苹果文档中它说:

MPMediaItemPropertyAssetURL

指向媒体项的 URL,可以根据需要使用任何选项创建 AVAsset 对象(或其他基于 URL 的 AV Foundation 对象)。值是一个 NSURL 对象。

URL 具有 ipod-library 的自定义方案。例如,URL 可能如下所示:ipod-library://item/item.m4a?id=12345

Usage of the URL outside of the AV Foundation framework is not supported.

适用于 iPhone OS 4.0 及更高版本。

在 MPMediaItem.h 中声明

<小时/>
Does that mean, it is not possible to access the audio files for own use?
Is there a workaround?

非常感谢

最佳答案

我了解到没有办法做到这一点。正如我在评论中所写 - 只需使用 MPMediaItemPropertyPersistentID......

关于iphone - 在自己的应用程序中使用 iPhone 音频文件 - 复制音频文件 - 这可能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3212780/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com