add a video start t parameter in permalink url

#time 6h
This commit is contained in:
aina-esokia
2019-05-15 16:13:16 +04:00
parent 5f5afc6a76
commit 4097e19abb
2 changed files with 4 additions and 3 deletions

View File

@@ -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
]);
}

View File

@@ -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>