Added streaming test
This commit is contained in:
parent
062503d937
commit
85f140fb18
@ -16,18 +16,7 @@ component AMVVideo(amv *arn.AMV)
|
|||||||
//- button.media-play-button
|
//- button.media-play-button
|
||||||
//- RawIcon("play")
|
//- RawIcon("play")
|
||||||
|
|
||||||
.video-controls
|
VideoControls(amv.ID, amv.Info.Duration)
|
||||||
.video-progress-clickable
|
|
||||||
.video-progress-container
|
|
||||||
.video-progress
|
|
||||||
|
|
||||||
.video-time= fmt.Sprintf("%d:%02d", int(amv.Info.Duration.Minutes()), int(amv.Info.Duration.Seconds()) % 60)
|
|
||||||
|
|
||||||
//- button.video-control.action(data-action="like", data-trigger="click")
|
|
||||||
//- RawIcon("heart-o")
|
|
||||||
|
|
||||||
button.video-control.action(data-action="toggleFullscreen", data-trigger="click", data-id=amv.ID, aria-label="Fullscreen")
|
|
||||||
RawIcon("fullscreen")
|
|
||||||
|
|
||||||
component AMVFooter(amv *arn.AMV, user *arn.User)
|
component AMVFooter(amv *arn.AMV, user *arn.User)
|
||||||
.amv-footer
|
.amv-footer
|
||||||
|
13
mixins/VideoControls.pixy
Normal file
13
mixins/VideoControls.pixy
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
component VideoControls(containerId string, duration time.Duration)
|
||||||
|
.video-controls
|
||||||
|
.video-progress-clickable
|
||||||
|
.video-progress-container
|
||||||
|
.video-progress
|
||||||
|
|
||||||
|
.video-time= fmt.Sprintf("%d:%02d", int(duration.Minutes()), int(duration.Seconds()) % 60)
|
||||||
|
|
||||||
|
//- button.video-control.action(data-action="like", data-trigger="click")
|
||||||
|
//- RawIcon("heart-o")
|
||||||
|
|
||||||
|
button.video-control.action(data-action="toggleFullscreen", data-trigger="click", data-id=containerId, aria-label="Fullscreen")
|
||||||
|
RawIcon("fullscreen")
|
@ -2,6 +2,16 @@ component AnimeEpisode(anime *arn.Anime, episode *arn.AnimeEpisode, episodeIndex
|
|||||||
h1
|
h1
|
||||||
a(href=anime.Link())= anime.Title.ByUser(user)
|
a(href=anime.Link())= anime.Title.ByUser(user)
|
||||||
|
|
||||||
|
if anime.ID == "VhRKhKimR" && episode.Number == 10
|
||||||
|
.widget-form.amv-page
|
||||||
|
.video-container(id="stream-test")
|
||||||
|
video.video.lazy.action(data-action="playVideo", data-trigger="click", data-media-id="stream-test")
|
||||||
|
source(data-src="https://arn.sfo2.cdn.digitaloceanspaces.com/videos/anime/VhRKhKimR/10.webm", data-type="video/webm")
|
||||||
|
|
||||||
|
VideoControls("stream-test", time.Duration(0))
|
||||||
|
|
||||||
|
br
|
||||||
|
else
|
||||||
.episode-view-image-container
|
.episode-view-image-container
|
||||||
if episodeIndex > 0
|
if episodeIndex > 0
|
||||||
.episode-arrow.episode-arrow-previous
|
.episode-arrow.episode-arrow-previous
|
||||||
@ -26,6 +36,7 @@ component AnimeEpisode(anime *arn.Anime, episode *arn.AnimeEpisode, episodeIndex
|
|||||||
p.episode-view-airing-date
|
p.episode-view-airing-date
|
||||||
span.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
|
span.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
|
||||||
|
|
||||||
|
if anime.ID != "VhRKhKimR" || episode.Number != 10
|
||||||
if user != nil && user.Location.CountryName != "Japan"
|
if user != nil && user.Location.CountryName != "Japan"
|
||||||
.buttons
|
.buttons
|
||||||
for serviceName, link := range episode.Links
|
for serviceName, link := range episode.Links
|
||||||
|
Loading…
Reference in New Issue
Block a user