AVPlayerLayer shows black screen but sound is working

前端 未结 3 1476
离开以前
离开以前 2021-01-21 03:52

Im trying to display a local recorded video in a AVPlayerLayer which works sometimes. I can hear the audio from the recorded video but can\'t see the v

3条回答
  •  囚心锁ツ
    2021-01-21 04:36

    i have the same issues as you did. the reason is in iOS 10.xx , if you export video with animationTool . You will meet the trouble like that . try to fix them by remove this code .

    something like that

     mainComposition.animationTool =  AVVideoCompositionCoreAnimationTool(postProcessingAsVideoLayer: videoLayer, in: parentlayer)
    

    Hope to help you

提交回复
热议问题