adds peertube api request
This commit is contained in:
parent
d25dbea8d0
commit
52976f416d
|
@ -64,6 +64,8 @@ class PeertubeMediaIngester implements IngesterInterface
|
|||
}
|
||||
// Set the Media source and data.
|
||||
$media->setSource($url);
|
||||
$media->setData(json_decode($response->getBody(), true));
|
||||
$media_data = json_decode($response->getBody());
|
||||
$media_data->embedPath = $base_url . $media_data->embedPath;
|
||||
$media->setData($media_data, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ class PeertubeMediaRenderer implements RendererInterface
|
|||
MediaRepresentation $media,
|
||||
array $options = [])
|
||||
{
|
||||
$url = str_replace('watch', 'embed', $media->source());
|
||||
$url = $media->mediaData()['embedPath'];
|
||||
if (parse_url($url, PHP_URL_QUERY)) {
|
||||
$url .= '&peertubeLink=0';
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue