IJK MEDIA PLAYER

← разместить еще код

Не работает звук на многих видео в Xcode проекте, в чем может быть проблема?

Расшаренный код:

func createPlayer(urlString : String)
    {
        if (player != nil) {
            player.stop();
            player.view.removeFromSuperview();
            
        }
        let opt : IJKFFOptions = IJKFFOptions.byDefault();
        opt.setCodecOptionIntValue(0, forKey:"skip_loop_filter") //IJK_AVDISCARD_ALL
        opt.setCodecOptionIntValue(0, forKey:"skip_frame")
        opt.setPlayerOptionIntValue(1, forKey: "videotoolbox")
        opt.setPlayerOptionIntValue(1, forKey: "framedrop")
        opt.setFormatOptionIntValue(2000000, forKey: "analyzeduration")
        opt.setFormatOptionIntValue(1, forKey: "auto_convert")
        //"http://devimages.apple.com/iphone/samples/bipbop/gear3/prog_index.m3u8"
        player = IJKFFMoviePlayerController(contentURLString: urlString ,with: opt);
        self.player.view.autoresizingMask =  [.flexibleWidth, .flexibleHeight]// UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        self.player.view.frame = self.view.bounds;
        self.player.scalingMode = IJKMPMovieScalingMode.aspectFit;// IJKMPMovieScalingModeAspectFit;
        self.player.shouldAutoplay = true;

        view.insertSubview(player.view, belowSubview: webView);
        player.prepareToPlay();
        
    }