Hi everyone, hey, in this tutorial we get this video... to play when we hit the Play button, pause when we hit the Pause button... we'll get the sound to turn on and off with the Mute button... and we'll get it to skip ahead 5 seconds... it's actually only 2 seconds, because it turns out... I picked a video that's only 4 seconds long...
"Good work, Dan, but hey, it works, let's dive in. All right, to get started I have brought in some icons from our Exercise Files... I've put some in there, called Icon, there's, called Video Icon... there is six of them... brought them in, made them an appropriate size, I used 32 pixels... made them white and it's on my Components page...
on this other page I have got an image... I have got a video that is a pug, that is on a motorbike, of course... so it's just a video, import it any which way you like... and put a purple box underneath... we'll go into a bit more full detail in the next video... but for the moment let's just get it going.
So first up I'm going to need... 'Shift I', and I'm going to go to my 'Components', going to type in "play"... so I've got a Play button here... I'm going to put it down, going to put it where I want it... and I'm going to switch to Prototype mode, 'Shift E'... and I'm going to say, when this is clicked, or tapped, in my case...
it's going to just automatically jump to this... but if it's not go down to Play/Pause, find the video... and mine's going to be a Toggle, we'll toggle to start with... and now we're just going to preview it... so I'm going to click the video title, let's preview... all right, video with audio, there you go, Play/Pause, Play/Pause.
Couple of things we need to do is one is that it auto plays... so I've got it selected, I'm going to turn Autoplay off... so let's preview now, Play/Pause, Play/Pause. The other thing I might want to do is, I'm going to have it mute by default... you might not have heard it across the microphone here... but there's audio on this one...
if you do want the same video it's in your 'Exercise Files', under 'Videos'... it's called '05'... and I've kind of chopped mine down a little bit to fit more in my window. So what we want to do, it's not easy, we'll do it in the next one... it's not easy just to toggle between an icon that is Play and Pause... you can, but you can't do that and get it to play the video at the moment...
or at least I can't... so I'm going to show you what we're going to do... and if you find a better way let me know in the comments. So what I want to do is, I'm going to select this one... I'm going to, 'Command D', or 'Ctrl D', so I got two of them... and I'm going to switch out this icon here...
so the icon at the moment is the icon of Play... let's go get icon of Pause... and let's select it in Prototype mode, click on this... so On Tap this is going to Play/Pause... but what do we want to do? I want it to pause only...
and this one I would like to... toggle, no, I want it to play only, there we go... let's give it a preview, see how it works. So it's not playing, which is good, let's get it to play... hey, pause it, hey, Play/Pause, there we go... let's get a Mute button going, like you can imagine...
yeah, I'll show you the other ones, but it's going to be the same... which seems appropriate, does that look like Thailand? Anyway... same same, but different, and what we're going to do is, 'Shift E'... we're going to replace this one with the 'Mute'... and very easy, we're going to go to Prototype, 'Shift E'...
and say, when this is tapped, not Play/Pause, Mute/Unmute... we'll get that one to toggle... all right, let's go... you can't really hear, can you hear? You might have heard it in the background... the editor might have bumped up the sound a little bit...
so you can hear the motorbike... let's do one more, let's do the... so duplicate, move this one across, let's switch out the icon, the one... I'm not sure what the go forward 10 seconds one is... I kind of looked at a few apps, and what is the bump forward 10 seconds? I looked at YouTube and Audible, and a few other ones...
couldn't find a specific one, so I just kind of made this... put this loop one in here, that I found... that one's already 32, I'm going to make it white... let's speed this up. One thing, I flipped this one, let's undo that... just in case you don't know, well, if you just drag it, eventually flips...
so that's what I did, I just kind of went... and I held down 'Shift Option' to get it to go from the center... and then I just made sure it was 32 pixels, I'm just eyeballing the frame over here... there we go, so it's going forward 10 seconds, you wait there... what do we think, does that look like a proper icon? Going to convert it to a symbol, rename it...
so I've got now a symbol that should go to my Components library... but I'm going to leave it there... I need to thicken up the line as well, but you get the idea, right? I need an instance of it... there we go, yeah, not thick enough, but anyway... what we want to do for this this one, 'Shift E' is, say...
this one here, when it is tapped I want it to... so I'll only do jump forward and back, jump to specific time... is the same, you can pick a time in your video, to jump it to... I'm just going to get it to jump forward 5 Seconds, 10 seconds... oh, I think I wanted to be 5, I'm not sure... I'm not sure this video is 10 seconds or long...
you get the idea. So let's give that one a preview, let's have a look, reset it... I do not want to reset it... because I don't have a flow on this one, so I need to, 'Shift E... so I need to click on this time... let's start a flow point here, so at least it defaults to it...
play, skip 10... yeah... play, skip 10, or 5, in my case... mine's kind of looping back. "How long is this video, Dan?" Check this before we get started... how to check it?
Go to 'Design' mode... click on our 'Fill', and it is exactly... I don't think you can-- look... I need to jump 1 second, you get the idea... let's make it 1 second... all right, I got one to jump 2 seconds, you wait, we reset...
oh yeah, genius Dan... okie dokie, why do we have two of these? Can't remember... anyway, we've got two Mute buttons, we've got one Play, one Pause... you could get the idea for Stop, it has a stop action in there as well... doesn't get used very often in these sorts of playbacks...
let me just pause forever... and just a reminder as well, if your video is not playing for some reason... it is because your design file is either in Drafts... one of two things, it's either in Drafts... and/or, it's not in a paid team plan... both of those things need to happen at the moment to be using videos...
that might change in the future, there you go... does that annoy everybody? Too skinny, yes, I should go fix it up... I'm not going to do right now, all right, I'll see you in the next video. Okay, I'm going to change it, main component, go to 'Main Component'... 'Command' click it, so we jump straight in...
I'm going to 'Shift' click both of those, go from 2 to 3, that's 4... 3 looks good, well actually, doesn't match, much better... oh, the circle's not the right-- ah... it's a fun game of trying to match icons, that's good enough for now... let's go on to the next video... but your text is not centered, oh...
that's it, definitely it, let's go on.