Skip to content

Setting up Player with AVPlayerItem. #235

@lurui1029

Description

@lurui1029

Player stopped working when set up with an AVAsset downloaded from user's iCloud photo library using PHImageManager:

Error Domain=NSCocoaErrorDomain Code=257 UserInfo={NSURL=file:///var/mobile/Media/PhotoData/Metadata/DCIM/101APPLE/IMG_1858.small.MP4, NSUnderlyingError=0x2833487b0 {Error Domain=NSOSStatusErrorDomain Code=-12203 "(null)"}}

Related posts:

Swift AVAsset downloading from iCloud has no permission on iOS 14: error Code=257

Request AVAsset using iCloud PHAsset returns an AVAsset with no VideoTracks

Solution

Set up Player with an AVPlayerItem.

PHImageManager provides either an AVAsset or an AVPlayItem for a video request from user's photo library. This issue does not occur when working with an AVPlayerItem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions