A little bit working
This commit is contained in:
parent
42d17ea475
commit
9f385f3398
|
@ -99,10 +99,9 @@ video model =
|
||||||
|
|
||||||
loaded =
|
loaded =
|
||||||
List.filter (\( start, end ) -> start < model.position) model.loaded
|
List.filter (\( start, end ) -> start < model.position) model.loaded
|
||||||
|> List.map (\( start, end ) -> ( max model.position start, end ))
|
|
||||||
|
|
||||||
loadedToShow =
|
loadedToShow =
|
||||||
every model.duration loaded |> Debug.log "loaded"
|
every model.duration loaded
|
||||||
|
|
||||||
showRange : ( Float, Float, Bool ) -> Element msg
|
showRange : ( Float, Float, Bool ) -> Element msg
|
||||||
showRange ( start, end, isLoaded ) =
|
showRange ( start, end, isLoaded ) =
|
||||||
|
@ -234,7 +233,7 @@ decodeVolumeChange =
|
||||||
|
|
||||||
decodeSeek : Decode.Decoder Msg
|
decodeSeek : Decode.Decoder Msg
|
||||||
decodeSeek =
|
decodeSeek =
|
||||||
Decode.map2 (\x y -> Seek (toFloat x / toFloat y))
|
Decode.map2 (\x y -> Seek (toFloat x / 980))
|
||||||
(Decode.field "layerX" Decode.int)
|
(Decode.field "layerX" Decode.int)
|
||||||
(Dom.target <| Decode.field "offsetWidth" Decode.int)
|
(Dom.target <| Decode.field "offsetWidth" Decode.int)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue