                     button_title = "\(name) via \(button_title)"
                 }
                 
-                var button = UIButton()
-                button.addTarget(self, action: "selected:", forControlEvents: UIControlEvents.TouchDown)
-                var frame = CGRectMake(0, CGFloat(i*40 + 10), 160, 40)
-                button.frame = frame
-                button.tag = i
-                button.setTitle("Button \(i)", forState: UIControlState.Normal)
-                println("Making button \(i)")
-                rustleActionSheet.addButtonWithTitle(button_title)
-                rustleActionSheet.addSubview(button)
+                rustleActionSheet.addAction(UIAlertAction(title:button_title, style:UIAlertActionStyle.Default, handler:{ action in
+                    println("loading", channel, "from", platform)
+                    self.openStream(platform, channel: channel)
+                }))
             }
         }
+        
+        rustleActionSheet.addAction(UIAlertAction(title:"Cancel", style:UIAlertActionStyle.Cancel, handler:nil))
+        presentViewController(rustleActionSheet, animated:true, completion:nil)
+    }
+    
+    func openStream(platform:String, channel:String) {
+        var s = RustleStream()
+        switch platform {
+            case "ustream":
+                s = UStream()
+            case "twitch":
+                s = Twitch()
+            default:
+                println(platform, "is not supported right now")
+        }
+        s.channel = channel
+        player.contentURL = s.getStreamURL()
+        player.play()
 
-        rustleActionSheet.bounds = CGRectMake(0, 0, 320, 485)
-        rustleActionSheet.showInView(self.view)
-        
     }
     
     func addHandlers() {

        
        player.play()
        
        
        
    }

    override func didReceiveMemoryWarning() {

        }
        
        
        let rustleActionSheet = UIAlertController(title: title, message: nil, preferredStyle:UIAlertControllerStyle.ActionSheet)
        
        var i : Int
        
