- 生
石川典行の配信を例に取る。
http://twitcasting.tv/streamserver.php?mode=view&appid=TCViewerFlash&rtmp=1&target=icchy8591
レスポンス 例 edge101.moi.st/publisher/214392821-f554a8fe319b8e13.stream?is_publisher=0:1935:GET :icchy8591:214392821
rtmpdump -r "rtmp://edge101.moi.st/publisher/214392821-f554a8fe319b8e13.stream" -y "publisher/214392821-f554a8fe319b8e13.stream?is_publisher=0" -y icchy8591 -o output.flv
コメント 初回 例 http://twitcasting.tv/noriyukicas/userajax.php?c=listupdate&m=212328387
mは放送ID
コメント 順次 例 http://twitcasting.tv/noriyukicas/userajax.php?c=listupdate&m=212328387&n=707&k=5281821521
nは前回のcnumの値、kは前回の末尾のコメントID
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
var clickStream = Rx.Observable.fromEvent(document, "mouseup"); | |
clickStream | |
.buffer(clickStream.throttle(250)) | |
.map(function(x) {return x.length}) | |
.filter(function(n) {return n >= 2}) | |
.subscribe(function(n) {console.log(n + "click")}); |
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
console.log("abcde".split``); // .split("") より2文字短い | |
console.log([1,2,3].join``); // .join("") より2文字短い | |
console.log("aabbcc".split`b`.join`B`); // .replace(/b/g,"B") より 1文字短い | |
console.log("abcde".match`b.d`); // .match(/b.d/) より2文字短い | |
console.log([1,2,3].push``); // .length+1 より 2文字短い |
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
// http://gao-tec.seesaa.net/article/427643074.html | |
async function Main(){ | |
//実行時即表示 | |
console.log("a"); | |
//このawaitで2秒間待機してくれる(風に見せかけることが出来る) | |
await new Promise((resolve)=>{ | |
setTimeout(resolve,2000); | |
}); |
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
// http://gao-tec.seesaa.net/article/427643074.html | |
function Main(g){ | |
//Generatorを一つすすめる | |
var p = g.next(); | |
//yieldしきっていたら、実行を止める | |
if(p.done) return; | |
//yieldでPromiseオブジェクトが帰ってきてるので、valueを介してthenでつなげる |
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
const handler = { | |
get: (target, name) => { | |
if (name in target) return target[name]; | |
if (typeof target.methodMissing === 'function') return target.methodMissing(name); | |
} | |
}; | |
const obj = new Proxy({ | |
methodMissing: (name) => { | |
return () => `${name}は存在しませんよ!`; |
NewerOlder