In this lecture, we were going to initialize the video player VIDEO James offers a simple function
for initializing a video player to get started.
Open the clip component class file.
At the top of the file import, the video function from the video dogs package.
The video function will help us with creating a player before we create the player, we should create
a property for storing the player instance in the class.
Define an optional property called player.
It'll be annotated with the video player class.
An instance of the player class is returned by the video J.S..
The last step is to call this function inside the nji on innate function.
Let's update the player property to the video function.
The video function has a couple of arguments.
The first argument is the element of the video player.
In the previous lecture, we stored the video element in a property called Target.
Let's pass in the target question mark that native element property.
The target property is an instance of the element reference class.
This class acts as a wrapper around the element.
However, the video function wants direct access to the element.
We can provide direct access through the Native Element property.
After making those changes, let's check out the app in the browser.
The video player should be functional.
It doesn't look appealing, but that's all right under the player.
There's going to be random gibberish.
These are elements that are stylized by any video package.
We haven't had the opportunity to load the style sheets from the package.
Let's take care of this step in the next lecture.