Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Yii Framework Widget to embed html5 (or old Flash) Player into your Yii web apps.
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Yii Framework Widget to embed Soundcloud html5 Player into Yii Framework web apps.


  • Copy yiiSoundcloudPlayerWidget.php into your /protected/extensions/


  • 0.0.3
    1. Code Optimization
  • 0.0.2
    1. Added devel parameter to print out or not, the cURL and Soundcloud API errors
    2. Cache support for high-traffic web apps and Soundcloud api polite usage :) - params cache and cacheTime (see Full Parameters Example for usage)
  • 0.0.1
    1. Initial Version

How To Use

Inside your View file call the widget with:

Minimal Parameters Single Url

<?php $this->widget('ext.yiisoundcloudplayerwidget', array(           
    'url' => ''  // you can put here a profile, group, playlist or track url

Minimal Parameters Multi Url

<?php $this->widget('ext.yiisoundcloudplayerwidget', array(           
    'url' => array('', // this is a profile
        "" // this a direct link to a track

Full Parameters

<?php $this->widget('ext.yiisoundcloudplayerwidget', array(
    'devel'         => false,       // default is true. if true all curl and api errors will be printed out, if any.
    'cache'         => false,       // default is true. will use Yii cache system ( Data Caching ).
    'cacheTime'     => 600,         // default is 5 minutes (300 seconds) to keep data in cache server.
    'maxwidth'      => 50,          // default I believe is 100. maxwidth in px.
    'maxheight'     => 305,         // default is 81 for tracks and 305 for all others.
    'color'         => 'ffaa66',    // default is Soundcloud color. hex triplet for player primary color.
    'auto_play'     => false,       // default is false.                
    'show_comments' => false,       // default is true. TimeBased comments on waveform.
    'iframe'        => true,        // default is true => html5 player. false => old Adobe Flash player.        
    'url' => array('', // this is a profile
        "" // this a direct link to a track
Something went wrong with that request. Please try again.