File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
app/src/main/java/com/duckduckgo/app/pixels
duckplayer/duckplayer-impl/src/main/java/com/duckduckgo/duckplayer/impl Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -408,6 +408,7 @@ enum class AppPixelName(override val pixelName: String) : Pixel.PixelName {
408
408
DUCK_PLAYER_YOUTUBE_ERROR_AGE_RESTRICTED_DAILY_UNIQUE (" duckplayer_youtube-age-restricted-error_daily-unique" ),
409
409
DUCK_PLAYER_YOUTUBE_ERROR_NO_EMBED_DAILY_UNIQUE (" duckplayer_youtube-no-embed-error_daily-unique" ),
410
410
DUCK_PLAYER_YOUTUBE_ERROR_UNKNOWN_DAILY_UNIQUE (" duckplayer_youtube-unknown-error_daily-unique" ),
411
+ DUCK_PLAYER_JS_ERROR (" duckplayer_js-error" ),
411
412
412
413
MALICIOUS_SITE_PROTECTION_SETTING_TOGGLED (" m_malicious-site-protection_feature-toggled" ),
413
414
MALICIOUS_SITE_PROTECTION_VISIT_SITE (" m_malicious-site-protection_visit-site" ),
Original file line number Diff line number Diff line change @@ -212,7 +212,11 @@ class RealDuckPlayer @Inject constructor(
212
212
if (! isFeatureEnabled) return null
213
213
val embedUrl = duckPlayerFeatureRepository.getYouTubeEmbedUrl()
214
214
uri.pathSegments?.firstOrNull()?.let { videoID ->
215
- return " $https ://www.$embedUrl ?$DUCK_PLAYER_VIDEO_ID_QUERY_PARAM =$videoID "
215
+ return " $https ://www.$embedUrl ?$DUCK_PLAYER_VIDEO_ID_QUERY_PARAM =$videoID " .let {
216
+ uri.getQueryParameter(" willThrow" )?.takeIf { it.isNotBlank() }?.let { willThrow ->
217
+ " $it &willThrow=$willThrow "
218
+ } ? : it
219
+ }
216
220
}
217
221
return null
218
222
}
You can’t perform that action at this time.
0 commit comments