59 lines
2.5 KiB
Plaintext
59 lines
2.5 KiB
Plaintext
extends includes/layout_embed
|
|
|
|
include includes/video-list-item
|
|
include includes/subscribe-button
|
|
|
|
block head
|
|
unless error
|
|
title= `${video.title} (embedded) - CloudTube`
|
|
else
|
|
title Error - CloudTube
|
|
script(type="module" src=getStaticURL("html", "/static/js/player.js"))
|
|
script const data = !{JSON.stringify({...video, continuous})}
|
|
|
|
block content
|
|
unless error
|
|
.video-embed-page(class={
|
|
"video-page--recommended-below": settings.recommended_mode === 1,
|
|
"video-page--recommended-hidden": settings.recommended_mode === 2
|
|
})
|
|
main.embed-video-section
|
|
- const format = formats[0]
|
|
if format
|
|
video(controls preload="auto" width=format.second__width height=format.second__height data-itag=format.itag autoplay=continuous||autoplay)#video.video
|
|
source(src=format.url type=format.type)
|
|
each t in video.captions
|
|
track(label=t.label kind="subtitles" srclang=t.languageCode src=t.url)
|
|
// fallback: flash player
|
|
- let flashvars = new URLSearchParams({skin: "/static/flash/skin.swf", video: format.url})
|
|
embed(type="application/x-shockwave-flash" src="/static/flash/player.swf" id="f4Player" width=1280 height=720 flashvars=flashvars.toString() allowscriptaccess="always" allowfullscreen="true" bgcolor="#000000")
|
|
else
|
|
video(src="")#video.video
|
|
.stream-notice The server provided no playback streams.
|
|
|
|
#current-time-container
|
|
#end-cards-container
|
|
|
|
audio(preload="auto")#audio
|
|
#live-event-notice
|
|
#audio-loading-display
|
|
|
|
.button-container
|
|
select(aria-label="Quality" autocomplete="off").border-look#quality-select
|
|
each f in formats
|
|
option(value=f.itag)= f.cloudtube__label
|
|
//-
|
|
a(href="/subscriptions").border-look
|
|
img(src="/static/images/search.svg" width=17 height=17 alt="").button-icon
|
|
| Search
|
|
//- button.border-look#share Share
|
|
a(target="_blank", href=`/watch?v=${video.videoId}#cloudtube`).border-look CloudTube (not embedded)
|
|
a(target="_blank", href=`https://www.youtube.com/watch?v=${video.videoId}#cloudtube`).border-look YouTube
|
|
a(target="_blank", href=`https://redirect.invidious.io/watch?v=${video.videoId}`).border-look Invidious
|
|
else
|
|
//- error
|
|
main.video-error-page
|
|
h2 Error
|
|
!= message
|
|
p: a(href=`https://www.youtube.com/watch?v=${video.videoId}#cloudtube`) Watch on YouTube →
|