&autoplay=false です。自動再生したい場合はこの文字列をファイルから消してください。https://www.twitch.tv/videos/1963266362
を埋め込む場合
#twitch(1963266362)
https://clips.twitch.tv/embed?clip=HorribleDifferentFiddleheadsNerfBlueBlaster-59s5pgvyQdUbt2G0
を埋め込む場合
#twitch(HorribleDifferentFiddleheadsNerfBlueBlaster-59s5pgvyQdUbt2G0,clip)
https://www.twitch.tv/nemusg
を埋め込む場合
#twitch(nemusg,channel)
clip <iframe src="https://clips.twitch.tv/embed?clip=HorribleDifferentFiddleheadsNerfBlueBlaster-59s5pgvyQdUbt2G0&parent=www.example.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe> video <iframe src="https://player.twitch.tv/?video=1963266362&parent=www.example.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe> channel(LIVE) <iframe src="https://player.twitch.tv/?channel=nemusg&parent=www.example.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>
twitch.inc.php として保存して pluginフォルダにアップロードしてください。
<?php
// Twitch埋め込みプラグイン
// twitch.inc.php
//
// Copyright(c) 2023 nemusg
// for PukiWiki
function plugin_twitch_convert()
{
define('WEBSITE_URL',"note.nemusg.com" , true); //動画を埋め込みたいドメイン名を入れてください(必須)
define('DEFAULT_WIDTH',"620px" , true);
define('DEFAULT_TYPE',"?video" , true);
define('DEFAULT_DOMAIN',"player" , true);
$width = DEFAULT_WIDTH;
$type = DEFAULT_TYPE;
$domain = DEFAULT_DOMAIN;
if (func_num_args() < 1) return FALSE;
$args = func_get_args();
$name = trim($args[0]);
$websiteurl = WEBSITE_URL;
if($args[1]==="channel"){ //channel
$type = "?channel";
}
if($args[1]==="clip"){ //channel
$type = "embed?clip";
$domain = "clips";
}
if($args[2]){ //width
$width = trim($args[1])."px";
}
$body = <<<EOM
<div style="max-width: $width;">
<div class="twitch" style="
height: 0;
position: relative;
padding-bottom: 56.25%;
overflow: hidden;
">
<iframe style="position:absolute;width:100%;height:100%;top:0;left:0;" src="https://$domain.twitch.tv/$type=$name&parent=$websiteurl&autoplay=false" frameborder="0" allowfullscreen="true" scrolling="no" height="348" width="620"></iframe>
</div>
</div>
EOM;
return $body . "\n";
}
function plugin_twitch_inline() {
//使用しない
}
?>