Skip to content

Commit 6f91ff5

Browse files
committed
Enabled Duck Player custom error for all platforms
1 parent 0928b3c commit 6f91ff5

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

special-pages/pages/duckplayer/app/features/error-detection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export class ErrorDetection {
3131
iframeDidLoad(iframe) {
3232
this.iframe = iframe;
3333

34-
if (!this.options || !this.options.signInRequiredSelector) {
35-
console.log('Missing Custom Error options');
34+
if (this.options?.state !== 'enabled') {
35+
console.log('Error detection disabled');
3636
return null;
3737
}
3838

special-pages/pages/duckplayer/app/providers/YouTubeErrorProvider.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export function YouTubeErrorProvider({ initial = null, children }) {
4141
const [error, setError] = useState(initialError);
4242

4343
const messaging = useMessaging();
44-
const platformName = usePlatformName();
4544
const setFocusMode = useSetFocusMode();
4645

4746
// listen for updates
@@ -52,9 +51,7 @@ export function YouTubeErrorProvider({ initial = null, children }) {
5251
if (YOUTUBE_ERROR_IDS.includes(eventError) || eventError === null) {
5352
if (eventError && eventError !== error) {
5453
setFocusMode('paused');
55-
if (platformName === 'macos' || platformName === 'ios') {
56-
messaging.reportYouTubeError({ error: eventError });
57-
}
54+
messaging.reportYouTubeError({ error: eventError });
5855
} else {
5956
setFocusMode('enabled');
6057
}

0 commit comments

Comments
 (0)