Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
せーふいんたーねっとてれびとやらの貼りつけコード
function checkPf() {
var plt = (navigator.platform) ? navigator.platform : 0;
var isWin = (plt.indexOf("Win") != -1) ? true : false;
var isMac = (plt.indexOf("Mac") != -1) ? true : false;
if (isWin) {
plt = 1;
} else if (isMac) {
plt = 2;
} else {
plt = 0;
}
return plt;
}
function checkBr() {
var brw = (navigator.userAgent) ? navigator.userAgent : 0;
var isIE = (brw.indexOf("MSIE") != -1) ? true : false;
var isFirefox = (brw.indexOf("Firefox/") != -1) ? true : false;
var isNN = (brw.indexOf("Netscape/") != -1) ? true : false;
var isOpera = (brw.indexOf("Opera/") != -1) ? true : false;
var isSafari = (brw.indexOf("Safari/") != -1) ? true : false;
var isCamino = (brw.indexOf("Camino/") != -1) ? true : false;
if (isIE) {
brw = 1;
} else if (isFirefox) {
brw = 2;
} else if (isNN) {
brw = 3;
} else if (isOpera) {
brw = 4;
} else if (isSafari) {
brw = 5;
} else if (isCamino) {
brw = 6;
} else {
brw = 0;
}
return brw;
}
function getBrowserInfo() {
var obj = new Object();
obj.paltform = checkPf();
obj.browser = checkBr();
obj.url = location.href;
return obj;
}
var bi = getBrowserInfo();
var url = 'http://nettv.gov-online.go.jp/external_player.swf?flvURL=rtmp://fl.gov-online.go.jp/fl-gov/_definst_/3ch/2011/20110713_kanfull_nk_300k.flv&movieSize=480*270&prgid=5098&ptype=0&band=0' + '&pf=' + bi.paltform + '&brw=' + bi.browser + '&hpath=' + bi.url;
document.getElementById("movi_5098").innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="480" height="366" id="ch000_mov01" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + url + '" /><param name="scale" value="showAll" /><param name="salign" value="lt" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="' + url + '" quality="high" bgcolor="#ffffff" width="480" height="366" name="' + url + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="showAll" salign="lt" allowFullScreen="true" /></object>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment