File tree Expand file tree Collapse file tree 5 files changed +20
-4
lines changed
Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ export default class DuckPlayerFeature extends ContentFeature {
6565 */
6666 if ( isBeingFramed ( ) ) return ;
6767
68+ /**
69+ * TODO: Remove this when ready to re-enable Duck Player classic
70+ */
71+ console . warn ( 'Not initializing Duck Player classic' ) ;
72+ return ;
73+
6874 /**
6975 * Just the 'overlays' part of the settings object.
7076 * @type {import("@duckduckgo/privacy-configuration/schema/features/duckplayer").DuckPlayerSettings['overlays'] }
Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ export const MSG_NAME_MUTE_AUDIO = 'onMuteAudio';
55export const MSG_NAME_SERP_NOTIFY = 'onSerpNotify' ;
66export const MSG_NAME_YOUTUBE_ERROR = 'onYoutubeError' ;
77export const MSG_NAME_URL_CHANGE = 'onUrlChanged' ;
8- export const MSG_NAME_FEATURE_READY = 'onDuckPlayerReady' ;
8+ export const MSG_NAME_FEATURE_READY = 'onDuckPlayerFeatureReady' ;
9+ export const MSG_NAME_SCRIPTS_READY = 'onDuckPlayerScriptsReady' ;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export class DuckPlayerNative {
9696 this . onLoad ( this . sideEffects , this . logger ) ;
9797 }
9898
99- this . messages . notifyFeatureIsReady ( ) ;
99+ this . messages . notifyScriptIsReady ( ) ;
100100 }
101101}
102102
Original file line number Diff line number Diff line change @@ -97,10 +97,18 @@ export class DuckPlayerNativeMessages {
9797 }
9898
9999 /**
100- * Notifies browser that the feature
100+ * Notifies browser that the feature is ready
101101 */
102102 notifyFeatureIsReady ( ) {
103- console . log ( 'FIRING ONDUCKPLAYERREADY' ) ;
103+ console . log ( 'FIRING' , constants . MSG_NAME_FEATURE_READY ) ;
104104 this . messaging . notify ( constants . MSG_NAME_FEATURE_READY , { } ) ;
105105 }
106+
107+ /**
108+ * Notifies browser that scripts are ready to be acalled
109+ */
110+ notifyScriptIsReady ( ) {
111+ console . log ( 'FIRING' , constants . MSG_NAME_SCRIPTS_READY ) ;
112+ this . messaging . notify ( constants . MSG_NAME_SCRIPTS_READY , { } ) ;
113+ }
106114}
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ export class WebkitMessagingTransport {
154154 * @param {import('../index.js').RequestMessage } msg
155155 */
156156 async request ( msg ) {
157+ console . log ( 'MESSAGE' , msg ) ;
157158 const data = await this . wkSendAndWait ( msg . context , msg ) ;
158159
159160 if ( isResponseFor ( msg , data ) ) {
You can’t perform that action at this time.
0 commit comments