VideoJS ASS does not work on pages with RewriteRule

0

I use RewriteRule (.*) /index.php [QSA,L] and to manage URLs I use this code:

<?php

$url = ltrim( parse_url( $_SERVER['REQUEST_URI'] , PHP_URL_PATH ) , '/' );
$url = explode( '/' , $url );

if(count($url) == 1)
{
if(file_exists(DIR_PAGES.$url[0].'.php'))
{
    if($url[0] == 'home')
    {
        $pag = DIR_PAGES.'home.php';
    }
    else
    {
        $pag = DIR_PAGES.$url[0].'.php';
    }
}
else if(file_exists(DIR_PAGES.$url[0]) && $url[0] != '')
{
    header('Location: '.SITE_URL.substr($url[0], 0, -4));
}
else if($url[0] == '' || $url[0] == null)
{
    $pag = DIR_PAGES.'home.php';
}
else
{
    header('Location: '.SITE_URL);
}
}
else if(count($url) == 2)
{
if($url[0] == 'stream' || $url[0] == 'newstream')
{
    if($url[1] != '' || $url[1] != null)
    {
        if($url[0] == 'stream')
        {
            $pag = DIR_PAGES.'stream.php';
        }
        else
        {
            $pag = DIR_PAGES.'newstream.php';
        }
    }
    else
    {
        header('Location: '.SITE_URL);
    }
}
else
{
    header('Location: '.SITE_URL);
}
}

I am using, however when accessing site.com/newstream/some the VideoJS ASS stops working.

    videojs('player', {
    controls: true,
    nativeControlsForTouch: false,
    fluid: true,
    plugins: {
      ass: {
        'src': ["./vjs/002.ass"],
        'delay': 0
      }
    },
    sources: [{"type": "video/mp4", "src": "/files/video.mkv"}]
    });
    
asked by anonymous 05.05.2017 / 23:17

0 answers