Jump to content

Recommended Posts

Posted

Chrome offer a convenient "Dowload" Button in its native HTML5 video player's context menu, that I want to be disabled.

Could contain: Electronics, Screen, Computer Hardware, Hardware, Monitor, File, TV, Computer, Pc

(Sorry, german screenshot. The marked button means "Download").

 

This button can be disabled by adding the following HTML attribute to the video tag: controlsList="nodownload"

In AdminCP theme editing there is a template file wich looks exactly like the embedded video player code:
Could contain: File, Webpage, Page, Text

Unfortunately making any changes there will not apply to the actual embedded video player code. So this must be generated from another part of the Invision application.

I'd appreciate any help on how to get that controlsList="nodownload" Attribute applied to the video tag that Invision renders in the posts.

Thanks!

 

Posted

Hmm,
I tried that, but it did not work.

Just for the test I created a new theme as a copied from unmodified default theme.
Then I edited only the template file shown in the screen from the post above, selected that new theme in frontend, created a new post with a video attached.

But the code used to embed the video in this post was still the same (like unmodified default template file).

Posted (edited)
2 hours ago, Daniel F said:

The template is attached to the post, so if you make any changes to the template, they won't be retroactive, but any new video should contain the new code.

Away from my PC right now but I seem to recall that the html template only gets used if the user doesn't click the uploaded video.

I think there's a hard-coded <video> element in one of the editor JS files which is used when the user does click the uploaded video to add it to the editor themselves.

Back at PC in 10 minutes, will check then - happy to be wrong on this one though.

Edited by Nathan Explosion
Posted (edited)

Yup...ips.editor.insertable.js

Could contain: Page, Text

That is used when the user chooses to click the video to add it.

The template is used when the user doesn't add the video themselves - screenshot below is the code of a submitted post, where 2 videos were attached, but only one was clicked on to add it and the other was added via post submission:

 

Could contain: Text

 

 

 

Edited by Nathan Explosion
Posted

Thanks for having a look into this.

So does this mean that there is no chance to modify the video player template with tools provided by the platform itself?
We use the cloud version of Invision. So manipulating platform source files seems not an option.

Posted (edited)
17 minutes ago, Christian Meixner said:

So does this mean that there is no chance to modify the video player template with tools provided by the platform itself?

Correct - to affect a video that has been added by a user clicking the uploaded file to add it to the editor, you would need to modify a JS file (and even then, it's not a file but a row in the database...and you don't have access to that, and it would be updated on every upgrade anyway)

There are other ways to apply it but it requires a plugin/application to do it. I've got it as a feature in https://www.ynwa.tv/files/file/38-ne-html5-audiovideo-player/ but that would be hitting a small nail with a very large hammer if your requirement is simply to add that controlslist.

Edited by Nathan Explosion
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...