Skip to content

Instantly share code, notes, and snippets.

@tknr
Created May 28, 2019 11:21
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 tknr/7c93d8733903be52929f241b57ce67c2 to your computer and use it in GitHub Desktop.
Save tknr/7c93d8733903be52929f241b57ce67c2 to your computer and use it in GitHub Desktop.
dommuneがustreamで放送されてた頃に画面いっぱいに見るためのhtml。今はもう使えないので放流
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-31j">
<title>
dommune
</title>
<style type="text/css">
<!--
#body{ margin: 0px; } #video { margin:0px; padding:0px; } #timeline { margin:0px; padding:0px; }
#timeline_iframe{ margin:0px; padding:0px; border: 0px none transparent; }
-->
</style>
<script type="text/javascript">
window.onload = redesign;
window.onresize = redesign;
function getGetValue( key ) {
var value = null;
var query = window.location.search.substring(1);
var params = query.split('&');
for ( var i = 0; i < params.length; i++ ) {
var item = params[i].split('=');
if ( key == item[0] ) {
value = item[1];
break;
}
}
return value;
}
function getWindowWidth(){
if (document.all){
return document.body.clientWidth;
}
return innerWidth;
}
function getWindowHeight(){
if (document.all){
return document.body.clientHeight;
}
return innerHeight;
}
function redesign(){
// 定数
var ustream_id = getGetValue("id");
if(!ustream_id){
ustream_id = "3166181";
}
var video_width = 400;
var video_height = 320;
var video_ratio = ( video_height / video_width );
var timeline_width = 320;
var timeline_height = video_height;
var window_width = getWindowWidth();
var window_height = getWindowHeight();
if(window_width != 0 && window_height != 0){
if(window_width < (video_width + timeline_width + 24) ){
video_width = window_width;
video_height = video_width * video_ratio;
timeline_width = window_width;
timeline_height = window_height - video_height;
}else{
video_width = window_width - (timeline_width + 24);
video_height = video_width * video_ratio;
if(video_height > window_height){
video_height = window_height;
video_width = video_height / video_ratio;
}
timeline_height = video_height;
}
}
var video_tag = ""
+"<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\""+video_width+"\" height=\""+video_height+"\" id=\"utv268230\">"
+"<param name=\"flashvars\" value=\"autoplay=false&amp;brand=embed&amp;cid="+ustream_id+"\" />"
+"<param name=\"allowfullscreen\" value=\"true\" />"
+"<param name=\"allowscriptaccess\" value=\"always\" />"
+"<param name=\"movie\" value=\"http://www.ustream.tv/flash/live/1/"+ustream_id+"\" />"
+"<embed "
+"flashvars=\"autoplay=false&amp;brand=embed&amp;cid="+ustream_id+"\""
+"width=\""+video_width+"\""
+"height=\""+video_height+"\""
+"allowfullscreen=\"true\""
+"allowscriptaccess=\"always\""
+"id=\"utv268230\""
+"name=\"utv_n_538335\""
+"src=\"http://www.ustream.tv/flash/live/1/"+ustream_id+"\""
+"type=\"application/x-shockwave-flash\"/><"+"/object>"
;
document.getElementById("video").innerHTML = video_tag;
var timeline_tag = ""
+"<iframe "
+"id=\"timeline_iframe\""
+"scrolling=\"no\""
+"width=\""+timeline_width+"\""
+"height=\""+timeline_height+"\""
+"frameborder=\"0\""
+"src=\"http://www.ustream.tv/socialstream/"+ustream_id+"\">"
+"<"+"/iframe>"
;
document.getElementById("timeline").innerHTML = timeline_tag;
}
</script>
</head>
<body id="body">
<span id="video">
</span>
<span id="timeline">
</span>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment