Keyword

AllVideos for K2 not using the poster at the same folder for local videos

  • Jonathan Magoga
  • Jonathan Magoga's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 4 days ago #177082 by Jonathan Magoga
Hi Fotis.

I am using AllVideos with K2, and setting the video file via the media tab on K2.
I have the video inside the /images/videos folder, together with a .jpg of the exact same file name.
However, the plugin is forcing the render of the 5th second of the video.
Shouldn't it use the custom poster when there's one?

Many thanks!

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 4 days ago #177088 by Fotis
When you upload video or audio files through the "Media" tab, they are moved into /media/k2/videos/. As such any custom posters won't be used, that's why AllVideos grabs its poster/preview image from 5th second of the video.

Indeed this is a shortcoming and I'll make sure to address it in a future update.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Jonathan Magoga
  • Jonathan Magoga's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 3 days ago #177090 by Jonathan Magoga
Thanks Fotis.

I have not uploaded via the media tab.
I uploaded it via FTP, together with a poster, and used "browse server" via the media tab.

Looking at the database, I see it uses the {mp4remote} call, but it should instead use the {mp4} if you do browse from the "browse server" sub-tab.

However, when I change it manually in the database to {mp4} it breaks, by trying to load the video from /media instead of from /images, which contradicts the documentation on the plugin.

Now, I am willing to get my hands on it and override (i.e. core change) the plugin until you effect the changes, so we get to use the poster in the meantime. Can you please point out where I can find the code for that?

Also, if you would like my UX input on the function of the plugin, I would love to architect an improvement for it, and provide a prototype.

Cheers.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 2 days ago #177109 by Fotis
When you upload media in K2 (which are then moved into /media/k2/videos/ etc.), we use the "local" option in AllVideos for playback. That's why modifying the DB record doesn't work as we check the AllVideos tags before playback.

I believe it's simpler to resolve this on AllVideos. E.g. if the site domain + AllVideos video/audio folder is included at the start of a (Xremote}...{/Xremote} tag set, then convert to local {X}...{/X}.

I'll note this down for the next update of AllVideos.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Jonathan Magoga
  • Jonathan Magoga's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 2 days ago #177130 by Jonathan Magoga
According to my tests, the tag effects are contrary to what's described in the docs for the plugin.

If we use {mp4}, which is the local version, then /media/k2 gets added to the url. However, the docs state that {mp4} should come from /images/videos.

If we use {mp4remote}, K2 puts a relative URL inside the tag, which works as well for local URLs.

What you could do, which I hope could be a simple task, is:

1. From the "upload" tab:
Add a second file field to upload a poster.
Add a checkbox below the "delete video" checkbox to "delete poster", so the user can revert back to the 5th second.

2. From the "browse server" tab:
Add a checkbox to "use custom poster".
If checked, AllVideos should look inside the same folder for a jpg|jpeg|png of the exact same name and use it as a poster.
Unchecking it would revert back to the 5th second.

I'm taking a look at JW Github, and will attempt to effect the change.
If I am successful, I'll get back to you.

Cheers.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 15 hours ago #177137 by Fotis
>> If we use {mp4}, which is the local version, then /media/k2 gets added to the url. However, the docs state that {mp4} should come from /images/videos.

K2 modifies the base path for media to be rendered via AllVideos.

>> If we use {mp4remote}, K2 puts a relative URL inside the tag, which works as well for local URLs.

That's how we render anything that is not uploaded. It's a convention. Not the best, but it's worked fine for over a decade.

As for 1 & 2, these suggestions are not easy and require database schema changes for K2.

Like I said, I prefer to resolve this in AllVideos.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Jonathan Magoga
  • Jonathan Magoga's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 4 hours ago - 2 weeks 4 hours ago #177142 by Jonathan Magoga
Thank you Fotis.
I trust your judgement on this one and will wait for your solution instead of meddling with the core code.
If you think it would help your users, you may want to add the solution below to your documentation as an alternative for having a custom poster.

For everyone watching this conversation in search of an immediate solution for adding a custom poster to JW allVideos, I have found a workaround, using allVideos markup, and the "embed" tab of the media tab. Here is the code I used there, lifted from the rendered video from allVideos on K2:

<div class="avPlayerWrapper avVideo">
<div class="avPlayerContainer">
<div id="AVPlayerID_1" class="avPlayerBlock">
<video class="avPlayer" style="width: 100%;" src="/images/videos/YOUR_VIDEO_HERE.mp4" poster="/images/videos/YOUR_VIDEO_HERE.jpg" preload="metadata" controls="" controlslist="nodownload"></video>
</div>
</div>
</div>

You can easily find the other possible options by enabling everything on the All Videos plugin, uploading a video at the "upload" tab, and inspecting the rendered page for the video tag.
You can also find more info about the video tag here: www.w3docs.com/learn-html/html-video-tag.html

Cheers.
Last edit: 2 weeks 4 hours ago by Jonathan Magoga. Reason: typos and clarity

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum