How to make playlist for using in SS IPTV

SS IPTV uses playlists that meets Extended M3U specification. Detailed info about file's structure you may be found in our article About M3U.

It is important to remember that cross-domain requests are forbidden on LG Smart TVs, so the loading will be realized not by a client device itself, but by the app's server. It means, the link to the file has to be available from the external network (or for the app's server at least). If you want the client device to load your playlist directly, you need to configure your server according to CORS technology. In practice, response's http-header has to contain the following string:

Access-Control-Allow-Origin: *

The information below describes how to make CORS for different platforms

To add the CORS authorization to the header using Apache, simply add the following line inside either the <Directory>, <Location>, <Files> or <VirtualHost> sections of your server config (usually located in a *.conf file, such as httpd.conf or apache.conf), or within a .htaccess file:

Header set Access-Control-Allow-Origin "*"

To ensure that your changes are correct, it is strongly reccomended that you use

apachectl -t

to check your configuration changes for errors. After this passes, you may need to reload Apache to make sure your changes are applied.
To CORS-enable Microsoft IIS6, perform the following steps:
  1. Open Internet Information Service (IIS) Manager
  2. Right click the site you want to enable CORS for and go to Properties
  3. Change to the HTTP Headers tab
  4. In the Custom HTTP headers section, click Add
  5. Enter Access-Control-Allow-Origin as the header name and * as the header value
For Microsoft IIS7, merge this into the web.config file at the root of your application or site:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <system.webServer>
   <httpProtocol>
     <customHeaders>
       <add name="Access-Control-Allow-Origin" value="*" />
     </customHeaders>
   </httpProtocol>
 </system.webServer>
</configuration>

If you don't have a web.config file already, or don't know what one is, just create a new file called web.config containing the snippet above
If you don't want to change configuration of your server, you can use PHP to add the necessary header to the separate file:
<?php
header("Access-Control-Allow-Origin: *");
$playlist = file_get_contents('playlist.m3u');
echo($playlist);
?>
In this example the link to the playlist for SS IPTV will be the link to php-file.