diff options
author | NicoleYarroch <nicole@livio.io> | 2017-10-26 15:56:36 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2017-10-26 15:56:36 -0400 |
commit | c78d631b5bda8555e35c031955df4e25c4bc20c0 (patch) | |
tree | 10e5480c9646800318c84ef77c630611417888cb | |
parent | b5871b2dc65601d534a758ed1fd4d1da024e00bd (diff) | |
download | sdl_ios-c78d631b5bda8555e35c031955df4e25c4bc20c0.tar.gz |
Fixed foregrounded app video stream not startingbug/issue_774_video_streaming_reconnect_foregrounded_broke
Reset HMI level in the `SDLStreamingMediaLifecycleManage` class when app disconnects from Core.
-rw-r--r-- | SmartDeviceLink/SDLStreamingMediaLifecycleManager.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m index 9e37dd472..c8dd8a809 100644 --- a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m +++ b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m @@ -158,6 +158,9 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N [self sdl_stopVideoSession]; self.restartVideoStream = NO; + + self.hmiLevel = SDLHMILevelNone; + [self.audioStreamStateMachine transitionToState:SDLAudioStreamStateStopped]; [self.videoStreamStateMachine transitionToState:SDLVideoStreamStateStopped]; } @@ -608,6 +611,11 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N - (void)sdl_startVideoSession { SDLLogV(@"Attempting to start video session"); + if (!self.isHmiStateVideoStreamCapable) { + SDLLogV(@"SDL Core is not ready to stream video. Video start service request will not be sent."); + return; + } + if (!self.isStreamingSupported) { SDLLogV(@"Streaming is not supported. Video start service request will not be sent."); return; |