1 00:00:00,120 --> 00:00:06,420 In this lecture, we were going to initialize the video player VIDEO James offers a simple function 2 00:00:06,420 --> 00:00:09,750 for initializing a video player to get started. 3 00:00:09,780 --> 00:00:12,270 Open the clip component class file. 4 00:00:14,700 --> 00:00:20,610 At the top of the file import, the video function from the video dogs package. 5 00:00:23,060 --> 00:00:29,300 The video function will help us with creating a player before we create the player, we should create 6 00:00:29,300 --> 00:00:33,110 a property for storing the player instance in the class. 7 00:00:33,260 --> 00:00:35,840 Define an optional property called player. 8 00:00:36,220 --> 00:00:40,100 It'll be annotated with the video player class. 9 00:00:42,540 --> 00:00:46,320 An instance of the player class is returned by the video J.S.. 10 00:00:47,130 --> 00:00:52,250 The last step is to call this function inside the nji on innate function. 11 00:00:52,320 --> 00:00:56,160 Let's update the player property to the video function. 12 00:01:00,570 --> 00:01:03,600 The video function has a couple of arguments. 13 00:01:03,810 --> 00:01:06,990 The first argument is the element of the video player. 14 00:01:07,350 --> 00:01:12,570 In the previous lecture, we stored the video element in a property called Target. 15 00:01:12,870 --> 00:01:17,610 Let's pass in the target question mark that native element property. 16 00:01:20,140 --> 00:01:23,980 The target property is an instance of the element reference class. 17 00:01:24,310 --> 00:01:27,250 This class acts as a wrapper around the element. 18 00:01:27,550 --> 00:01:32,050 However, the video function wants direct access to the element. 19 00:01:32,380 --> 00:01:36,280 We can provide direct access through the Native Element property. 20 00:01:36,880 --> 00:01:40,630 After making those changes, let's check out the app in the browser. 21 00:01:43,140 --> 00:01:45,120 The video player should be functional. 22 00:01:45,300 --> 00:01:48,750 It doesn't look appealing, but that's all right under the player. 23 00:01:48,780 --> 00:01:50,640 There's going to be random gibberish. 24 00:01:50,910 --> 00:01:54,890 These are elements that are stylized by any video package. 25 00:01:55,170 --> 00:01:59,040 We haven't had the opportunity to load the style sheets from the package. 26 00:01:59,250 --> 00:02:02,010 Let's take care of this step in the next lecture.