iOS: CarPlay (#420)
A CarPlay scene beside the phone's: In Progress, Unread and Shows as
CPListTemplates from ipx's API, read with the player's credentials, and
a pick played through the same Playback, so it resumes from the saved
place, saves as it goes and marks read at 90%. Now Playing is the
system's template over Playback's now-playing info.
When the car starts a different episode the page is sent
{t:"replaced"} and closes its player bar. Left open, the bar would have
gone on as the old episode while the host's clock belonged to the new
one, saving that time and marking the wrong item read.
The badge's fetch moves into API.get, which CarPlay shares. Build 13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -193,5 +193,18 @@ await vm.runInContext('forgetPush()', ctx);
|
||||
ok(fetched.some(f => f.startsWith(`DELETE /api/push/devices/${'ab'.repeat(32)}`)), 'signing out left ipx counting for this phone');
|
||||
|
||||
if (failed) { console.error(`\n${failed} failed`); process.exit(1); }
|
||||
// CarPlay (#420): the car picks another episode, and the page's bar lets go of the old one.
|
||||
vm.runInContext('player.guid="g1";player.feed="f";player.enc=42;player.entry=E', Object.assign(ctx, { E: entry }));
|
||||
body.classList.toggle('has-video', false);
|
||||
audio.src = '/media/42';
|
||||
ctx.window.ipxNative.on({ t: 'state', playing: true });
|
||||
since();
|
||||
ctx.window.ipxNative.on({ t: 'replaced' });
|
||||
ok(vm.runInContext('player.guid', ctx) === null, "the bar still shows the episode the car replaced");
|
||||
ok(audio.paused === true, 'the page still thinks its episode plays');
|
||||
audio.removeAttribute('src');
|
||||
ok(!last('stop'), "closing the page's player stopped what the car chose");
|
||||
ok(!posted.some(m => m.t === 'position'), 'the old episode saved its place by the new one\'s clock');
|
||||
|
||||
console.log('OK: native-bridge: the host takes playback, keeping, the sleep timer and haptics, and the page follows it');
|
||||
process.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user