Last active
February 9, 2023 16:01
-
-
Save nenjiru/9088ee7b02222928a4eeccbdc0458711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html | |
head | |
title live | |
link(href='https://vjs.zencdn.net/7.10.2/video-js.css' rel='stylesheet') | |
style. | |
* { | |
margin: 0; | |
} | |
body, | |
html { | |
width: 100%; | |
height: 100%; | |
background: #000; | |
} | |
video { transform: translate(-420px, 420px) rotate(-90deg); } | |
.r2 video { transform: translate(-420px, 420px) rotate(90deg); } | |
.r3 video { transform: rotate(0deg); } | |
.r4 video { transform: rotate(180deg); } | |
body | |
video#player.video-js.vjs-default-skin.vjs-big-play-centered(autoplay='' muted='' preload='auto' data-setup='') | |
script(src='https://vjs.zencdn.net/7.4.1/video.js') | |
script. | |
const param = location.search.replace('?', '').split('&') | |
const url = 'http://' + location.hostname + '/hls/' + param[0] + '.m3u8' | |
const player = videojs('player', { width:1920, height:1080, autoplay:true, controls:false }) | |
player.src({ | |
type: 'application/x-mpegURL', | |
src: url | |
}) | |
document.querySelector('#player').classList.add(param[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment