From c78d631b5bda8555e35c031955df4e25c4bc20c0 Mon Sep 17 00:00:00 2001 From: NicoleYarroch Date: Thu, 26 Oct 2017 15:56:36 -0400 Subject: Fixed foregrounded app video stream not starting Reset HMI level in the `SDLStreamingMediaLifecycleManage` class when app disconnects from Core. --- SmartDeviceLink/SDLStreamingMediaLifecycleManager.m | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- cgit v1.2.1