the 'ksyhttpcache'
The introduction of bridging document
#import <KSYHTTPCache/KSYHTTPProxyService.h>
With appdelegate in the initialization
KSYHTTPProxyService.sharedInstance()?.startServer()
the let proxyPath = KSYHTTPProxyService. sharedInstance (). getProxyUrl ( "audio and video address")!
let mediaUrl = URL(string: proxyPath)
avPlayer.replaceCurrentItem(with: AVPlayerItem.init(url: mediaUrl!))