You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a script that replaces placeholders with the corresponding values from a JSON array. In general, the replacement works fine everywhere, but for some reason it doesn't want to work with these attributes.
For example:
<span>I like {{activity}}</span
<img src="/assets/images/{{file}} />
gives
<span> I like reading books</span>
<img src="/assets/images/book.png" />
Expected behaviour:
I would like <video class="plyyr" playsinline controls data-poster="/assets/video/{{folder}}/thumb.png" data-thumbnail-src="/assets/video/{{folder}}/preview.vtt">
to change to <video class="plyyr" playsinline controls data-poster="/assets/video/book/thumb.png" data-thumbnail-src="/assets/video/book/preview.vtt">
and then work as "intended", i.e. add a video poster and display thumbnails in the progress bar.
Actual behaviour:
Currently the replacement works. The console and browser see the change. Theoretically, the placeholders change, but despite this, neither the poster nor the preview works.
When it comes to lines like this one, after replacing everything works: <source src="/assets/video/{{folder}}/1080p.mp4" type="video/mp4" size="1080" />
When I replace the placeholder manually (i.e. I simply enter the path myself), then everything works perfectly, but with the placeholder it does not want to work, even though the browser and console see the change correctly.
I have a script that replaces placeholders with the corresponding values from a JSON array. In general, the replacement works fine everywhere, but for some reason it doesn't want to work with these attributes.
For example:
gives
Expected behaviour:
I would like
<video class="plyyr" playsinline controls data-poster="/assets/video/{{folder}}/thumb.png" data-thumbnail-src="/assets/video/{{folder}}/preview.vtt">
to change to
<video class="plyyr" playsinline controls data-poster="/assets/video/book/thumb.png" data-thumbnail-src="/assets/video/book/preview.vtt">
and then work as "intended", i.e. add a video poster and display thumbnails in the progress bar.
Actual behaviour:
Currently the replacement works. The console and browser see the change. Theoretically, the placeholders change, but despite this, neither the poster nor the preview works.
When it comes to lines like this one, after replacing everything works:
<source src="/assets/video/{{folder}}/1080p.mp4" type="video/mp4" size="1080" />
When I replace the placeholder manually (i.e. I simply enter the path myself), then everything works perfectly, but with the placeholder it does not want to work, even though the browser and console see the change correctly.
Steps to reproduce:
Environment:
Console errors (if any):
None.
Thank you in advance for any help.
The text was updated successfully, but these errors were encountered: