mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.67k stars 495 forks source link

How to hide share button in the embedded video? #699

Closed abdullahqureshi1994 closed 1 year ago

abdullahqureshi1994 commented 1 year ago

Hi there,

Can anyone let me know how to hide the share button in the embedded video?

jp-rad commented 1 year ago

There are no setting parameters to disable, so edit VideoViewer source code and rebuild frontend . https://github.com/mediacms-io/mediacms/tree/main/frontend

  1. cd /home/mediacms.io/mediacms/frontend
  2. npm install
  3. Comment out the line bottomRight: ... : https://github.com/mediacms-io/mediacms/blob/main/frontend/src/static/js/components/media-viewer/VideoViewer/index.js#L281
  4. npm run dist
  5. cp -rf /home/mediacms.io/mediacms/frontend/dist/static /home/mediacms.io/mediacms/
  6. Reload the embedded page. Before doing so, clear your browser's cache file.
abdullahqureshi1994 commented 1 year ago

@jp-rad Thanks a lot. I deployed it using docker can you guide me on the commands regarding that?

jp-rad commented 1 year ago

Suppose you are installing in the following way: https://github.com/mediacms-io/mediacms/blob/main/docs/admins_docs.md#3-docker-installation

Edit /path/to/mediacms/installation/frontend/src/static/js/components/media-viewer/VideoViewer/index.js

Comment out the line bottomRight: ... : https://github.com/mediacms-io/mediacms/blob/main/frontend/src/static/js/components/media-viewer/VideoViewer/index.js#L281

Connect docker service: $ docker exec -it mediacms_web_1 /bin/bash

Rebuild:


apt update
apt upgrade -y
apt install npm -y

cd /home/mediacms.io/mediacms/frontend
npm install
npm run dist
cp -rf /home/mediacms.io/mediacms/frontend/dist/static /home/mediacms.io/mediacms/

Reload the embedded page. Before doing so, clear your browser's cache file.

abdullahqureshi1994 commented 1 year ago

Thanks @jp-rad