diff --git a/applications/app/services/dotcomrendering/MediaPicker.scala b/applications/app/services/dotcomrendering/MediaPicker.scala index 96f6e03288d..b8f98de6386 100644 --- a/applications/app/services/dotcomrendering/MediaPicker.scala +++ b/applications/app/services/dotcomrendering/MediaPicker.scala @@ -5,9 +5,9 @@ import model.Cors.RichRequestHeader import model.{MediaPage, Video, Audio} import play.api.mvc.RequestHeader import utils.DotcomponentsLogger -import experiments.DCRVideoPages import navigation.NavLinks.media import experiments.ActiveExperiments +import conf.switches.Switches.DCRVideoPages object MediaPicker extends GuLogging { @@ -40,15 +40,13 @@ object MediaPicker extends GuLogging { request: RequestHeader, ): RenderType = { - // defaulting to false until we are ready to release and create a 0% test - val participatingInTest = ActiveExperiments.isParticipating(DCRVideoPages) val dcrCanRender = dcrCouldRender(mediaPage) val flags = dcrLogFlags(mediaPage) val tier = { if (request.forceDCROff) LocalRender else if (request.forceDCR) RemoteRender - else if (dcrCanRender && participatingInTest) RemoteRender + else if (dcrCanRender && DCRVideoPages.isSwitchedOn) RemoteRender else LocalRender } diff --git a/common/app/conf/switches/FeatureSwitches.scala b/common/app/conf/switches/FeatureSwitches.scala index a51b16793ed..84075240ca7 100644 --- a/common/app/conf/switches/FeatureSwitches.scala +++ b/common/app/conf/switches/FeatureSwitches.scala @@ -503,6 +503,7 @@ trait FeatureSwitches { sellByDate = Some(LocalDate.of(2024, 6, 5)), exposeClientSide = true, ) + val DiscussionInApps = Switch( SwitchGroup.Feature, "discussion-in-apps", @@ -513,4 +514,14 @@ trait FeatureSwitches { sellByDate = Some(LocalDate.of(2024, 6, 5)), exposeClientSide = true, ) + + val DCRVideoPages = Switch( + SwitchGroup.Feature, + "dcr-video-pages", + "If this switch is on, we will render video pages with DCR", + owners = Seq(Owner.withEmail("dotcom.platform@theguardian.com"), Owner.withEmail("commercial.dev@theguardian.com")), + safeState = Off, + sellByDate = never, + exposeClientSide = false, + ) } diff --git a/common/app/experiments/Experiments.scala b/common/app/experiments/Experiments.scala index a70890d856c..e572d2aee01 100644 --- a/common/app/experiments/Experiments.scala +++ b/common/app/experiments/Experiments.scala @@ -13,7 +13,6 @@ object ActiveExperiments extends ExperimentsDefinition { Set( DarkModeWeb, DCRTagPages, - DCRVideoPages, UpdatedHeaderDesign, MastheadWithHighlights, AffiliateLinksDCR, @@ -58,18 +57,6 @@ object AffiliateLinksDCR participationGroup = Perc0E, ) -object DCRVideoPages - extends Experiment( - name = "dcr-video-pages", - description = "Render video pages with DCR", - owners = Seq( - Owner.withGithub("commercial.dev@theguardian.com"), - Owner.withGithub("dotcom.platform@theguardian.com"), - ), - sellByDate = LocalDate.of(2024, 5, 30), - participationGroup = Perc10A, - ) - object DCRTagPages extends Experiment( name = "dcr-tag-pages",