‘);$vidEndSlate.removeClass(‘video__end-slate–inactive’).addClass(‘video__end-slate–active’);}};CNN.autoPlayVideoExist = (CNN.autoPlayVideoExist === true) ? true : false;var configObj = {thumb: ‘none’,video: ‘world/2018/04/23/royal-baby-duchess-of-cambridge-leaves-hospital-ip.cnn’,width: ‘100%’,height: ‘100%’,section: ‘domestic’,profile: ‘expansion’,network: ‘cnn’,markupId: ‘large-media_0’,adsection: ‘const-video-leaf’,frameWidth: ‘100%’,frameHeight: ‘100%’,posterImageOverride: {“mini”:{“width”:220,”type”:”jpg”,”uri”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-small-169.jpg”,”height”:124},”xsmall”:{“width”:307,”type”:”jpg”,”uri”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-medium-plus-169.jpg”,”height”:173},”small”:{“width”:460,”type”:”jpg”,”uri”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-large-169.jpg”,”height”:259},”medium”:{“width”:780,”type”:”jpg”,”uri”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-exlarge-169.jpg”,”height”:438},”large”:{“width”:1100,”type”:”jpg”,”uri”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-super-169.jpg”,”height”:619},”full16x9″:{“width”:1600,”type”:”jpg”,”uri”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-full-169.jpg”,”height”:900},”mini1x1″:{“width”:120,”type”:”jpg”,”uri”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-small-11.jpg”,”height”:120}}},autoStartVideo = false,isVideoReplayClicked = false,callbackObj,containerEl,currentVideoCollection = [{“descriptionPlainText”:”The Duke and Duchess of Cambridge emerge from St. Mary’s Hospital with their newborn son.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/180423123107-01-royal-family-baby-screengrab-large-169.jpg”,”title”:”Duke, Duchess leave hospital with royal baby”,”videoCMSUrl”:”/videos/world/2018/04/23/royal-baby-duchess-of-cambridge-leaves-hospital-ip.cnn”,”videoLeafUrl”:”/videos/world/2018/04/23/royal-baby-duchess-of-cambridge-leaves-hospital-ip.cnn”,”videoId”:”world/2018/04/23/royal-baby-duchess-of-cambridge-leaves-hospital-ip.cnn”,”videoUrl”:”/videos/world/2018/04/23/royal-baby-duchess-of-cambridge-leaves-hospital-ip.cnn”},{“descriptionPlainText”:”Catherine, Duchess of Cambridge, the wife of Prince William, gave birth to the couple’s third child, a son who becomes the fifth in line to the British throne.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/180423180448-royal-baby-first-glimpse-1-large-169.jpg”,”title”:”First glimpse at the royal baby”,”videoCMSUrl”:”/video/data/3.0/video/world/2018/04/23/duchess-duke-cambridge-baby-on-the-way-lon-orig.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2018/04/23/duchess-duke-cambridge-baby-on-the-way-lon-orig.cnn”,”videoId”:”world/2018/04/23/duchess-duke-cambridge-baby-on-the-way-lon-orig.cnn”,”videoUrl”:”/videos/world/2018/04/23/duchess-duke-cambridge-baby-on-the-way-lon-orig.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”Princess Charlotte made her second public appearance with the Royal Family en route to being christened at the Church of St Mary Magdalene in Sandringham, England.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150705122657-01-baby-charlotte-christening-large-169.jpg”,”title”:”Princess Charlotte makes second public appearance”,”videoCMSUrl”:”/video/data/3.0/video/us/2015/07/05/princess-charlotte-royal-baby-christening-england-vo-nr.cnn-ap/index.xml”,”videoLeafUrl”:”/videos/us/2015/07/05/princess-charlotte-royal-baby-christening-england-vo-nr.cnn-ap”,”videoId”:”us/2015/07/05/princess-charlotte-royal-baby-christening-england-vo-nr.cnn-ap”,”videoUrl”:”/videos/us/2015/07/05/princess-charlotte-royal-baby-christening-england-vo-nr.cnn-ap/video/playlists/royal-baby/”},{“descriptionPlainText”:”As the world follows Princess Charlotte, Victoria Arbiter Brown talks about other spare heirs, including King Henry Vlll and Queen Elizabeth’s father.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150424101718-royal-baby-spare-prince-george-william-orig-00001311-large-169.jpg”,”title”:”Why being ‘spare to the heir’ matters”,”videoCMSUrl”:”/video/data/3.0/video/world/2015/04/23/royal-baby-spare-prince-george-william-orig.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/04/23/royal-baby-spare-prince-george-william-orig.cnn”,”videoId”:”world/2015/04/23/royal-baby-spare-prince-george-william-orig.cnn”,”videoUrl”:”/videos/world/2015/04/23/royal-baby-spare-prince-george-william-orig.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”Royal baby gets a name fit for a Princess (or a Sex and the City star). CNN’s Jeanne Moos wonders about her nickname.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150504201750-erin-pkg-moos-royal-baby-name-00004901-large-169.jpg”,”title”:”What’s in a name? For a princess … a lot!”,”videoCMSUrl”:”/video/data/3.0/video/world/2015/05/04/erin-pkg-moos-royal-baby-name.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/05/04/erin-pkg-moos-royal-baby-name.cnn”,”videoId”:”world/2015/05/04/erin-pkg-moos-royal-baby-name.cnn”,”videoUrl”:”/videos/world/2015/05/04/erin-pkg-moos-royal-baby-name.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”The Duke and Duchess of Cambridge leave London’s St. Mary’s Hospital with the new princess.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150502133931-sot-royal-baby-princess-public-debut-00004708-large-169.jpg”,”title”:”Royal baby seen in public for first time”,”videoCMSUrl”:”/video/data/3.0/video/world/2015/05/02/sot-royal-baby-princess-public-debut.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/05/02/sot-royal-baby-princess-public-debut.cnn”,”videoId”:”world/2015/05/02/sot-royal-baby-princess-public-debut.cnn”,”videoUrl”:”/videos/world/2015/05/02/sot-royal-baby-princess-public-debut.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”Economists predict the financial impact of the royal baby could be huge, if it’s a girl. CNN’s Erin McLaughlin reports.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/130426094202-05-kate-pregnant-0426-large-169.jpg”,”title”:”Could a new princess mean big money?”,”videoCMSUrl”:”/video/data/3.0/video/tv/2015/04/29/pkg-mclaughlin-royal-baby-girl.cnn/index.xml”,”videoLeafUrl”:”/videos/tv/2015/04/29/pkg-mclaughlin-royal-baby-girl.cnn”,”videoId”:”tv/2015/04/29/pkg-mclaughlin-royal-baby-girl.cnn”,”videoUrl”:”/videos/tv/2015/04/29/pkg-mclaughlin-royal-baby-girl.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”CNN’s Max Foster looks at how the latest generation of British Royalty is choosing to raise their children.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150502042024-pkg-foster-modern-royal-parents-and-babies-00001706-large-169.jpg”,”title”:”Raising modern royalty “,”videoCMSUrl”:”/video/data/3.0/video/world/2015/05/02/pkg-foster-modern-royal-parents-and-babies.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/05/02/pkg-foster-modern-royal-parents-and-babies.cnn”,”videoId”:”world/2015/05/02/pkg-foster-modern-royal-parents-and-babies.cnn”,”videoUrl”:”/videos/world/2015/05/02/pkg-foster-modern-royal-parents-and-babies.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”CNN’s Tom Foreman explains the history of Prince George’s name.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/130723151016-07-royal-baby-0723-story-top.jpg”,”title”:”Baby’s name is steeped in royal history”,”videoCMSUrl”:”/video/data/3.0/video/us/2013/07/24/tsr-foreman-royal-baby-name-roots.cnn/index.xml”,”videoLeafUrl”:”/videos/us/2013/07/24/tsr-foreman-royal-baby-name-roots.cnn”,”videoId”:”us/2013/07/24/tsr-foreman-royal-baby-name-roots.cnn”,”videoUrl”:”/videos/us/2013/07/24/tsr-foreman-royal-baby-name-roots.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”Remember the buzz over the first royal baby? Get ready for more. CNN’s Max foster looks back at the birth of Prince George.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150502052744-pkg-foster-royal-baby-lookback-00011326-large-169.jpg”,”title”:”Royal baby: Here we go again!”,”videoCMSUrl”:”/video/data/3.0/video/world/2015/05/02/pkg-foster-royal-baby-lookback.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/05/02/pkg-foster-royal-baby-lookback.cnn”,”videoId”:”world/2015/05/02/pkg-foster-royal-baby-lookback.cnn”,”videoUrl”:”/videos/world/2015/05/02/pkg-foster-royal-baby-lookback.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”CNN’s Max Foster looks at the younger royal siblings who made the nontraditional journey to the throne.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150502051523-pkg-foster-royal-spares-succession-00015627-large-169.jpg”,”title”:”Younger royal siblings who made it to the throne”,”videoCMSUrl”:”/video/data/3.0/video/world/2015/05/02/pkg-foster-royal-spares-succession.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/05/02/pkg-foster-royal-spares-succession.cnn”,”videoId”:”world/2015/05/02/pkg-foster-royal-spares-succession.cnn”,”videoUrl”:”/videos/world/2015/05/02/pkg-foster-royal-spares-succession.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”Media outlets and dedicated Royal fans eagerly await the arrival of the Royal baby, which is due sometime before the end of April. CNN’s Max Foster reports.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150416161709-lok-foster-uk-royal-baby-watch-00002815-large-169.jpg”,”title”:”Royal baby fever spreading across London”,”videoCMSUrl”:”/video/data/3.0/video/world/2015/04/16/lok-foster-uk-royal-baby-watch.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/04/16/lok-foster-uk-royal-baby-watch.cnn”,”videoId”:”world/2015/04/16/lok-foster-uk-royal-baby-watch.cnn”,”videoUrl”:”/videos/world/2015/04/16/lok-foster-uk-royal-baby-watch.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”Silver Cross, the first maker of baby carriages and a British institution, will make the new pram for the second royal baby. CNN’s Erin McLaughlin reports.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/150416051219-pkg-cnni-mclaughlin-uk-royal-baby-prams-00005009-large-169.jpg”,”title”:”Baby prams fit for royalty”,”videoCMSUrl”:”/video/data/3.0/video/world/2015/04/16/pkg-cnni-mclaughlin-uk-royal-baby-prams.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2015/04/16/pkg-cnni-mclaughlin-uk-royal-baby-prams.cnn”,”videoId”:”world/2015/04/16/pkg-cnni-mclaughlin-uk-royal-baby-prams.cnn”,”videoUrl”:”/videos/world/2015/04/16/pkg-cnni-mclaughlin-uk-royal-baby-prams.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”See what sold ROYALLY after Prince George wore them! CNN’s Jeanne Moos reports on the 17-month-old trendsetter.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/141216202651-erin-pkg-moos-prince-george-sells-shoes-00001430-story-top.jpg”,”title”:”Prince George: Pint-sized trendsetter?”,”videoCMSUrl”:”/video/data/3.0/video/world/2014/12/16/erin-pkg-moos-prince-george-sells-shoes.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2014/12/16/erin-pkg-moos-prince-george-sells-shoes.cnn”,”videoId”:”world/2014/12/16/erin-pkg-moos-prince-george-sells-shoes.cnn”,”videoUrl”:”/videos/world/2014/12/16/erin-pkg-moos-prince-george-sells-shoes.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”Prince George’s first royal play date in New Zealand included babies born around the same time as the future king.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/140409104809-foster-royal-playdate-00010102-story-top.jpg”,”title”:”Royal baby has first play date”,”videoCMSUrl”:”/video/data/3.0/video/world/2014/04/09/foster-royal-playdate.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2014/04/09/foster-royal-playdate.cnn”,”videoId”:”world/2014/04/09/foster-royal-playdate.cnn”,”videoUrl”:”/videos/world/2014/04/09/foster-royal-playdate.cnn/video/playlists/royal-baby/”},{“descriptionPlainText”:”CNN’s Max Foster looks back at Prince George’s first year in the limelight.”,”imageUrl”:”//cdn.cnn.com/cnnnext/dam/assets/140721175321-02-prince-george-birthday-story-top.jpg”,”title”:”Prince George’s eventful first year “,”videoCMSUrl”:”/video/data/3.0/video/world/2014/07/22/pkg-foster-prince-george-birthday.cnn/index.xml”,”videoLeafUrl”:”/videos/world/2014/07/22/pkg-foster-prince-george-birthday.cnn”,”videoId”:”world/2014/07/22/pkg-foster-prince-george-birthday.cnn”,”videoUrl”:”/videos/world/2014/07/22/pkg-foster-prince-george-birthday.cnn/video/playlists/royal-baby/”}],currentVideoCollectionId = ”,isLivePlayer = false,mediaMetadataCallbacks,moveToNextTimeout,mutePlayerEnabled = false,nextVideoId = ”,nextVideoUrl = ”,turnOnFlashMessaging = false,videoPinner,videoEndSlateImpl;if (CNN.autoPlayVideoExist === false) {autoStartVideo = true;if (autoStartVideo === true) {if (turnOnFlashMessaging === true) {autoStartVideo = false;containerEl = jQuery(document.getElementById(configObj.markupId));CNN.VideoPlayer.showFlashSlate(containerEl);} else {CNN.autoPlayVideoExist = true;}}}configObj.autostart = autoStartVideo;CNN.VideoPlayer.setPlayerProperties(configObj.markupId, autoStartVideo, isLivePlayer, isVideoReplayClicked, mutePlayerEnabled);CNN.VideoPlayer.setFirstVideoInCollection(currentVideoCollection, configObj.markupId);var embedLinkHandler = {},videoPinner,embedCodeCopy;function onVideoCarouselItemClicked(evt) {‘use strict’;var videoId,articleElem,videoPlayer,thumbImageElem,thumbImageLargeSource,overrides = {autostart: false,muteOverlayClicked: true,videoCollection: this.videoCollection},shouldStartVideo = false,playerInstance;try {articleElem = jQuery(evt.currentTarget).find(‘article’);thumbImageElem = jQuery(articleElem).find(‘.media__image’);videoId = articleElem.data().videoId;if (CNN.VideoPlayer.getLibraryName(configObj.markupId) === ‘fave’) {playerInstance = FAVE.player.getInstance(configObj.markupId);if (CNN.Utils.existsObject(playerInstance) &&typeof playerInstance.getVideoData === ‘function’ &&playerInstance.getVideoData().id !== videoId) {jQuery(articleElem).closest(‘.cn-carousel-medium-strip’).parent().find(‘script[name=”metaScript”]’).remove();playerInstance.play(videoId, overrides);}} else {videoPlayer = CNNVIDEOAPI.CNNVideoManager.getInstance().getPlayerByContainer(configObj.markupId);if (videoPlayer && videoPlayer.videoInstance) {if (!videoPlayer.videoInstance.cvp) {if (typeof thumbImageElem !== ‘undefined’ && thumbImageElem !== null) {thumbImageLargeSource = thumbImageElem.data() && thumbImageElem.data().srcLarge ? thumbImageElem.data().srcLarge : ‘none’;}overrides.thumb = thumbImageLargeSource ? thumbImageLargeSource : ‘none’;shouldStartVideo = true;}if (videoPlayer.videoInstance.config) {if (videoPlayer.videoInstance.config.video !== videoId) {jQuery(articleElem).closest(‘.cn-carousel-medium-strip’).parent().find(‘script[name=”metaScript”]’).remove();CNNVIDEOAPI.CNNVideoManager.getInstance().playVideo(configObj.markupId, videoId, overrides);}}}}} catch (error) {console.log(“error in initializing video player” + error);}}function setInitialVideoEmbed() {}function initialize(){var carousel = jQuery(document.getElementById(‘cn-current_video_collection’)).find(‘.js-owl-carousel’),owl;if (carousel) {carousel.find(‘.cn__column.carousel__content__item’).find(‘a’).removeAttr(‘href’);jQuery(carousel).on(‘click’, ‘.cn__column.carousel__content__item’, onVideoCarouselItemClicked);}}if (CNN.VideoPlayer.getLibraryName(configObj.markupId) === ‘videoLoader’) {window.CNNVideoAPILoadCompleteHandlers = window.CNNVideoAPILoadCompleteHandlers ? window.CNNVideoAPILoadCompleteHandlers : [];window.CNNVideoAPILoadCompleteHandlers.push(initialize);window.CNNVideoAPILoadCompleteHandlers.push(setInitialVideoEmbed);} else {initialize();}CNN.INJECTOR.executeFeature(‘videx’).done(function () {var initMeta = {id:”world/2018/04/23/royal-baby-duchess-of-cambridge-leaves-hospital-ip.cnn”, isEmbeddable: “yes”};CNN.Videx.EmbedButton.updateCode(initMeta);}).fail(function () {throw ‘Unable to fetch the videx bundle.’;});function updateCurrentlyPlaying(videoId) {var videoCollectionId = ‘current_video_collection’,videocardContents = getCurrentVideoCardContents(videoId),carousel = jQuery(document.getElementById(‘cn-current_video_collection’)).find(‘.js-owl-carousel’),domain = CNN.Host.domain || (document.location.protocol + ‘//’ + document.location.hostname),owl,$owlFirstItem,$owlPrevItem,showDetailsSpanContent = ”,gigyaShareElement,showIndex,whatsappShareElement,$carouselContentItems = jQuery(‘.carousel__content__item’, document.getElementById(‘cn-current_video_collection’));gigyaShareElement = jQuery(‘div.js-gigya-sharebar’);if (typeof gigyaShareElement !== ‘undefined’ && CNN.Utils.existsObject(videocardContents)) {jQuery(gigyaShareElement).attr(‘data-title’, videocardContents.headlinePlainText || ”);jQuery(gigyaShareElement).attr(‘data-description’, videocardContents.descriptionPlainText || ”);jQuery(gigyaShareElement).attr(‘data-link’, domain + videocardContents.url || ”);jQuery(gigyaShareElement).attr(‘data-image-src’, (videocardContents.media && videocardContents.media.elementContents && videocardContents.media.elementContents.imageUrl) || ”);}whatsappShareElement = jQuery(‘div.share-bar-whatsapp-container’);if (typeof whatsappShareElement !== ‘undefined’) {jQuery(whatsappShareElement).attr(‘data-title’, videocardContents.headlinePlainText || ”);jQuery(whatsappShareElement).attr(‘data-storyurl’, domain + videocardContents.url || ”);}if (carousel && currentVideoCollectionContainsId(videoId)) {owl = carousel.data(‘owl.carousel’) || {};showIndex = getCurrentVideoIndex(videoId);if (typeof owl.to === ‘function’) {owl.to(showIndex);}$owlPrevItem = CNN.Utils.exists(owl.$element) ? owl.$element.find(‘.cd.cd–active’) : $carouselContentItems.find(‘.cd.cd–active’);$owlPrevItem.removeClass(‘cd–active’);$owlPrevItem.find(‘.media__over-text’).remove();$owlPrevItem.find(‘.media__icon’).show();$owlFirstItem = CNN.Utils.exists(owl._items) ? jQuery(owl._items[showIndex]) : $carouselContentItems.eq(showIndex);$owlFirstItem.find(‘.cd’).addClass(‘cd–active’);$owlFirstItem.find(‘.media a:first-child’).append(‘

Now Playing

‘);if (Modernizr && !Modernizr.phone) {$owlFirstItem.find(‘.media__icon’).hide();}}CNN.Videx.Metadata.init({dateCreated: videocardContents.dateCreated,descriptionText: videocardContents.descriptionText,duration: videocardContents.duration,sourceLink: videocardContents.sourceLink,sourceName: videocardContents.sourceName,title: videocardContents.headlineText},{videoCollectionDivId: ‘cn-17zdi48’,videoDescriptionDivId: ‘js-video_description-17zdi48’,videoDurationDivId: ‘js-video_duration-17zdi48’,videoTitleDivId: ‘js-leaf-video_headline-17zdi48’,videoSourceDivId: ‘js-video_sourceName-17zdi48’});if (CNN.Utils.exists(videocardContents.showName)) {if (CNN.Utils.exists(videocardContents.showUrl)) {showDetailsSpanContent = ‘‘ + videocardContents.showName + ‘ | ‘;} else {showDetailsSpanContent = videocardContents.showName + ‘ | ‘;}}fastdom.measure(function getShowInfo() {var $show = jQuery(‘.metadata__show’),$isShowDetailsSpanExists = $show.find(‘span’).hasClass(‘metadata–show__name’),$showName = jQuery(‘.metadata–show__name’);fastdom.mutate(function updateShowInfo() {if (!$isShowDetailsSpanExists) {$show.prepend(‘