Ratio GHSdk Example Page

This is an example page showcasing the Ratio GHSdk library.

Welcome to the Ratio GHSdk example page. This is a simple demonstration of how to integrate the GHSdk library into a web application. The GHSdk provides a wide range of features including streaming, playback, and management of media assets. This example page includes basic functionality such as playing a video stream and managing the player's state.

To get started, you will need to include the GHSdk JavaScript library in your HTML file. You can copy and paste the following code snippet into your HTML file:


        
        

Once the library is included, you can initialize the player and play a video stream using the following code:


        const player = new ghsdk.Player({
            container: document.getElementById('player'),
            url: '/video.mp4'
        });
        player.play();
        

The above code will create a player element with the id "player", and play the video stream located at /video.mp4. You can replace the URL with your own video stream address.

If you want to customize the appearance of the player, you can use the various options provided by the GHSdk library. For example, you can set the width, height, background color, and more.

You can also manage the player's state through the GHSdk library. For example, you can pause, resume, or stop the video stream using the available methods.

For more information about the GHSdk library and its features, please refer to the official documentation at GitHub.