                             
                             if let streamURL = URL(string: json?["downloadurl"] as! String) {
                                 let result = ListenToYouTubeResult(streamURL: streamURL, title: videoName)
-                                observer.sendNext(ListenToYouTubeStatus.success(result))
+                                observer.send(value: ListenToYouTubeStatus.success(result))
                                 observer.sendCompleted()
                             } else {
-                                observer.sendFailed(NSError(domain: "StreamURLError", code: 0, userInfo: nil))
+                                observer.send(error: NSError(domain: "StreamURLError", code: 0, userInfo: nil))
                             }
                             
                             return

                    })
                    
                case .failure(let error):
                    observer.sendFailed(error as NSError)
                }
            }
        }

                            
                        case "convert":
                            if let percent = Int(attributes["percent"] as! String) {
                                observer.send(value: ListenToYouTubeStatus.converting(percent))
                            }
                            
                        case "download":
                            if let percent = Int(attributes["percent"] as! String) {
                                observer.send(value: ListenToYouTubeStatus.downloading(percent))
                            }
                            
                        case "finished":
