mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
add a video start t parameter in permalink url
#time 6h
This commit is contained in:
@@ -74,10 +74,10 @@ class PermalinkController extends AbstractDelivery
|
||||
|
||||
public function deliverPermaview(Request $request, $sbas_id, $record_id, $subdef)
|
||||
{
|
||||
return $this->doDeliverPermaview($sbas_id, $record_id, $request->query->get('token'), $subdef);
|
||||
return $this->doDeliverPermaview($sbas_id, $record_id, $request->query->get('token'), $subdef, $request->query->get('t'));
|
||||
}
|
||||
|
||||
private function doDeliverPermaview($sbas_id, $record_id, $token, $subdefName)
|
||||
private function doDeliverPermaview($sbas_id, $record_id, $token, $subdefName, $currentTime = null)
|
||||
{
|
||||
$databox = $this->findDataboxById($sbas_id);
|
||||
$record = $this->retrieveRecord($databox, $token, $record_id, $subdefName);
|
||||
@@ -105,6 +105,7 @@ class PermalinkController extends AbstractDelivery
|
||||
'token' => $token,
|
||||
'record' => $record,
|
||||
'recordUrl' => $information->getUrl(),
|
||||
'currentTime' => $currentTime
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
lang: "{{ app.locale }}",
|
||||
baseUrl: '{{ app['request'].getUriForPath('/') }}',
|
||||
basePath: '{{ app.request.basePath|e('js') }}',
|
||||
recordUrl: '{{ url('alchemy_embed_view', {url: recordUrl|trim, autoplay: autoplay|default('false') }) }}',
|
||||
recordUrl: '{{ url('alchemy_embed_view', {url: recordUrl|trim, autoplay: autoplay|default('false'), t: currentTime|trim }) | e('js')}}',
|
||||
debug: {% if app.debug == true %}true{% else %}false{% endif %}
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user