Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add embed parameters to peertube-video-embed custom client markup #6834

Open
MillironX opened this issue Jan 14, 2025 · 1 comment
Open

Add embed parameters to peertube-video-embed custom client markup #6834

MillironX opened this issue Jan 14, 2025 · 1 comment

Comments

@MillironX
Copy link

Describe the problem to be solved

Right now, all videos embedded on a page using the <peertube-video-embed> tag have hard-coded dimensions, which cuts videos off on mobile, and add excess empty space on desktop.

Cut off videos on mobile

Empty space on desktop

In addition, the IP privacy warning sends a weird message to those visiting my site who are less familiar with PeerTube.

While there are options to make the embed responsive and remove the privacy warning for creating embeds with each video's UI in other locations, these options are not available to embeds within the site using <peertube-video-embed>, and <iframe> tags are not allowed in the custom markup, so using the embeds generated using the video UI is not an option.

Options for video embeds on sites other than PeerTube

Describe the solution you would like

I would like to add data-* tags for the <peertube-video-embed> that allow for use of most of the embed options available in the embed UI. Particularly, I am interested in adding

data- attribute Corresponding UI option
data-responsive "Responsive embed" checkbox
data-privacy-warning "Display privacy warning" checkbox

But I propose the following tag names for any of the other options available if others are interested:

data- attribute Documentation
data-start-at Timecode to begin playback of the embed at in the format #h#m#s
data-subtitle Language code of subtitles to have enabled in the embed
data-responsive Make the embed responsive at all screen sizes or not
data-stop-at Timecode to end playback of the embed at in the format #h#m#s
data-autoplay Start playback of the embedded video on page load
data-muted Mute audio of the embedded video
data-loop Loop playback of the embedded video
data-display-title Show title over the embedded video
data-p2p Use peers if available to play video
data-privacy-warning Display IP privacy warning
data-player-control Display player bar in embed
data-peertube-link Show button linking back to host instance
@Chocobozzz
Copy link
Owner

Nice idea! PR welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants