16:9
This commit is contained in:
parent
0a0202977e
commit
00381cfcd7
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
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")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
1
js/vd.js
1
js/vd.js
|
@ -56692,6 +56692,7 @@ const vd = (function() {
|
||||||
|
|
||||||
player._oldRequestFullscreen = player.requestFullscreen;
|
player._oldRequestFullscreen = player.requestFullscreen;
|
||||||
player.requestFullscreen = () => {
|
player.requestFullscreen = () => {
|
||||||
|
console.log("yo");
|
||||||
player._oldRequestFullscreen(...arguments);
|
player._oldRequestFullscreen(...arguments);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (screen.orientation) {
|
if (screen.orientation) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module Colors exposing (blackFont, greyBackground, greyFont, primary, primaryOver, white)
|
module Colors exposing (blackFont, greyBackground, greyFont, primary, primaryOver, selected, white)
|
||||||
|
|
||||||
import Element
|
import Element
|
||||||
|
|
||||||
|
@ -31,3 +31,8 @@ blackFont =
|
||||||
greyFont : Element.Color
|
greyFont : Element.Color
|
||||||
greyFont =
|
greyFont =
|
||||||
Element.rgb255 128 128 128
|
Element.rgb255 128 128 128
|
||||||
|
|
||||||
|
|
||||||
|
selected : Element.Color
|
||||||
|
selected =
|
||||||
|
Element.rgb255 223 233 250
|
||||||
|
|
|
@ -232,12 +232,18 @@ videoMiniatureView zone playlist video =
|
||||||
videoInList : Time.Zone -> Twitch.Playlist -> Twitch.Video -> Twitch.Video -> Element Core.Msg
|
videoInList : Time.Zone -> Twitch.Playlist -> Twitch.Video -> Twitch.Video -> Element Core.Msg
|
||||||
videoInList zone playlist activeVideo video =
|
videoInList zone playlist activeVideo video =
|
||||||
let
|
let
|
||||||
msg =
|
( msg, attr ) =
|
||||||
if video == activeVideo then
|
if video == activeVideo then
|
||||||
Nothing
|
( Nothing
|
||||||
|
, [ Element.width Element.fill
|
||||||
|
, Background.color Colors.selected
|
||||||
|
, Border.color Colors.primary
|
||||||
|
, Border.width 2
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
else
|
else
|
||||||
Just (Core.VideoClicked playlist video)
|
( Just (Core.VideoClicked playlist video), [ Element.width Element.fill ] )
|
||||||
|
|
||||||
label =
|
label =
|
||||||
Element.row [ Element.width Element.fill, Element.spacing 10 ]
|
Element.row [ Element.width Element.fill, Element.spacing 10 ]
|
||||||
|
@ -247,8 +253,7 @@ videoInList zone playlist activeVideo video =
|
||||||
(videoDescription zone video)
|
(videoDescription zone video)
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
Input.button [ Element.width Element.fill ]
|
Input.button attr { label = label, onPress = msg }
|
||||||
{ label = label, onPress = msg }
|
|
||||||
|
|
||||||
|
|
||||||
videoView : Time.Zone -> Twitch.Playlist -> Twitch.Video -> Element Core.Msg
|
videoView : Time.Zone -> Twitch.Playlist -> Twitch.Video -> Element Core.Msg
|
||||||
|
@ -256,14 +261,25 @@ 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.spacing 10
|
||||||
]
|
]
|
||||||
[ Keyed.el [ Element.width Element.fill ]
|
[ Keyed.el
|
||||||
|
[ Element.width Element.fill
|
||||||
|
, Element.height (Element.px 0)
|
||||||
|
, Element.htmlAttribute (Html.Attributes.style "padding-top" "56%")
|
||||||
|
, Element.htmlAttribute (Html.Attributes.style "position" "relative")
|
||||||
|
]
|
||||||
( video.url
|
( video.url
|
||||||
, Element.html
|
, Element.html
|
||||||
(Html.video
|
(Html.video
|
||||||
[ Html.Attributes.id (Twitch.videoId video)
|
[ Html.Attributes.id (Twitch.videoId video)
|
||||||
, Html.Attributes.class "video-js vjs-default-skin wf"
|
, Html.Attributes.class "video-js"
|
||||||
|
, Html.Attributes.class "vjs-default-skin"
|
||||||
|
, Html.Attributes.class "wf"
|
||||||
, Html.Attributes.property "data-setup" (Encode.string "{\"fluid\": true}")
|
, Html.Attributes.property "data-setup" (Encode.string "{\"fluid\": true}")
|
||||||
|
, Html.Attributes.style "position" "absolute"
|
||||||
|
, Html.Attributes.style "top" "0"
|
||||||
|
, Html.Attributes.style "height" "100%"
|
||||||
, Html.Attributes.controls True
|
, Html.Attributes.controls True
|
||||||
, Html.Attributes.autoplay True
|
, Html.Attributes.autoplay True
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue