How To Create The YouTube Video Player

  Рет қаралды 186,550

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 301
@mcny40
@mcny40 2 жыл бұрын
I’m really impressed by how you always deliver this quality content. When I first saw the video length, I said to myself « certainly interesting but way too long ». I intended to only watch bits of it but ended up watching it entirely. What a great teacher you are! Perfectly paced tutorial.
@keremardicli4013
@keremardicli4013 2 жыл бұрын
Omg..same here. I told myself that I would skip css part but i watch all of it. The elegant yet simple solutions amazes me all the time. There is only a couple of things that i did not know in this video and they can be found on the net easily, yet I would not think that I can do this at all. After seeing this, I can say that it is fairly doable.
@Nexjsdeveloper
@Nexjsdeveloper 2 жыл бұрын
Ok
@stefanoesu426
@stefanoesu426 2 жыл бұрын
as a 34yold programmer, working in this web developing environment since 15 years, i have to say: you are a talent, a real one! good job and thx for the videos, they are inspiring and very useful
@ismailarame3756
@ismailarame3756 2 жыл бұрын
really cool man, you are a legend this tutorial will help me alot in my next project you are a saver thank you from the deep of my heart really appreciated work love your tutorials so much
@Crashman1012
@Crashman1012 2 жыл бұрын
As a junior dev, I love watching you make mistakes and play them off. I always do this on slack with my teammates😂 great job Kyle, thanks as always!
@senseicodes
@senseicodes 2 жыл бұрын
God tier level tutorial. Nice work Kyle.
@dennishofke
@dennishofke 2 жыл бұрын
Awesome video, but the topic I was interested in the most wasnt covered: sending the video in small pieces from backend to frontend (streaming). Could you cover that in a next video please?
@r.h.u.k.a
@r.h.u.k.a Жыл бұрын
Okay, I came into this after years following your channel and brother... I cannot describe how happy I am that you made this. Thank you so much for the help, I made a React version of this and it's looking amazing.
@DinoDiscoveryShorts
@DinoDiscoveryShorts 9 ай бұрын
do you still have the react js version of this?
@r.h.u.k.a
@r.h.u.k.a 9 ай бұрын
@@DinoDiscoveryShorts I do but it's private man hahahah I can also create an open one
@vagglord3156
@vagglord3156 9 ай бұрын
I'm curious to see the code if possible! If your GitHub is public, mind sharing your username?
@nedmerrill
@nedmerrill Жыл бұрын
Such a wealth of knowledge for any beginner developer here. I mean just overall how neat and thought through your code is, so pleasant to watch. Thank you brother.
@Stoney_Eagle
@Stoney_Eagle 2 жыл бұрын
Where were you when I needed this 😂, finally a good rock solid custom video player tutorial! 👌 I've made a Netflix video player including all it's crazy features, multi-audio multi-sub multi-quality resume playback, double tap left and right for seeking and I have my preview thumbnails in a sprite for efficiency 😉
@senseicodes
@senseicodes 2 жыл бұрын
Can you link your source below😂😂😂 thanks .
@Stoney_Eagle
@Stoney_Eagle 2 жыл бұрын
@@senseicodes hehe months of work to make it good, it's part of my software not open source sorry. I have twitch vods where I show it tho. 😉
@spieker131
@spieker131 2 жыл бұрын
Sheesh, that sound like a hell of a task to code.
@Stoney_Eagle
@Stoney_Eagle 2 жыл бұрын
@@spieker131 There's quite a bunch of work yeah. There's a video encoder and server that is part of it on the backend. It's all tied together with an API server that links your server and the ones you have access to from your friends and family to the player. And it all comes together as a selfhosted "Netflix" and I've been using it to play my dvds and blurays. No tracking and 100% privacy 😊
@senseicodes
@senseicodes 2 жыл бұрын
@@Stoney_Eagle oh I get it now. Private project. Nice.
@walterwhite621
@walterwhite621 9 ай бұрын
This tutorial is on another level. Like literally its off the scale.
@TERN666
@TERN666 2 жыл бұрын
Just an inch away from 1 million subs. You definitely deserve it. Wish you the best, man.
@leonardopillay4200
@leonardopillay4200 Жыл бұрын
Its guys like you that pioneer the startup community. Awesome work
@allanregista4422
@allanregista4422 2 жыл бұрын
You are The Real Deal Bro, many of ur contents are rare and exotics. Respect 🙏
@piyushjhaGeek
@piyushjhaGeek 2 жыл бұрын
I just made a custom video player last month, a bit different than this. The only thing I had issues was with implementing custom buffering animation. Proper events (waiting, stalked or pause) are not triggered during buffering as mentioned in MDN docs. Sometimes they do, sometimes they don't. And at the end after running out of ideas I had to check if the video is progressing after every second (unless the user has paused). It would be nice if you can make a video on that, thanks. And thanks for this video as well, our approach and coding styles are almost same haha.
@vinayakgandhi5690
@vinayakgandhi5690 2 жыл бұрын
Can you please help me understand, how we disabled the "save video as...: option from right click and also removed the download option from bottom right?
@passsacaglia
@passsacaglia 2 жыл бұрын
super cool! my dream project is to do an e course like podia or teachable - would u be able to show this??
@vinodvyavhare2851
@vinodvyavhare2851 Жыл бұрын
hey how can we change the quality of video??
@top.of.reddit
@top.of.reddit 9 ай бұрын
​​@@vinodvyavhare2851You would need to make a UI for it, and change the src of the video element to another video with different resolution
@kjul.
@kjul. 2 жыл бұрын
Thanks for actually creating it from scratch and not using some frameworks or pre-built modules. Great job!
@nickondrako
@nickondrako 2 жыл бұрын
These build videos have been baller. Great work Kyle.
@AmanSingh-px5if
@AmanSingh-px5if 2 жыл бұрын
Implemented a custom player like this 6 months back in react, and used states, onHover, onFocus events. Which as the video shows could have been done with just CSS (silly me). I could have saved a lot of complexity :) Thanks kyle!
@sciencegeeks1370
@sciencegeeks1370 2 жыл бұрын
Really needed this to finish my decentralized KZbin Thanks
@developerpranav
@developerpranav Жыл бұрын
Damn! Made it to the end. I always thought that browser functionality other than the basic image and CSS is very hard to deal with. Seems not anymore. Thanks for the great tutorial, I'd want to try to do this in react using React's useRef. Also learnt about specificity at the document level vs at the element level. Thanks again!
@Parken26
@Parken26 2 жыл бұрын
Brilliant! I have been looking and waiting for years, for soemone to do exactly what you have done now - thank you very very much for your efforts 🙋🏻‍♂️
@JacobDuenke
@JacobDuenke 2 жыл бұрын
This was one of the most fun tutorials I’ve seen in years. Thanks for the video, Kyle!
@rishabsharma5307
@rishabsharma5307 2 жыл бұрын
Love this kind of videos. keep up the good work
@davoudarsalani1888
@davoudarsalani1888 2 жыл бұрын
This is one of the most useful and to-the-point tutorials I've seen. Thanks Kyle!
@michy7
@michy7 Жыл бұрын
You know what bro you really be coming in clutch good looks
@Jai-xq5hi
@Jai-xq5hi 9 ай бұрын
Amazing knowledge and great teacher. Very well understanding concept. Thank you for this video
@Nikhilsingh-pp7cf
@Nikhilsingh-pp7cf 2 жыл бұрын
Great work man, was in real need of my own player to integrate in my website.
@ShawnRitch
@ShawnRitch 2 жыл бұрын
This is a great video for learning and dealing with functions & functional programming. I think we can all agree and thank you for creating and making this understandable. I have been a web developer for over eight years and never seen such a great example - especially for free. Well done sir!
@layeekromah4799
@layeekromah4799 2 жыл бұрын
Kyle has gone next level :) Great video as always
@QuadDrums
@QuadDrums 2 жыл бұрын
I was just thinking about how to code that up. You're a legend
@isabelphillips451
@isabelphillips451 2 жыл бұрын
This is again one of the best tutorial on this channel. 😍😍😍 ... Now I can build my own video player ... mhuaaaaaaaaa😘
@djibrilm__-
@djibrilm__- Жыл бұрын
much respects 🙌🙌🙌 i have never finished your videos without getting something advance...
@galaparadi
@galaparadi 2 жыл бұрын
I still doing my little project about custom HTML video player and i still kinda stuck. But then, i got notification about this video. Well, look like i got some nice reference for my little project. Thank you Kyle for making this.
@Acuce7ibd468j
@Acuce7ibd468j 2 жыл бұрын
Actually i recommend this channel for my students for Advanced and heavy Topics . I wish to learn more about Web Assembly too
@wassupdoc7742
@wassupdoc7742 2 жыл бұрын
Great video thank you VDS ♥
@Tesseus2006
@Tesseus2006 Жыл бұрын
Thank you for making this video. I am new to programing and would love to propose a video like this in react as a suggestion. I made a portfolio in react for data analysis and there are quite a few tutorial videos out there. But your work and cohesive explanation are always the best.
@davidd.larred7238
@davidd.larred7238 Жыл бұрын
You are a genius my friend, thank you very much for your help, keep going, god bless you.
@EzeJ99
@EzeJ99 2 жыл бұрын
Dude, you are awesome! Keep it up, i really enjoy your videos. Greetings from Argentina
@ArchIntelLTD
@ArchIntelLTD Жыл бұрын
I admit that you have done a great work here. God bless you
@hassaneoutouaya
@hassaneoutouaya 2 жыл бұрын
Thank you so much for broadcasting such a golden content !
@limeo.g
@limeo.g 2 жыл бұрын
Thank you for your hardwork to simplified a custom video player!
@azzen_v
@azzen_v 2 жыл бұрын
Really nice video! It would be so cool if you would have implemented the video sections functionality as well :)
@Raaaww
@Raaaww 2 жыл бұрын
I combine my preview files into a long image that I use as wallpaper in the preview window and then I move the wallpaper position depending on time. I also calculate the interval by video duration so a video that is 1 minute long get previews at a closer interval than a video that is an hour. Otherwise a video that is one minute would only have 6 previews and you would have to slide a 10th of the seek bar to see a new one.
@WebDevSimplified
@WebDevSimplified 2 жыл бұрын
That is an even better approach as it limits the download. KZbin does something similar but does it in chunks of around 50 previews per image.
@laptopstuff8886
@laptopstuff8886 7 ай бұрын
Yep, im trying to implement that. Im stuck a but. When im scrubbing, it doesnt display the thumbnail as one big image like it is supposed to. Instead it displays the sprite sheet. Looks weird. Can you help me with that?
@claeskarlsson6054
@claeskarlsson6054 7 ай бұрын
@@laptopstuff8886 maybe you need overflow: hidden on preview window or your background image width might be set to 100% instead of auto?
@ai_coding
@ai_coding Жыл бұрын
This is awesome! Thanks for the tutorial. Going to follow it using tailwind.
@anweshandev
@anweshandev 2 жыл бұрын
Now continuing, excellent video. Keep it up man!!!
@armancherkharov9410
@armancherkharov9410 10 ай бұрын
Gosh, exactly what I needed! Thanks a lot brother!
@jamalkheirbeik
@jamalkheirbeik 2 жыл бұрын
Great work man 👏🏻👏🏻
@Politirized
@Politirized 2 жыл бұрын
Top quality as always. As content I suggest you doing a video on doing a tumblr's discovery page. So like placement of images in a page without changing the aspect ratio of those images.
@DoubleDYouTube
@DoubleDYouTube 2 жыл бұрын
From an accessibility point of things, this is an amazing tutorial. Thanks!
@chinmaykunkikar
@chinmaykunkikar 2 жыл бұрын
This is quality content💯 Keep it up man :)
@berdinazarov6972
@berdinazarov6972 2 ай бұрын
super useful stuff you showed here, thanx a lot😍❤
@alexcross3165
@alexcross3165 Жыл бұрын
Very professional! Thank you so much for this amazing video!
@igdev6095
@igdev6095 2 жыл бұрын
Thanks for doing my recommend 🙊 Hope u make a video with canvas
@spreadItWide
@spreadItWide 2 жыл бұрын
For anyone trying to show/hide the player on cellphone fullscreens... I'm sure there is a better way of doing this.. or unless I missed something in this video . Here's a quick way: This will also work while out of fullscreen though so if you click in the container, it will still show/hide the controls, hover still works only if .hidden (Which is nice sometimes? lol idk) Add this to your CSS: .hidden { display: none; } Add this to your element variables: const videoControls = document.querySelector('.video-controls') Add this into your functions: videoContainer.addEventListener('click', e => { // Adds a class to the .video-controls element to show it videoControls.classList.toggle('active') if (e.target ) { checkIfActive() } }) function checkIfActive() { // if .video-controls also contains .active, remove .active and add .hidden to hide it if (videoControls.classList.contains('active')) { videoControls.classList.toggle('hidden') videoControls.classList.toggle('active') } } Please make this better if you can, I started to play around with screen.width in js with if statement, but this is good enough for me for now.
@mprasanth18
@mprasanth18 2 жыл бұрын
Today I was thinking like it would be cool to build a video player like KZbin. You read my mind.
@marekzabak
@marekzabak 2 жыл бұрын
This one is really cool. I would like to see this extended with aria-labels, mediaSession API and ChromeCast API, to be really complete player.
@sarthakchauhan1637
@sarthakchauhan1637 2 жыл бұрын
Amazing video! Could you please think about making the same youtube editor in React JS? Thanks
@NavyMan010
@NavyMan010 2 жыл бұрын
I am doing this right now use useRefs for the event listeners Like this example below This is not all of the code but should give some insight VANILLA JA const playPauseBtn = document.querySelector(".play-pause-btn") // Play/Pause playPauseBtn.addEventListener("click", togglePlay) video.addEventListener("click", togglePlay) function togglePlay() { video.paused ? video.play() : video.pause() } video.addEventListener("play", () => { videoContainer.classList.remove("paused") }) video.addEventListener("pause", () => { videoContainer.classList.add("paused") }) My REACT VERSION const vidRef = useRef(null); const vid = vidRef.current; const vidContainerRef = useRef(null); const vidContain = vidContainerRef.current; // Play / Pause const togglePlay = () => { vidRef.current.paused ? vidRef.current.play() : vidRef.current.pause(); }; const videoPause = () => { console.log("Paused"); vidContainerRef.current.classList.add("paused"); }; const videoPlay = () => { console.log("Playing"); vidContainerRef.current.classList.remove("paused"); }; return... Good Luck
@Coolantopa
@Coolantopa 2 жыл бұрын
Tnx kyle, a well needed one, u r z best
@Anonymous-rg1dd
@Anonymous-rg1dd 2 жыл бұрын
this kind of tutorial is really helpful
@alekseykosenko669
@alekseykosenko669 2 жыл бұрын
Hi, bro. Some styles for your slider: input[type=range] { -webkit-appearance: none; -moz-appearance: none; appearance: none; } input[type=range]::-webkit-slider-runnable-track { border-radius: 10px; height: 3px; background-color: #fff; } input[type=range]::-webkit-slider-thumb { background: #fff; border-radius: 10px; cursor: pointer; width: 12px; height: 12px; margin-top: -4px; margin-right: 5px; -webkit-appearance: none; } input[type=range]::-moz-range-track { border-radius: 10px; height: 3px; background-color: #fff; } input[type=range]::-moz-range-thumb { background: #fff; border-radius: 10px; cursor: pointer; width: 12px; height: 12px; margin-top: -4px; margin-right: 5px; }
@edutyl9372
@edutyl9372 Жыл бұрын
Absolute genius! thanks for this
@arnoldRiungu
@arnoldRiungu 8 ай бұрын
how do i make it using react
@tuku_mann
@tuku_mann 2 жыл бұрын
wow, that's an absolutely incredible tutorial
@nativeKar
@nativeKar 2 жыл бұрын
This video is a gem.
@andradegilmar
@andradegilmar Жыл бұрын
This tutorial is awesome!
@Barahten2010
@Barahten2010 Жыл бұрын
Hello could you add to your video and show how it would be possible to implement a timeline in timecode segments?
@kwasiezor1630
@kwasiezor1630 11 ай бұрын
Amazing tutorial 🎉
@vernevens1598
@vernevens1598 10 ай бұрын
I'm trying to make my own media server front end for a server I built from an old desktop computer that I loaded with Ubuntu server. I just started learning web development in Sept 2023. Thanks for your video.
@SirChogyal
@SirChogyal 2 жыл бұрын
Very interesting. Now we can design anything!
@facts36936
@facts36936 Жыл бұрын
This is a great video for learning operation with video player. Thank you for making this video. Could you please tell me how to add chapters like youtube in custom player?
@rubenpoppe
@rubenpoppe 2 жыл бұрын
You can add css accent-color to change the color of the slider (and other browser inputs).
@edutyl9372
@edutyl9372 Жыл бұрын
Thanks for the tip
@AutisticThinker
@AutisticThinker 2 жыл бұрын
49:00 - Cough, magic numbers? 😁
@LzysGraphics
@LzysGraphics 2 жыл бұрын
If you wanted to keep the same method for detecting what the fullscreen and picture-in-picture button should do when clicked, you can also see if the video is in picture-in-picture by calling document.pictureInPictureElement, just as you did for the fullscreen element.
@TheSoftEng
@TheSoftEng 2 жыл бұрын
@WebDevSimplified
@WebDevSimplified 2 жыл бұрын
Thank you so much for the support!
@igdev6095
@igdev6095 2 жыл бұрын
Hope u make these with scss instead css for tasks quicker
@deansmith8624
@deansmith8624 8 ай бұрын
I hope I don't sound too ignorant (unaware) here but if I could get you to let me know where to download the KZbin Video Player you are using in this video I would appreciate it. I spent the last hour looking but to no avail, Sorry. Thanks.
@rlopez6636
@rlopez6636 2 жыл бұрын
This makes me think differently. .thank man
@bishwajeetpandey1570
@bishwajeetpandey1570 2 жыл бұрын
Wow men thx , i learnt alot from this tutorial
@mohammedtahabmt3256
@mohammedtahabmt3256 2 жыл бұрын
Great video bro, Please make another for audio player like soundcloud
@Dxphantomgxc-fm6gt
@Dxphantomgxc-fm6gt 10 ай бұрын
@WebDevSimplified please is it possible for me to create a video player in html that actually plays all video in my site without a need for me create a html file for all the videos, So if i click any video it automatically plays using this customized video player and if i should click next it actually goes to the next video, eg: S01E13 when I click next S01E14 instead of random videos.. Thanks alot
@esteban_9049
@esteban_9049 Ай бұрын
Perhaps I'm late but, you can do that either with JS or a framework like Django, Django being easier. The JS approach can be done with a function(url,metadata){ theHTML = ` ${metadata} ` }
@yasirhantoush
@yasirhantoush 6 ай бұрын
This is amazing, wow. perfect
@JtagSheep
@JtagSheep Жыл бұрын
For google chrome in recent versions autoplay will only work if the video player is muted to start with, chrome tries to prevent browser tabs from playing unwated audio unless the user has interacted with the window.
@uchoatran1917
@uchoatran1917 Жыл бұрын
Great video. 😍
@jamshediqbal7936
@jamshediqbal7936 2 жыл бұрын
Hi Kyle, I need it this coming week and your video came out right in time. How can you read my mind? I need it in React project but it will surely help me to create a video player component. Thank you so much, Kyle.
@CreativeTutorialsWeb
@CreativeTutorialsWeb 2 жыл бұрын
Very interesting great work
@jampy42
@jampy42 2 жыл бұрын
Is there any library or way to add chapters too? like youtube that you can add chapters and go to that specific part
@geforcesong
@geforcesong 2 жыл бұрын
great tutorial
@mannixmd
@mannixmd 2 жыл бұрын
You can change the color of the volume slider with accent-color property just FYI
@be2wa
@be2wa 2 жыл бұрын
Another cool video, sir! If I could throw my two tiny cents though I would say the serif font within the controls kinda hurts the eyes.
@codlover1468
@codlover1468 2 жыл бұрын
Awesome video
@TMercury480
@TMercury480 2 жыл бұрын
Hey, I have a problem where the "loadeddata" video event doesn't trigger itself on load 1/4 of the time but the video is loaded and playable (tried on both Firefox & Chrome). Any advice?
@ventsislavstoimenov4404
@ventsislavstoimenov4404 2 жыл бұрын
Man, you are extremely skilled 👏👌1️⃣0️⃣
@david.kizivat
@david.kizivat 2 жыл бұрын
Material for part 2: go to some long video (I think is > 2h) and while scrubbing move the cursor up - it zooms in the timeline for finer movement.
@csspdnet3399
@csspdnet3399 Жыл бұрын
Hello, Can you please have a short video about fullscreen video with overlay, it can not be done with html video tag. Thank you.
@alibadra5367
@alibadra5367 2 жыл бұрын
Awsome , can you do famous app cloning with react like cloning twitter of netflix or something like this
@thescientisthorse
@thescientisthorse 4 ай бұрын
Pretty awesome. The pictureinpicture functionality is not currently supported in Firefox.
@oskarkottom8365
@oskarkottom8365 2 жыл бұрын
Where is the video quality? Otherwise great video love your content
@fiifiyawson8397
@fiifiyawson8397 2 жыл бұрын
it crazy how i was just thinking of this today
@TheScriptingLegend
@TheScriptingLegend 2 жыл бұрын
Kyle: it has everything you can think of. Me: Changing resolution? Answer ofc not
@aryankumar87771
@aryankumar87771 2 жыл бұрын
please teach how to downgrade the quality and pull different video qualities from a node server ( 144p, 240p, 360p, 720p, 1080p and so on ) ?
@charanpapolu007
@charanpapolu007 10 ай бұрын
Hi, i need a video player with segments highlighted on the seek bar , so that i can jump to segment to segment easily using reactjs
@yongcao2780
@yongcao2780 2 жыл бұрын
This is amazing!
@1kilo368
@1kilo368 Жыл бұрын
Why doesn't my element display the video on the screen on liveserver even though when I check the link it takes me to the actual video and plays it.
I Redesigned the ENTIRE YouTube UI from Scratch
19:10
Juxtopposed
Рет қаралды 933 М.
Can I Create Netflix’s Video Carousel UI?
1:01:10
Web Dev Simplified
Рет қаралды 134 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Build A Pokémon Application With React - Tutorial
22:47
Web Dev Simplified
Рет қаралды 185 М.
How To Create A Simple React Clone With Hooks
28:35
Web Dev Simplified
Рет қаралды 36 М.
Can I Create This Tricky Animated CSS Sidebar?
1:01:37
Web Dev Simplified
Рет қаралды 204 М.
"For $35,000 I'd Expect it to be Perfect"
42:13
Blacktail Studio
Рет қаралды 4,9 МЛН
Can I Create Online Tutorial’s Magic CSS Indicator?
1:04:16
Web Dev Simplified
Рет қаралды 93 М.
Want to make a video chat app? Watch this video for WebRTC!
1:22:35
Good Morning Developers
Рет қаралды 48 М.
Learn DOM Manipulation In 18 Minutes
18:37
Web Dev Simplified
Рет қаралды 1 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН