|
@@ 455-474 (lines=20) @@
|
| 452 |
|
* @param int $volume |
| 453 |
|
* @return string |
| 454 |
|
*/ |
| 455 |
|
public function embedStream($channel, $width = 620, $height = 378, $volume = 25) |
| 456 |
|
{ |
| 457 |
|
return '<object type="application/x-shockwave-flash" |
| 458 |
|
height="' . $height . '" |
| 459 |
|
width="' . $width . '" |
| 460 |
|
id="live_embed_player_flash" |
| 461 |
|
data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=' . $channel . '" |
| 462 |
|
bgcolor="#000000"> |
| 463 |
|
<param name="allowFullScreen" |
| 464 |
|
value="true" /> |
| 465 |
|
<param name="allowScriptAccess" |
| 466 |
|
value="always" /> |
| 467 |
|
<param name="allowNetworking" |
| 468 |
|
value="all" /> |
| 469 |
|
<param name="movie" |
| 470 |
|
value="http://www.twitch.tv/widgets/live_embed_player.swf" /> |
| 471 |
|
<param name="flashvars" |
| 472 |
|
value="hostname=www.twitch.tv&channel=' . $channel . '&auto_play=true&start_volume=' . $volume . '" /> |
| 473 |
|
</object>'; |
| 474 |
|
} |
| 475 |
|
|
| 476 |
|
/** |
| 477 |
|
* Get HTML code for video embedding |
|
@@ 485-504 (lines=20) @@
|
| 482 |
|
* @param int $volume |
| 483 |
|
* @return string |
| 484 |
|
*/ |
| 485 |
|
public function embedVideo($channel, $chapterid, $width = 400, $height = 300, $volume = 25) |
| 486 |
|
{ |
| 487 |
|
return '<object bgcolor="#000000" |
| 488 |
|
data="http://www.twitch.tv/widgets/archive_embed_player.swf" |
| 489 |
|
width="' . $width . '" |
| 490 |
|
height="' . $height . '" |
| 491 |
|
id="clip_embed_player_flash" |
| 492 |
|
type="application/x-shockwave-flash"> |
| 493 |
|
<param name="movie" |
| 494 |
|
value="http://www.twitch.tv/widgets/archive_embed_player.swf" /> |
| 495 |
|
<param name="allowScriptAccess" |
| 496 |
|
value="always" /> |
| 497 |
|
<param name="allowNetworking" |
| 498 |
|
value="all" /> |
| 499 |
|
<param name="allowFullScreen" |
| 500 |
|
value="true" /> |
| 501 |
|
<param name="flashvars" |
| 502 |
|
value="channel=' . $channel . '&start_volume=' . $volume . '&auto_play=false&chapter_id=' . $chapterid . '" /> |
| 503 |
|
</object>'; |
| 504 |
|
} |
| 505 |
|
|
| 506 |
|
/** |
| 507 |
|
* Get HTML code for chat embedding |