Introduction
A transport stream that offers more than one program is called a Multiple Program Transport Stream (MPTS). If you are looking to view a program from the MPTS using JS on H200, you have come to the right place. In this article, we will provide you with a comprehensive guide on how to do so.
Prerequisites
Required H200 software version : 25.3.2310.7R or later.
Summary
Viewing a program from the MPTS using JS is a simple process that involves creating a player instance and setting the dataSource. By following the comprehensive guide provided in this article, you can easily view your favorite programs from the MPTS with ease.
Procedure
- Step 1: Create a Player Instance
The first step in viewing a program from the MPTS using JS is to create a player instance. This can be done using the following JS call:
var plr = ENABLE.player.getInstance(0);
This will create a player instance that can be used to view the program.
- Step 2: Set the DataSource
The next step is to set the dataSource for the player instance. This can be done using the following JS call:
plr.setSource("udp://<mcast>?prog_id=<pid>");
Here, <mcast> is the multicast address for the MPTS. For example, if the multicast address is 233.22.134.221:8110, then <mcast> would be 233.22.134.221:8110.
<pid> is the program number of the channel that you want to view. For instance, if the program number is 100, then <pid> would be 100.
- Step 3: View the Program from webview of default browser
Once you have created the player instance and set the dataSource, you can view the program from the MPTS via default browser.
References
This article attached a sample page to play a program with program number = 100 from a MPTS stream with multicast address 233.22.134.221:8110 .