Skip to content

Commit

Permalink
Provide embed video
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 authored and fs5m8 committed Nov 28, 2023
1 parent 51d8d94 commit 6401793
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/server/web/views/note-embed.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
doctype html

html
head
meta(charset="UTF-8")
title Misskey
style.
body, video, audio {
width:100%;
height: 100%;
overflow: hidden;
position: absolute;
}

body
if video
video(src=video type=type controls autoplay=autoplay)
if audio
audio(src=audio type=type controls autoplay=autoplay)
12 changes: 12 additions & 0 deletions src/server/web/views/note.pug
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ block meta
meta(name='misskey:user-id' content=user.id)
meta(name='misskey:note-id' content=note.id)

if player
meta(name='twitter:player' content=player)
meta(name='twitter:player:width' content=width)
meta(name='twitter:player:height' content=height)
meta(name='twitter:player:stream' content=stream)
meta(name='twitter:player:stream:content_type' content=type)
meta(property='og:video:url' content=player)
meta(property='og:video:secure_url' content=player)
meta(property='og:video:type' content='text/html')
meta(property='og:video:width' content=width)
meta(property='og:video:height' content=height)

// todo
if user.host || user.avoidSearchIndex
meta(name='robots' content='noindex')
Expand Down

0 comments on commit 6401793

Please sign in to comment.