Skip to content

Embedding PeerTube Videos like it Mastodon Web does #18

@tigexplorer

Description

@tigexplorer

When a native Mastodon post has a link to a PeerTube Video, Mastodon web is adding additional to the link an iframe to embed the videoplayer. It is direct playable:

<div class="status-card expanded" role="button"><div class="status-card__image status-card-video" style="aspect-ratio: 16 / 9;"><iframe width="560" height="315" src="https://mydom.xyz/videos/embed/8f0eb7be-0911-44c7-abeb-5f3fb65?autoplay=1&amp;auto_play=1" frameborder="0" allowfullscreen="" sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-forms"></iframe></div><a href="https://mydom.xyz/w/iEAey9xu6RVR1CDNnk" target="_blank" rel="noopener noreferrer"><div class="status-card__content"><span class="status-card__host"><span lang="">PeerTube</span></span><strong class="status-card__title" title="„My Video" lang="">„My Video</strong><span class="status-card__author"><span>Von <strong>My Video-Channel</strong></span></span></div></a></div>

On the other hand for such a post, the FediWall is only displaying the link to the video.

If I replace via dev -tools by card-text the link with the iframe, it is embedded and inline playable

Maybe in https://github.com/defnull/fediwall/blob/main/src/components/Card.vue the <p v-if="config.showText" class="card-text" v-dompurify-html="post.content"></p> can be the point, to check and add the iframe...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions