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