         playerLayer = AVPlayerLayer(player: player)
         
         setAudioSessionCategory(to: .playback)
-    }
-    
-    private func createAsset(from sourceUrl: String?) -> AVURLAsset? {
-        guard let urlString = sourceUrl, let url = URL(string: urlString) else { return nil }
-        return AVURLAssetWithCookiesBuilder(url: url).asset
     }
 
     @objc public func setDelegate(_ delegate: AVAssetResourceLoaderDelegate) {

        selectDefaultSubtitleIfNeeded()
    }
    
    private func updateAssetIfNeeded(_ item: AVPlayerItem?) {
        if self.asset == nil,
           let item = item,
           let url: URL = (item.asset as? AVURLAsset)?.url,
           let asset = self.createAsset(from: url.absoluteString) {
            self.asset = asset
            itemInfo = AVPlayerItemInfo(item: item, delegate: self)
            self.trigger(.ready)
        }
    }
    
    private func observe(player: AVPlayer) {

    
    public required init(options: Options) {
        super.init(options: options)
        if let urlString = options[kSourceUrl] as? String, let url = URL(string: urlString) {
            asset = AVURLAssetWithCookiesBuilder(url: url).asset
        }
        
        player = createAVPlayer(with: asset, shouldLoop: options[kLoop] as? Bool ?? false)
        player.allowsExternalPlayback = isExternalPlaybackEnabled
