Update to latest elm-video

This commit is contained in:
Thomas Forgione 2021-12-09 17:34:53 +01:00
parent 62004d9e56
commit dcfc677331
10 changed files with 42 additions and 1775 deletions

4
.gitignore vendored
View File

@ -1,6 +1,4 @@
videos
elm-stuff
js/main.js
js/main.tmp.js
js/main.min.js
js
deploy.sh

View File

@ -1,78 +0,0 @@
.lds-spinner {
color: official;
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-spinner div {
transform-origin: 40px 40px;
animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
content: " ";
display: block;
position: absolute;
top: 3px;
left: 37px;
width: 6px;
height: 18px;
border-radius: 20%;
background: #cef;
}
.lds-spinner div:nth-child(1) {
transform: rotate(0deg);
animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
transform: rotate(30deg);
animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
transform: rotate(60deg);
animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
transform: rotate(90deg);
animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
transform: rotate(120deg);
animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
transform: rotate(150deg);
animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
transform: rotate(180deg);
animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
transform: rotate(210deg);
animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
transform: rotate(240deg);
animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
transform: rotate(270deg);
animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
transform: rotate(300deg);
animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
transform: rotate(330deg);
animation-delay: 0s;
}
@keyframes lds-spinner {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}

File diff suppressed because one or more lines are too long

@ -1 +1 @@
Subproject commit 6f281c51c2e66e298078df7caded5ecdab4620ea
Subproject commit 9628155079ef8c07cf79350e0477f9e6764aef9e

View File

@ -8,21 +8,23 @@
"dependencies": {
"direct": {
"STTR13/ziplist": "1.3.0",
"andrewMacmurray/elm-simple-animation": "2.1.0",
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0",
"elm/http": "2.0.0",
"elm/json": "1.1.3",
"elm/svg": "1.0.1",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/svg": "1.0.1",
"icidasset/elm-material-icons": "9.0.0",
"jims/html-parser": "1.0.0",
"justinmimbs/timezone-data": "3.0.3",
"mdgriffith/elm-ui": "1.1.8",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"andrewMacmurray/elm-simple-animation": "2.1.0"
"rtfeldman/elm-iso8601-date-strings": "1.1.3"
},
"indirect": {
"avh4/elm-color": "1.0.0",
"elm/bytes": "1.0.8",
"elm/file": "1.0.5",
"elm/parser": "1.1.0",

24
embed.html Normal file
View File

@ -0,0 +1,24 @@
<!doctype HTML>
<html>
<head>
<title>twitch.tforgione.fr</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/ico" href="favicon.ico"/>
</head>
<body>
<div id="container"></div>
<script src="js/polymny-video-full.min.js"></script>
<script src="js/main.js"></script>
<script>
PolymnyVideo.fullpage({
node: document.getElementById('container'),
url: "videos/" + PolymnyVideo.getArgumentFromUrl("v") + "/manifest.m3u8",
autoplay: true,
startTime: PolymnyVideo.getArgumentFromUrl("t"),
enableMiniatures: true,
});
</script>
</body>
</html>

View File

@ -4,14 +4,11 @@
<title>twitch.tforgione.fr</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/ico" href="/favicon.ico"/>
<link href="css/video-js.css" rel="stylesheet">
<link href="css/spinner.css" rel="stylesheet">
<link rel="icon" type="image/ico" href="favicon.ico"/>
</head>
<body>
<div id="container"></div>
<script src="https://cdn.rawgit.com/video-dev/hls.js/18bb552/dist/hls.min.js"></script>
<script src="js/elm-video.js"></script>
<script src="js/polymny-video-elm.min.js"></script>
<script src="js/main.js"></script>
<script>
function isDarkMode(e) {

View File

@ -1 +0,0 @@
../elm-video/js/ports.js

View File

@ -247,7 +247,13 @@ update msg model =
( Just p, Just v ) ->
let
( el, videoCommand ) =
Video.fromConfig { url = "/videos/" ++ p.url ++ v.url ++ "/manifest.m3u8", id = "video", autoplay = True }
Video.fromConfig
{ url = "/videos/" ++ p.url ++ v.url ++ "/manifest.m3u8"
, id = "video"
, autoplay = True
, enableMiniatures = True
, startTime = Nothing
}
in
( Video p v el Nothing, Cmd.map VideoMsg videoCommand )

View File

@ -12,9 +12,7 @@ import Element.Font as Font
import Element.Input as Input
import Element.Keyed as Keyed
import Hover exposing (Hover)
import Html
import Html.Attributes
import Json.Encode as Encode
import Time
import TimeUtils
import Twitch
@ -390,7 +388,7 @@ videoView darkMode device zone currentDate time hover playlist video v =
, Element.spacing 10
, Element.alignTop
]
[ Video.Views.view v |> Element.map Core.VideoMsg
[ Video.Views.embedElement v |> Element.map Core.VideoMsg
, Element.paragraph
[ Font.size Consts.homeFontSize
, Font.bold
@ -564,22 +562,7 @@ groupAux size list acc =
spinner : Element Core.Msg
spinner =
Element.html
(Html.div [ Html.Attributes.class "lds-spinner" ]
[ Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
, Html.div [] []
]
)
Element.none
newBadge : Element Core.Msg