Skip to main content

Classes

Explore the various classes that form the backbone of our IPTV JSON system, each designed to organize and deliver multimedia content effectively.

Class Definitions

Provider

The Provider class serves as the primary entity for managing and distributing multimedia content within the IPTV system architecture. This class implements a hierarchical content organization structure through channels and groups, while providing comprehensive configuration capabilities for system operations.

Key architectural components and functionalities include:

  • Multi-language support through IMultiLanguageText interface
  • Theme color support through IThemeColors interface
  • Hierarchical content management through groups and channels entities
  • Advanced UI rendering configurations via IImage interface
  • Sort configuration via ISortItem for customizable sorting of results
  • Advanced content discovery through ISearchConfig interface
  • Authentication and authorization via IRequestHeaderRow interface
  • Scalable content delivery using IPaging interface
  • Detailed pagination metadata through IPageInfo interface
  • Organization metadata through IOrgMetadata interface
  • Share configuration via IRemoteData interface
  • Notice configuration via INotice interface
class Provider {
id: string;
name: string | IMultiLanguageText;
url: string;
color?: string | IThemeColors;
description?: string | IMultiLanguageText;
image?: IImage;
grid_number?: number;
groups?: Array<Group>;
channels_title?: string | IMultiLanguageText;
channels?: Array<Channel>;
paging?: IPaging;
pageInfo?: IPageInfo;
sorts?: Array<ISortItem>;
search?: ISearchConfig;
request_headers?: Array<IRequestHeaderRow>;
org_metadata?: IOrgMetadata;
share?: IRemoteData;
notice?: INotice;
}

Group

The Group class implements a hierarchical content organization system within the IPTV architecture, facilitating efficient content categorization and discovery. This class provides the following core functionalities:

Technical capabilities and implementation features:

  • Multi-language support through IMultiLanguageText interface
  • Hierarchical content management through structured channels collections
  • Advanced UI rendering optimization via IImage interface implementation
  • Real-time content synchronization through IRemoteData integration
  • Promotional content delivery system via Banner component integration
class Group {
id: string;
name: string | IMultiLanguageText;
display: GROUP_DISPLAY;
content_display?: CONTENT_GROUP_DISPLAY;
enable_detail?: boolean;
image?: IImage;
grid_number?: number;
href?: string;
channels_title?: string | IMultiLanguageText;
channels?: Array<Channel>;
groups?: Array<Group>;
sorts?: Array<ISortItem>;
search?: ISearchConfig;
remote_data?: IRemoteData;
org_metadata?: IOrgMetadata;
}

export enum GROUP_DISPLAY {
SLIDER = 'slider',
HORIZONTAL = 'horizontal',
VERTICAL = 'vertical',
BANNER = 'banner',
GROUP_ROUND = 'group-round',
GROUP_SQUARE = 'group-square',
}

export enum CONTENT_GROUP_DISPLAY {
TEXT_BELOW = 'text-below',
TEXT_ABOVE = 'text-above',
THUMBNAIL_ONLY = 'thumbnail-only',
}

Channel

The Channel class defines individual media channels within the IPTV system, providing the following key features:

  • Multi-language support through IMultiLanguageText interface
  • Visual customization via IImage interface for channel thumbnails
  • Content organization through arrays of Source objects
  • Remote data integration through IRemoteData
class Channel {
id: string;
name: string | IMultiLanguageText;
label?: string | IMultiLanguageText;
description?: string | IMultiLanguageText;
image?: IImage;
type: CHANNEL_TYPE;
display: CHANNEL_DISPLAY_TYPE;
enable_detail?: boolean;
force_landscape?: boolean;
sources?: Array<Source>;
href?: string;
remote_data?: IRemoteData;
related?: Related;
share?: IRemoteData;
}

enum CHANNEL_TYPE {
PLAYLIST = 'playlist',
SINGLE = 'single',
BANNER = 'banner',
}

enum CHANNEL_DISPLAY_TYPE {
DEFAULT = 'default',
THUMBNAIL_ONLY = 'thumbnail-only',
}

Source

The Source class represents multimedia content within the IPTV system, serving as a container for streaming content organization. Key features include:

  • Multi-language support through IMultiLanguageText interface
  • Flexible visual customization through IImage, enabling tailored presentation of media thumbnails and content
  • Dynamic content integration through IRemoteData, enabling real-time updates and adaptive content management
class Source {
id: string;
name: string | IMultiLanguageText;
image?: IImage;
contents?: Array<Content>;
remote_data?: IRemoteData;
}

Content

The Content class represents a collection of streams within a media source, providing organized content management. Key features include:

  • Multi-language support through IMultiLanguageText interface
  • Visual customization through IImage interface for content thumbnails and artwork
  • Stream organization using an array of Stream objects for structured content delivery
  • Dynamic content updates through IRemoteData integration for real-time data synchronization
class Content {
id: string;
name: string | IMultiLanguageText;
thumbnail_streams?: boolean;
grid_number?: number;
image?: IImage;
streams?: Array<Stream>;
remote_data?: IRemoteData;
}

Stream

The Stream class represents a stream within a content collection, providing configuration for media delivery. Key features include:

  • Multi-language support through IMultiLanguageText interface
  • Visual customization through IImage interface for stream thumbnails and artwork
  • Multiple streaming options via an array of StreamLink objects for different quality levels and formats
  • Dynamic content updates through IRemoteData integration for real-time data synchronization
class Stream {
id: string;
name: string | IMultiLanguageText;
image?: IImage;
stream_links?: Array<StreamLink>;
remote_data?: IRemoteData;
}

The Related class manages configurations for displaying related content, enhancing the viewer's engagement by providing links to additional relevant media. Key features include:

  • Multi-language support through IMultiLanguageText interface
  • Dynamic content suggestions via an array of Channel objects, facilitating personalized content discovery and improving user retention
  • Flexible data retrieval with custom HTTP request_headers, ensuring secure and efficient content fetching
class Related {
url?: string;
channels_title?: string | IMultiLanguageText;
channels?: Array<Channel>;
request_headers?: Array<IRequestHeaderRow>;
}

The StreamLink class specifies individual media stream sources, crucial for providing diverse viewing experiences. Key features include:

  • Multi-language support through IMultiLanguageText interface
  • Comprehensive subtitle support through an array of Subtitle objects, enabling multi-language accessibility and enhancing viewer experience across diverse audiences
  • Customizable network configurations via request_headers, allowing for precise control over stream-specific HTTP requests and optimizing data transfer
  • Enhanced viewer interaction through an optional array of Comment objects, facilitating multiple chat or comment streams to boost engagement and community participation
class StreamLink {
id: string;
server_id?: string;
name: string | IMultiLanguageText;
type: STREAM_LINK_TYPE;
default: boolean;
url: string;
request_headers?: Array<IRequestHeaderRow>;
enableP2P?: boolean;
subtitles?: Array<Subtitle>;
comments?: Array<Comment>;
}

enum STREAM_LINK_TYPE {
HLS = 'hls',
WEBVIEW = 'webview',
}

Comment

The Comment class manages configurations for adding viewer interaction features to a stream, such as live comments or feedback. Key features include:

  • Multi-language support through IMultiLanguageText interface
  • Customizable HTTP request configuration using an array of IRequestHeaderRow, enabling secure and efficient data retrieval for comment streams
class Comment {
name: string | IMultiLanguageText;
url: string;
request_headers?: Array<IRequestHeaderRow>;
}

Subtitle

The Subtitle class handles the inclusion of subtitles in media streams, providing accessibility and language support for viewers.

Key features include:

  • Multi-language support through IMultiLanguageText interface
  • Customizable HTTP request configuration using an array of IRequestHeaderRow, enabling secure and efficient data retrieval for subtitle streams
class Subtitle {
url: string;
label: string | IMultiLanguageText;
default: boolean;
request_headers?: Array<IRequestHeaderRow>;
}