@@ 537-556 (lines=20) @@ | ||
534 | * @param int $volume |
|
535 | * @return string |
|
536 | */ |
|
537 | public function embedStream($channel, $width = 620, $height = 378, $volume = 25) |
|
538 | { |
|
539 | return '<object type="application/x-shockwave-flash" |
|
540 | height="' . $height . '" |
|
541 | width="' . $width . '" |
|
542 | id="live_embed_player_flash" |
|
543 | data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=' . $channel . '" |
|
544 | bgcolor="#000000"> |
|
545 | <param name="allowFullScreen" |
|
546 | value="true" /> |
|
547 | <param name="allowScriptAccess" |
|
548 | value="always" /> |
|
549 | <param name="allowNetworking" |
|
550 | value="all" /> |
|
551 | <param name="movie" |
|
552 | value="http://www.twitch.tv/widgets/live_embed_player.swf" /> |
|
553 | <param name="flashvars" |
|
554 | value="hostname=www.twitch.tv&channel=' . $channel . '&auto_play=true&start_volume=' . $volume . '" /> |
|
555 | </object>'; |
|
556 | } |
|
557 | ||
558 | /** |
|
559 | * Get HTML code for video embedding |
|
@@ 567-586 (lines=20) @@ | ||
564 | * @param int $volume |
|
565 | * @return string |
|
566 | */ |
|
567 | public function embedVideo($channel, $chapterid, $width = 400, $height = 300, $volume = 25) |
|
568 | { |
|
569 | return '<object bgcolor="#000000" |
|
570 | data="http://www.twitch.tv/widgets/archive_embed_player.swf" |
|
571 | width="' . $width . '" |
|
572 | height="' . $height . '" |
|
573 | id="clip_embed_player_flash" |
|
574 | type="application/x-shockwave-flash"> |
|
575 | <param name="movie" |
|
576 | value="http://www.twitch.tv/widgets/archive_embed_player.swf" /> |
|
577 | <param name="allowScriptAccess" |
|
578 | value="always" /> |
|
579 | <param name="allowNetworking" |
|
580 | value="all" /> |
|
581 | <param name="allowFullScreen" |
|
582 | value="true" /> |
|
583 | <param name="flashvars" |
|
584 | value="channel=' . $channel . '&start_volume=' . $volume . '&auto_play=false&chapter_id=' . $chapterid . '" /> |
|
585 | </object>'; |
|
586 | } |
|
587 | ||
588 | /** |
|
589 | * Get HTML code for chat embedding |