home.social

#avplayer — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #avplayer, aggregated by home.social.

  1. Fading audio with AVPlayer

    AVPlayer doesn’t provide a built-in way to fade in or out. I previously described how you achieve a video fade-in (or out) using general CoreAnimation layer animation, as part of making a macOS screen saver. Now let’s tackle the audio.

    extension AVPlayer {

    func fadeAudio(from startVolume: Float, to endVolume: Float, duration: Double) {

    let audioMix = AVMutableAudioMix()

    […]

    https://wadetregaskis.com/fading-audio-with-avplayer/

  2. Fading audio with AVPlayer

    AVPlayer doesn’t provide a built-in way to fade in or out. I previously described how you achieve a video fade-in (or out) using general CoreAnimation layer animation, as part of making a macOS screen saver. Now let’s tackle the audio.

    extension AVPlayer {

    func fadeAudio(from startVolume: Float, to endVolume: Float, duration: Double) {

    let audioMix = AVMutableAudioMix()

    […]

    https://wadetregaskis.com/fading-audio-with-avplayer/

  3. Fading audio with AVPlayer

    AVPlayer doesn’t provide a built-in way to fade in or out. I previously described how you achieve a video fade-in (or out) using general CoreAnimation layer animation, as part of making a macOS screen saver. Now let’s tackle the audio.

    extension AVPlayer {

    func fadeAudio(from startVolume: Float, to endVolume: Float, duration: Double) {

    let audioMix = AVMutableAudioMix()

    […]

    https://wadetregaskis.com/fading-audio-with-avplayer/