From 0a0202977e527c959a2786a958d87d09026aeed3 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Sun, 4 Oct 2020 17:14:00 +0200 Subject: [PATCH] Fix bugs --- index.html | 1 + src/Core.elm | 11 ++++------- src/Views.elm | 1 - 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 8193c49..b2702b1 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,7 @@ app.ports.registerVideo.subscribe(function(args) { requestAnimationFrame(function() { + console.log(document.getElementById(args[0])); vd.setup(args[0], args[1] + "/manifest.mpd") }); }); diff --git a/src/Core.elm b/src/Core.elm index 0151ad6..3ffd6f3 100644 --- a/src/Core.elm +++ b/src/Core.elm @@ -56,21 +56,18 @@ update msg model = (Loaded { key = key, playlists = playlists, zone = zone, page = Home }) ( HomeClicked, Loaded m ) -> - ( Loaded { m | page = Home } + ( model , Nav.pushUrl m.key "#" ) ( PlaylistClicked playlist, Loaded m ) -> - ( Loaded { m | page = Playlist playlist } + ( model , Nav.pushUrl m.key ("#" ++ playlist.url) ) ( VideoClicked playlist video, Loaded m ) -> - ( Loaded { m | page = Video playlist video } - , Cmd.batch - [ Nav.pushUrl m.key ("#" ++ playlist.url ++ Twitch.videoName video) - , Ports.registerVideo ( Twitch.videoId video, video.url ) - ] + ( model + , Nav.pushUrl m.key ("#" ++ playlist.url ++ Twitch.videoName video) ) ( UrlReceived url, Loaded m ) -> diff --git a/src/Views.elm b/src/Views.elm index 0a0bf1e..801a69b 100644 --- a/src/Views.elm +++ b/src/Views.elm @@ -256,7 +256,6 @@ videoView zone playlist video = Element.row [ Element.padding 10, Element.width Element.fill, Element.spacing 10 ] [ Element.column [ Element.width (Element.fillPortion 2) - , Element.htmlAttribute (Html.Attributes.style "height" "auto") ] [ Keyed.el [ Element.width Element.fill ] ( video.url