The Playlink app allows the integration of various streaming sources through a link system. Each link can provide metadata about the source, including how to fetch and display the media content. This document explains how to create a metadata file for your link to be compatible with the Playlink app.
Each link requires a JSON file that contains specific metadata fields. Below is an example structure:
{
"name": "ExampleLink",
"image": "https://example.com/logo.png",
"embed_url": "https://example.com/embed/{t}/{i}",
"tv_embed_url": "https://example.com/embed/{t}/{i}/{s}/{e}",
"stream_type": "webview"
}
name: The name of the streaming source or link.
image: The URL to the logo or image representing the streaming source.
embed_url: The URL template for embedding a movie. The placeholders are as follows:
tv_embed_url: The URL template for embedding a TV show episode. The placeholders are as follows:
Note: The embed_url or tv_embed_url is not hosted by Playlink. It should be deployed on your own hosting service or a third-party API. Ensure it returns the required JSON structure as in the preview below.
stream_type: Indicates the type of content the URLs will return. It can be either:
If you set the stream_type to "api", the embed_url or tv_embed_url must return a JSON object with the following structure below:
{
"qualities": [
{
"name": "1080p",
"link": "https://example.com/beautiful.mp4"
},
{
"name": "Auto",
"link": "https://example.com/master.m3u8"
}
],
"subtitles": [
{
"name": "English",
"link": "https://example.com/en.vtt"
},
{
"name": "Spanish",
"link": "https://example.com/es.srt"
}
]
}
qualities: An array of available video qualities. Each object contains:
subtitles: An array of available subtitles. Each object contains:
By using the "api" stream type and returning JSON responses, the Playlink app will start streaming the media in the internal built-in video player instead of a web view. This ensures a more seamless and enhanced viewing experience for users, especially when dealing with HLS streams or MP4 files.
This metadata structure allows the Playlink app to integrate various streaming sources flexibly. By properly configuring the metadata JSON file and ensuring the correct structure for API responses, you can extend the functionality of the Playlink app with your custom links while providing users with a superior streaming experience.