Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 6000c0d

Browse files
authored
DuckPlayer: Open "Watch in Youtube" links in a new tab (#3840)
Task/Issue URL: https://app.asana.com/0/1204099484721401/1209211829036067 Tech Design URL: CC
1 parent 55b03a5 commit 6000c0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DuckDuckGo/Tab/TabExtensions/DuckPlayerTabExtension.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,9 @@ extension DuckPlayerTabExtension: NavigationResponder {
311311
return .next
312312
}
313313

314-
if shouldOpenInNewTab, shouldOpenDuckPlayerDirectly,
314+
if shouldOpenDuckPlayerDirectly,
315315
let url = webView?.url, !url.isEmpty, !url.isYoutubeVideo {
316+
webView?.stopAllMediaPlayback()
316317
webView?.loadInNewWindow(navigationAction.url)
317318
return .cancel
318319
}

0 commit comments

Comments
 (0)