@@ 425-444 (lines=20) @@ | ||
422 | * @param integer |
|
423 | * @return string |
|
424 | */ |
|
425 | public function embedStream($channel, $width = 620, $height = 378, $volume = 25) |
|
426 | { |
|
427 | return '<object type="application/x-shockwave-flash" |
|
428 | height="' . $height . '" |
|
429 | width="' . $width . '" |
|
430 | id="live_embed_player_flash" |
|
431 | data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=' . $channel . '" |
|
432 | bgcolor="#000000"> |
|
433 | <param name="allowFullScreen" |
|
434 | value="true" /> |
|
435 | <param name="allowScriptAccess" |
|
436 | value="always" /> |
|
437 | <param name="allowNetworking" |
|
438 | value="all" /> |
|
439 | <param name="movie" |
|
440 | value="http://www.twitch.tv/widgets/live_embed_player.swf" /> |
|
441 | <param name="flashvars" |
|
442 | value="hostname=www.twitch.tv&channel=' . $channel . '&auto_play=true&start_volume=' . $volume . '" /> |
|
443 | </object>'; |
|
444 | } |
|
445 | ||
446 | /** |
|
447 | * Get HTML code for video embedding |
|
@@ 455-474 (lines=20) @@ | ||
452 | * @param integer |
|
453 | * @return string |
|
454 | */ |
|
455 | public function embedVideo($channel, $chapterid, $width = 400, $height = 300, $volume = 25) |
|
456 | { |
|
457 | return '<object bgcolor="#000000" |
|
458 | data="http://www.twitch.tv/widgets/archive_embed_player.swf" |
|
459 | width="' . $width . '" |
|
460 | height="' . $height . '" |
|
461 | id="clip_embed_player_flash" |
|
462 | type="application/x-shockwave-flash"> |
|
463 | <param name="movie" |
|
464 | value="http://www.twitch.tv/widgets/archive_embed_player.swf" /> |
|
465 | <param name="allowScriptAccess" |
|
466 | value="always" /> |
|
467 | <param name="allowNetworking" |
|
468 | value="all" /> |
|
469 | <param name="allowFullScreen" |
|
470 | value="true" /> |
|
471 | <param name="flashvars" |
|
472 | value="channel=' . $channel . '&start_volume=' . $volume . '&auto_play=false&chapter_id=' . $chapterid . '" /> |
|
473 | </object>'; |
|
474 | } |
|
475 | ||
476 | /** |
|
477 | * Get HTML code for chat embedding |