mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-05 23:18:53 -05:00
Add posterUrl to MEDIA_DATA in edit templates
Included the posterUrl property in the MEDIA_DATA object for both edit_chapters.html and edit_video.html templates to provide access to the media poster image in client-side scripts.
This commit is contained in:
parent
4e5b5a3e5b
commit
bfcb774183
@ -13,13 +13,12 @@
|
||||
<script>
|
||||
window.MEDIA_DATA = {
|
||||
videoUrl: "{{ media_file_path }}",
|
||||
posterUrl: "{{ media_object.poster_url }}",
|
||||
mediaId: "{{ media_object.friendly_token }}",
|
||||
redirectURL: "{{ media_object.get_absolute_url }}",
|
||||
redirectUserMediaURL: "{{ media_object.user.get_absolute_url }}",
|
||||
chapters: {{ chapters|safe }},
|
||||
};
|
||||
|
||||
console.log(window.MEDIA_DATA.chapters)
|
||||
</script>
|
||||
{%endblock topimports %}
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
<script>
|
||||
window.MEDIA_DATA = {
|
||||
videoUrl: "{{ media_file_path }}",
|
||||
posterUrl: "{{ media_object.poster_url }}",
|
||||
mediaId: "{{ media_object.friendly_token }}",
|
||||
redirectURL: "{{ media_object.get_absolute_url }}",
|
||||
redirectUserMediaURL: "{{ media_object.user.get_absolute_url }}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user