I have a problem when generating a player in php with JwPlayer, the problem is that the player takes the link of my page plus the link where the video is hosted link
To generate the video, the page where it is hosted uses JSON:
$id = $_GET['id'];
$url = "https://webdondesealojaelvideo.com/getpublinkdownload?code=".$id."";
$json = file_get_contents($url);
$json_data = json_decode($json, true);
$host = $json_data["hosts"][0];
$path = $json_data["path"];
and I try to generate the link to the video in the following way:
<script type="text/javascript">
sources: [<?php echo '{file:"' . $host . '' . $path . '",label:"low",type: "video/mp4",default: true}'; ?>],
logo : {file: "",
link: "",
hide: true,
},
abouttext: "",
aboutlink: ""
});
</script>
and the following is generated:
<video src="/mipágina.com/linkdevideo.com/cBZgcAkZEbjaY7ZZZu6GNq7ZQ5ZZawVZkZSbAWZYXZf7ZqZdVZVkZaXZS7ZWkZ37ZKkZnXZg7ZRVZsVZfDhbZFUWPmCQvU54rv1QEOmXIojUjKIsX/video.mp4"></video>
and should generate the following:
<video src="linkdevideo.com/cBZgcAkZEbjaY7ZZZu6GNq7ZQ5ZZawVZkZSbAWZYXZf7ZqZdVZVkZaXZS7ZWkZ37ZKkZnXZg7ZRVZsVZfDhbZFUWPmCQvU54rv1QEOmXIojUjKIsX/video.mp4"></video>
Could you help me solve it?