Fix bugs
This commit is contained in:
parent
0f55299d12
commit
0a0202977e
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
app.ports.registerVideo.subscribe(function(args) {
|
app.ports.registerVideo.subscribe(function(args) {
|
||||||
requestAnimationFrame(function() {
|
requestAnimationFrame(function() {
|
||||||
|
console.log(document.getElementById(args[0]));
|
||||||
vd.setup(args[0], args[1] + "/manifest.mpd")
|
vd.setup(args[0], args[1] + "/manifest.mpd")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
11
src/Core.elm
11
src/Core.elm
|
@ -56,21 +56,18 @@ update msg model =
|
||||||
(Loaded { key = key, playlists = playlists, zone = zone, page = Home })
|
(Loaded { key = key, playlists = playlists, zone = zone, page = Home })
|
||||||
|
|
||||||
( HomeClicked, Loaded m ) ->
|
( HomeClicked, Loaded m ) ->
|
||||||
( Loaded { m | page = Home }
|
( model
|
||||||
, Nav.pushUrl m.key "#"
|
, Nav.pushUrl m.key "#"
|
||||||
)
|
)
|
||||||
|
|
||||||
( PlaylistClicked playlist, Loaded m ) ->
|
( PlaylistClicked playlist, Loaded m ) ->
|
||||||
( Loaded { m | page = Playlist playlist }
|
( model
|
||||||
, Nav.pushUrl m.key ("#" ++ playlist.url)
|
, Nav.pushUrl m.key ("#" ++ playlist.url)
|
||||||
)
|
)
|
||||||
|
|
||||||
( VideoClicked playlist video, Loaded m ) ->
|
( VideoClicked playlist video, Loaded m ) ->
|
||||||
( Loaded { m | page = Video playlist video }
|
( model
|
||||||
, Cmd.batch
|
, Nav.pushUrl m.key ("#" ++ playlist.url ++ Twitch.videoName video)
|
||||||
[ Nav.pushUrl m.key ("#" ++ playlist.url ++ Twitch.videoName video)
|
|
||||||
, Ports.registerVideo ( Twitch.videoId video, video.url )
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
( UrlReceived url, Loaded m ) ->
|
( UrlReceived url, Loaded m ) ->
|
||||||
|
|
|
@ -256,7 +256,6 @@ videoView zone playlist video =
|
||||||
Element.row [ Element.padding 10, Element.width Element.fill, Element.spacing 10 ]
|
Element.row [ Element.padding 10, Element.width Element.fill, Element.spacing 10 ]
|
||||||
[ Element.column
|
[ Element.column
|
||||||
[ Element.width (Element.fillPortion 2)
|
[ Element.width (Element.fillPortion 2)
|
||||||
, Element.htmlAttribute (Html.Attributes.style "height" "auto")
|
|
||||||
]
|
]
|
||||||
[ Keyed.el [ Element.width Element.fill ]
|
[ Keyed.el [ Element.width Element.fill ]
|
||||||
( video.url
|
( video.url
|
||||||
|
|
Loading…
Reference in New Issue