summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2017-10-26 15:56:36 -0400
committerNicoleYarroch <nicole@livio.io>2017-10-26 15:56:36 -0400
commitc78d631b5bda8555e35c031955df4e25c4bc20c0 (patch)
tree10e5480c9646800318c84ef77c630611417888cb
parentb5871b2dc65601d534a758ed1fd4d1da024e00bd (diff)
downloadsdl_ios-bug/issue_774_video_streaming_reconnect_foregrounded_broke.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.m8
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;