Skip to content

Commit c4ea39c

Browse files
committed
onCurrentTimestamp
1 parent dce665c commit c4ea39c

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

injected/src/features.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@ const otherFeatures = /** @type {const} */ ([
3434
/** @type {Record<string, FeatureName[]>} */
3535
export const platformSupport = {
3636
apple: ['webCompat', ...baseFeatures],
37-
'apple-isolated': [
38-
'duckPlayerNative',
39-
'brokerProtection',
40-
'performanceMetrics',
41-
'clickToLoad',
42-
'messageBridge',
43-
'favicon',
44-
],
37+
'apple-isolated': ['duckPlayerNative', 'brokerProtection', 'performanceMetrics', 'clickToLoad', 'messageBridge', 'favicon'],
4538
android: [...baseFeatures, 'webCompat', 'breakageReporting', 'duckPlayer', 'messageBridge'],
4639
'android-broker-protection': ['brokerProtection'],
4740
'android-autofill-password-import': ['autofillPasswordImport'],

injected/src/features/duck-player-native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import ContentFeature from '../content-feature.js';
2-
import { isBeingFramed } from '../utils.js';
2+
// import { isBeingFramed } from '../utils.js';
33
import { DuckPlayerNativeMessages } from './duckplayer-native/native-messages.js';
44
import { initDuckPlayerNative } from './duckplayer-native/duckplayer-native.js';
55

injected/src/features/duckplayer-native/duckplayer-native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function initDuckPlayerNative(messages) {
2727
/**
2828
* Set up subscription listeners
2929
*/
30-
// messages.onGetCurrentTimestamp(() => {
30+
// messages.onCurrentTimestamp(() => {
3131
// console.log('GET CURRENT TIMESTAMP');
3232
// getCurrentTimestamp();
3333
// });
@@ -56,7 +56,7 @@ export async function initDuckPlayerNative(messages) {
5656
const timestampPolling = setInterval(() => {
5757
const timestamp = getCurrentTimestamp();
5858
console.log('Sending timestamp', timestamp);
59-
messages.onGetCurrentTimestamp(getCurrentTimestamp());
59+
messages.onCurrentTimestamp(getCurrentTimestamp());
6060
}, 300);
6161

6262
sideEffects.push(() => {

injected/src/features/duckplayer-native/native-messages.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class DuckPlayerNativeMessages {
3737
*/
3838
initialSetup() {
3939
if (this.environment.isIntegrationMode()) {
40-
return Promise.resolve({ version: '1' });
40+
return Promise.resolve({ locale: 'en' });
4141
}
4242
return this.messaging.request(constants.MSG_NAME_INITIAL_SETUP);
4343
}
@@ -46,8 +46,8 @@ export class DuckPlayerNativeMessages {
4646
* Notifies with current timestamp
4747
* @param {number} timestamp
4848
*/
49-
onGetCurrentTimestamp(timestamp) {
50-
return this.messaging.notify('onGetCurrentTimestamp', { timestamp });
49+
onCurrentTimestamp(timestamp) {
50+
return this.messaging.notify('onCurrentTimestamp', { timestamp });
5151
}
5252

5353
/**

0 commit comments

Comments
 (0)