Swift: YouTube - How to Seek and Scrub AVPlayer with UISlider (Ep 18)

Поделиться
HTML-код
  • Опубликовано: 1 янв 2025

Комментарии • 63

  • @yvindSrensen
    @yvindSrensen 8 лет назад +22

    I have learned a lot more after I started to ditch Storyboards and just write everything in code, lots more control and more fun. Not using Storyboards never really crossed my mind until i started watching your videoes. Keep up the good work with your high quality vidoes.

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад +9

      Yep, I used to use Storyboards a lot. But after a while it becomes really clunky and unnecessary when you know how everything works with code. Glad to have you on board.

    • @abdouett3676
      @abdouett3676 8 лет назад

      Quite agree. But the project organization becomes hard once the application becomes increasingly greater because the declaration of variables (views). The solution that seems to be effective is to use the extensions. Unfortunately they do not allow the computed properties.

  • @nileshjdarji
    @nileshjdarji 2 года назад +1

    You are a PRO. This really helped me to put some audio controls in my simple app. Thank you Brian.

  • @dun198
    @dun198 6 лет назад +1

    Just finished this episode and everything is running good so far. Thank you for your hard work you're putting into these tutorial videos here on RUclips. You've taught me so much, especially when it comes to best practices and code structuring and working without the Storyboard, which I'm starting so prefer (wasn't a big fan of the Storyboard from the beginning).

  • @osmanmusse6223
    @osmanmusse6223 4 года назад

    Cool video helped me with my personal project

  • @Abhisweat
    @Abhisweat 6 лет назад

    Amazing tutorial, Brian!

  • @captainTahir
    @captainTahir 8 лет назад

    awesome tutorials its very helpful

  • @cinquain0
    @cinquain0 6 лет назад

    This was mmmmh mmmhhh good!

  • @DannyKerbel
    @DannyKerbel 6 лет назад

    Awesome video, thanks! Does anyone know how to get a smoother scrub?

  • @jamesrao6783
    @jamesrao6783 7 лет назад

    Thank you very much for your sharing. Just encounter an issue. It seems that the slider thumb jumps between the slider value set by addPeriodicTimeObserver and the other one by .valueChanged event. Besides, I actually have found that .valueChanged does not work properly, not sure whether .touchUpInside is the right event type.

  • @stevenmunoz7567
    @stevenmunoz7567 8 лет назад

    App builder addict!

  • @xpressteam7677
    @xpressteam7677 8 лет назад

    Quickblox webrtc Video Chat or Twilio Video Chat tutorial would be awesome...especially if they worked in conjunction with the firebase users we created!

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад

      Yeah, I'll have to look at how WebRTC works, this is something I'd like to learn myself.

    • @xpressteam7677
      @xpressteam7677 8 лет назад

      May I suggest Quickblox over twilio as they don't require you to setup outside servers via ngrok localtunnel etc...but yes Webrtc is the future and really cool...thanks a lot for the tutorial so far!

  • @fankamthong529
    @fankamthong529 8 лет назад +1

    Brian, 好料 !!

  • @blackcodevlog5135
    @blackcodevlog5135 6 лет назад

    line number 71 is not running in swift 4
    please give me a solution

  • @shivasharma923
    @shivasharma923 Год назад

    Please provide the episode 19

  • @sagarchandradas5831
    @sagarchandradas5831 3 года назад

    Please make a video how to seek in Core animation using UISlider

  • @dzaev3663
    @dzaev3663 8 лет назад

    I have a question. I'm a beginner of Swift. I just started Swift three months ago. I don't completely understand even the usage of Storyboards. In the meanwhile, I saw your tutorial and your tutorial is very instructive. So should I learn how to use Storyboards, or ditch Storyboards and focus on mastering your coding style? It’s really helpful for other to answer my question. Thank you.

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад

      Working with very simple projects, you'll encounter much more storyboard usage. As your apps get more sophisticated, you'll need to know how to use both approaches. I've been coding for a long long time so I don't need the help of visual editors to build out applications. Having said that, Storyboards are really useful and will help you go very far.

    • @dzaev3663
      @dzaev3663 8 лет назад

      Thanks for your reply. Ok I also study the usage of storyboard.

    • @hneufvil
      @hneufvil 7 лет назад

      David Hey, how is your studies going? Where are you studying? Is it a boot camp or one of these online courses like Udacity or Cousera?

  • @darrellbulloch
    @darrellbulloch 8 лет назад

    Where can I find the episodes that show how to build the bottom portion of the VideoLauncher view? Episode 19 only explains how to build the video player.

  • @Lukasbimba93
    @Lukasbimba93 8 лет назад +1

    Hey, how do you teach yourself to do this? Like, where do you learn from? I learn from videos like yours and online tutorials. Maybe you just figure it out?? Thank you!

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад +1

      Doing this for more than a decade, digging through documentation isn't that difficult.

    • @Lukasbimba93
      @Lukasbimba93 8 лет назад

      Which documentation? Just swift? or do you go to multiple libraries?

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад +2

      Apple docs + StackOverflow

    • @Lukasbimba93
      @Lukasbimba93 8 лет назад

      I check out those as well. I was just thinking maybe you know some other sources but I guess the knowledge just come with time and experience. Trial & Error.

  • @tortellini2232
    @tortellini2232 7 лет назад

    The demo doesn't show the slider moving with the video progress. IF you change the video position while a video is playing, this creates havok on the uislider, especially when testing on a device

    • @LetsBuildThatApp
      @LetsBuildThatApp  7 лет назад

      I believe the next video addresses the video progress right? Have you clicked and watched that video yet?

  • @Kkvta
    @Kkvta 8 лет назад +1

    Great channel mate, really appreciate it. I am quite new to Swift and want to create an app where people can upload pictures to it (and also rate up/down pictures), similar to Instagram and Tumblr. I've tried googling tutorials for it without success. What should I google? Where can I find such tutorials? Is this kind of app tricky to make? Cheers buddy.

    • @pboabang
      @pboabang 8 лет назад +1

      Check out Tutorial by Rob Percival on Udemy.

  • @shival123
    @shival123 8 лет назад

    Hi, Can you please do a tutorial on sliding the AVPlayer to bottom left of the screen as we have in youtube app?

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад

      There's a lot of trickery going with a UIPanGestureRecognizer I believe. Not sure if I want to go through all the weirdness of that code.

    • @shival123
      @shival123 8 лет назад

      If possible can you please share me your code? I'll try to study it. It would be a great help if can do it.

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад

      It's lost in the black abyss that is my project folders. I haven't updated it for Swift 3 so it doesn't compile. Moreover, the code isn't very pretty so its hard to understand.

  • @denns4life
    @denns4life 5 лет назад

    I'm streaming an audio file but I get nan when I try to print out CMTimeGetSeconds(duration). Please how do I fix this?

  • @ukdrillunreleased6096
    @ukdrillunreleased6096 8 лет назад

    Brain, have you decided to discontinue to firebase series?

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад +3

      I'm doing further research on achieving push notifications using a node server. Let's see if I can put this together...

    • @ukdrillunreleased6096
      @ukdrillunreleased6096 8 лет назад

      love you bro!

    • @kunalverma9934
      @kunalverma9934 8 лет назад

      Firebase have an push notifications model..
      Can't that be integrated directly..

  • @michaeljajou1131
    @michaeljajou1131 7 лет назад

    I keep getting this error when running my code
    Double value cannot be converted to Int because it is either infinite or NaN
    It highlights it at this line of code
    let secondsText = Int(seconds) % 60

    • @Smilec-w5k
      @Smilec-w5k 6 лет назад +2

      I do this in Swift4. It work.
      if let duration = player?.currentItem?.asset.duration {
      let seconds = CMTimeGetSeconds(duration)
      let secondsText = Int(seconds.truncatingRemainder(dividingBy: 60))
      videoLengthLabel.text = "00:\(secondsText)”
      }

    • @CountMoliere
      @CountMoliere 2 года назад

      @@Smilec-w5k comment section is the best. thank you

  • @Thvaz936
    @Thvaz936 8 лет назад

    Helo could I do with video chromecast

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад

      Not exactly sure what you mean.

    • @Thvaz936
      @Thvaz936 8 лет назад

      A video to learn chromecast

    • @LetsBuildThatApp
      @LetsBuildThatApp  8 лет назад

      I see, I haven't looked at the chromecast apis, nor do I own a chromecast so I'm not sure if I'll put out videos for chromecast.

  • @YogendraSingh-xl7oy
    @YogendraSingh-xl7oy 4 года назад

    How to save video in local storage from AVPlayer.

  • @TygruletZ
    @TygruletZ 5 лет назад

    Hi guys. Who can help me to fix this Warning: "Setter for 'isStatusBarHidden' was deprecated in iOS 9.0: Use -[UIViewController prefersStatusBarHidden]"
    UIApplication.shared.isStatusBarHidden = true

  • @fernandadosreis9534
    @fernandadosreis9534 8 лет назад

    Hi, I have a cocoa touch static library and want him to receive remote notification.
    (It works like this: it's an app inside the other)
    it's possible?

  • @user-code
    @user-code 4 года назад

    If Someone is looking for solution of jumping UISlider. Then just paste following code after slider value change.
    //To Avoid Jumping Of The UISlider
    seekBar.value = value
    UIView.animate(withDuration: 0.2) { [weak self] in
    self?.seekBar.layoutIfNeeded()
    }