Skip to content

Instantly share code, notes, and snippets.

@nenjiru
Last active February 9, 2023 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nenjiru/9088ee7b02222928a4eeccbdc0458711 to your computer and use it in GitHub Desktop.
Save nenjiru/9088ee7b02222928a4eeccbdc0458711 to your computer and use it in GitHub Desktop.
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