Access-Control-Allow-Origin ошибка в скрипте jwplayer - PullRequest
0 голосов
/ 23 июня 2018

Я новичок здесь.У меня проблема в Access-Control-Allow-Origin.

Вот мой скрипт

<?php
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Credentials: true');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Max TV Bangla | Live (Test Transmission)</title>



<!-- JW Player Library -->
<script src="https://content.jwplatform.com/libraries/T321vYRO.js"></script>


</head>

<body style="background: #2f3542;">

<div align="center">
    <div style="width: 75%; padding:5px; color: #ffffff; font-size: 30px; font-weight: bold;">
        Max TV Bangla | Live (Test Transmission)
    </div>
    <div style="width: 75%; height: 100%; padding: 5px;">
        <!-- div for the player -->
        <div id='playerKXSDPIwKERSv'></div>
    </div>

</div>

</body>




<!-- Script to display video file in the player div -->
<script type='text/javascript'>
    jwplayer('playerKXSDPIwKERSv').setup({
        // URL to the video file
        file: 'http://103.106.237.73:8080/hls/maxtvbangla.m3u8',
        //http://103.106.237.73:8080/hls/maxtvbangla.m3u8
        //https://ssh101.com/m3u8/dyn/maxtvbangla/index.m3u8
        // URL to the image that should be shown before the video is started
        image: 'http://content.jwplatform.com/thumbs/sB0jqeIC-720.jpg',
        title: 'Max TV Bangla | Live (Test Transmission)',
        width: '100%',
        aspectratio: '16:9'
    });
</script>

</html>

Мне не удалось загрузить http://103.106.237.73:8080/hls/maxtvbangla.m3u8: Нет 'Access-Control-AllowЗаголовок -Origin 'присутствует на запрашиваемом ресурсе.Следовательно, Origin 'http://expertitbd.com' не разрешен доступ с консоли.

Прямая ссылка: http://expertitbd.com/MAXTVLIVE/index.php

Я хочу решить эту проблему, почему я столкнулся с этой проблемой.Речь идет о jwplayer ...

Спасибо Макс

...