getArtwork( null ), 'og_image' => ( ( empty( $settings[ 'fb_shareimg' ] ) ) ? $settings[ 'url' ] . getArtwork( null ) : $settings[ 'fb_shareimg' ] ), 'og_site_title' => ( ( !empty( $settings[ 'site_title' ] ) ) ? '' : '' ), 'icon_size' => ( !is_numeric( $settings[ 'playlist_icon_size' ] ) ) ? 32 : $settings[ 'playlist_icon_size' ], 'json_settings' => json_encode( ## Handle array which is passed to javascript for language and settings array( 'analytics' => ( !empty( $settings[ 'google_analytics' ] ) ? $settings[ 'google_analytics' ] : false ), 'lang' => $lang, 'channel' => array(), 'title' => $settings[ 'title' ], 'artist_length' => $settings[ 'artist_maxlength' ], 'title_length' => $settings[ 'title_maxlength' ], 'default_artist' => $settings[ 'artist_default' ], 'default_title' => $settings[ 'title_default' ], 'default_channel' => $settings[ 'default_channel' ], 'default_volume' => ( ( isset( $settings[ 'default_volume' ] ) && $settings[ 'default_volume' ] >= 1 && $settings[ 'default_volume' ] <= 100 ) ? $settings[ 'default_volume' ] : 50 ), 'dynamic_title' => ( isset( $settings[ 'dynamic_title' ] ) ) ? $settings[ 'dynamic_title' ] : false, 'usecookies' => ( isset( $settings[ 'cookie_support' ] ) ) ? $settings[ 'cookie_support' ] : false, 'stats_refresh' => ( is_numeric( $settings[ 'stats_refresh' ] ) && $settings[ 'stats_refresh' ] > 5 ) ? $settings[ 'stats_refresh' ] : 15, 'autoplay' => ( isset( $_GET[ 'autoplay' ] ) && $_GET[ 'autoplay' ] == 'false' ) ? false : $settings[ 'autoplay' ], 'history' => ( isset( $settings[ 'history' ] ) && $settings[ 'history' ] == 'true' ) ? 'true' : false ) ), ); // Check if player html template exists if ( !is_file( 'template.tpl' ) ) die( 'Unable to open player template!!!' ); // Render the player using template file $template = file_get_contents( 'template.tpl' ); echo bracket2text( $template, $settings ); ?>