Changeset 704174
- Timestamp:
- 04/26/2013 12:45:54 PM (13 years ago)
- Location:
- live-stream-badger/trunk
- Files:
-
- 3 added
- 1 edited
-
shortcode/class-embedded-stream.php (modified) (3 diffs)
-
view (added)
-
view/class-embedded-twitch-view.php (added)
-
view/class-view.php (added)
Legend:
- Unmodified
- Added
- Removed
-
live-stream-badger/trunk/shortcode/class-embedded-stream.php
r700997 r704174 1 1 <?php 2 3 include_once LSB_PLUGIN_BASE_URL . '/view/class-embedded-twitch-view.php'; 2 4 3 5 class LSB_Embedded_Stream { … … 6 8 $defaults = array( 7 9 'url' => '', 8 'width' => '6 40',9 'height' => ' 480'10 'width' => '620', 11 'height' => '378' 10 12 ); 11 13 $attrs = shortcode_atts( $defaults, $attrs ); … … 22 24 return ''; 23 25 24 $html = '<object type="application/x-shockwave-flash" height="378" width="620" id="live_embed_player_flash" data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=' . $stream_url->channel_name . '" bgcolor="#000000"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" /><param name="flashvars" value="hostname=www.twitch.tv&channel=' . $stream_url->channel_name . '&auto_play=true&start_volume=25" /></object>'; 25 return $html; 26 $view = NULL; 27 switch ( $stream_url->api_id ) { 28 case 'twitch' : 29 $view = new LSB_Embedded_Twitch_View(); 30 break; 31 } 32 33 if ( empty( $view ) ) 34 return ''; 35 36 $attrs['stream_url'] = $stream_url; 37 38 return $view->get_html( $attrs ); 26 39 } 27 40
Note: See TracChangeset
for help on using the changeset viewer.