yyqxiaoyin 5 rokov pred
rodič
commit
e395668be5

+ 1 - 1
MKRRadioManager/Classes/MKRRadioManager/MKRAVPlayer/MKRAVPlayer.m

@@ -379,11 +379,11 @@ NSURL * MKRUrlWithString(NSString *string){
 
 - (void)setState:(MKRAVPlayerState)state{
     if (_state != state) {
+        _state = state;
         if (self.delegate && [self.delegate respondsToSelector:@selector(playStateDidChange:)]) {
             [self.delegate playStateDidChange:state];
         }
     }
-    _state = state;
 }
 
 - (void)setDelegate:(id<MKRAVPlayerDelegate>)delegate{

+ 1 - 0
MKRRadioManager/Classes/MKRRadioManager/MKRWIFIDeviceManager/MKRWIFIDeviceManager.m

@@ -34,6 +34,7 @@ static inline void wd_main_queue(void (^block)(void)){
 - (instancetype)init {
     if (self = [super init]) {
         _upnpErrorCode = -1;
+        [self startUpnp];
         [ASControlTools sharedInstanceUPNP].delegate = self;
     }
     return self;