Amazing video! I am actually building a video player and this was a life savior! I do have to take care of extras - seeking state, the play is actually a promise and is not always successful so one can't really transition to playing state without actually ensuring the video is playing after play was invoked. Another one is that canPlay gets triggered multiple times actually. The buffering / stalled states too. The only way to make sure is to listen to paused event from video itself to safely transition into paused state whenever the video api decides it, not only when the UI asks for it. Same goes for all events. It is then easy to switch from video element api, to hls.js or other video apis with reliable state events of their own.
Very well done video, great example and nicely explained. It's the clearest video on xstate that i've seen thus far and man i've been watching a lot of them
Hey Anurag! Yea, that was one my wife did... very cool! Maybe at some point I'll look into doing a demo on that... it used a leap motion to detect hand movement, which isn't very popular so I was worried its audience would be too small, but maybe I could do one on three.js and react on its own.
Hey Leigh, I am going back to watching this video. Great content as always! When do you recommend using state machines versus standard setter and getter state?
Hey Eric! I think it's a good idea whenever you have more than just a boolean... this means say different statuses, and/or when you have 2+ booleans that can combine together to make some really funky combos.
watched a few of davidkpiano videos and talks, but only after watching yours, do I know how to implement it. I'm worried I might use this EVERYWHERE now...
I think that state machines are a good way to deal with complicated conditional views. But handling machines context feels weird to me.... But i will definitely give it a shot
Yea, it did retrigger pretty often, but I didn't really notice any negative consequences... 3 times per second seems like a lot in human land (333ms) but that's not too crazy when you consider that a 30fps video is rendering a new frame every 33ms.
Amazing video! I am actually building a video player and this was a life savior! I do have to take care of extras - seeking state, the play is actually a promise and is not always successful so one can't really transition to playing state without actually ensuring the video is playing after play was invoked. Another one is that canPlay gets triggered multiple times actually. The buffering / stalled states too. The only way to make sure is to listen to paused event from video itself to safely transition into paused state whenever the video api decides it, not only when the UI asks for it. Same goes for all events. It is then easy to switch from video element api, to hls.js or other video apis with reliable state events of their own.
Very well done video, great example and nicely explained. It's the clearest video on xstate that i've seen thus far and man i've been watching a lot of them
Thank you so much Chris! Glad you found it clear!
Awesome video... Such clear explanations.
Thanks Justin, glad you enjoyed it!
Really enjoyed this series! Thanks for providing some really great practical applications of this awesome library. It really helps the material stick!
Thank you, Hunter! I'm glad you enjoyed it!
Excellent tutorial series. Thank you.
Thank you Nikos!
very good explanation - subscribed
Nice! Thanks Daniel :)
Awesome video series, thanks a lot for putting in the time to make these!
Thank you Mark :D
Thanks Leigh, super helpful! Very clear explanations.
Awesome! Thank you Hrafnkell!
Wow that fox project is amazing! and the tutorial as well
Hey Anurag! Yea, that was one my wife did... very cool! Maybe at some point I'll look into doing a demo on that... it used a leap motion to detect hand movement, which isn't very popular so I was worried its audience would be too small, but maybe I could do one on three.js and react on its own.
@@leighhalliday Yeah that's really cool, maybe you could also try doing some videos on ReactThreeFiber.
You are awesome brother
Thanks again Kiran :) I appreciate it!
Great demo!
Hey Leigh, I am going back to watching this video. Great content as always! When do you recommend using state machines versus standard setter and getter state?
Hey Eric! I think it's a good idea whenever you have more than just a boolean... this means say different statuses, and/or when you have 2+ booleans that can combine together to make some really funky combos.
@@leighhalliday Thank you for clarifying, I can definitely see the difference here now .
Damn, that was good!
Subscribed
Niiiice! Happy to have you on board Greg :)
Thanks! Your lesson helped me!
Excellent! Thanks for saying hi :)
Great, thanks.
No problem Srinivas!
@@leighhalliday ua-cam.com/video/-KK1ZsK6FxI/v-deo.html (Gift from India)
Thanks enjoyed this series, really keen on using finite state machines in my next project. Is it possible to go over the testing part of using xstate.
Hey Lyle! Great idea for a video... that's something I haven't done before, so let me add it to my list and I'll work on coming up with something :)
watched a few of davidkpiano videos and talks, but only after watching yours, do I know how to implement it. I'm worried I might use this EVERYWHERE now...
Haha... it's great any time you have more than just a true/false
Thanks man i had this issue of getting the time of the video when the video player stop
Sweet! Glad the video helped, Hui!
I think that state machines are a good way to deal with complicated conditional views. But handling machines context feels weird to me.... But i will definitely give it a shot
I think it's better to keep the context alongside the "finite states" of the state machine, but yea, it's something extra to keep track of!
Would it also make sense to define actions with "assign" as const functions as well?
Sure! I think that might be a good idea. If it makes your code cleaner, go for it!
Good video, but I think, you could be say something about guards because your "playing" event retriggered very often and it beat up for optimization.
Yea, it did retrigger pretty often, but I didn't really notice any negative consequences... 3 times per second seems like a lot in human land (333ms) but that's not too crazy when you consider that a 30fps video is rendering a new frame every 33ms.
Can you please make a tutorial on mobx v6 with react hooks?
Launching tomorrow (December 2nd) Felix... 11am EST. Stay tuned :)
Leigh Halliday thank you 🙏🏽