Show unassociated webpage resources in the existing source dialog before publishing the same prepared media. Keep preview cancellation and promotion with the source-selection owner, including canonical embedded-player URLs. Rejoin the shared position when a viewer resumes after buffering. Retire the issued seek on playback progress so a later independent stall can recover. Verified the source dialog, media handoff and cancellation in Chrome, both TypeScript projects, documentation, and the full 2654-test Web suite.
17 lines
850 B
TypeScript
17 lines
850 B
TypeScript
import { createElement } from "react";
|
|
import { renderToStaticMarkup } from "react-dom/server";
|
|
import { expect, test } from "vitest";
|
|
import { useChannelGuideSample } from "../src/client/pages/ChannelGuidePreview";
|
|
import { WatchSourceDialog } from "../src/client/channel/components/ChannelShareControl";
|
|
|
|
test("the guide sample owns the embedded-source methods used when opening the watch dialog", () => {
|
|
function SampleDialog() {
|
|
const { channel } = useChannelGuideSample();
|
|
expect(channel.watchPreview("friday")).toBeUndefined();
|
|
expect(channel.prepareWatchEmbed).toBeTypeOf("function");
|
|
expect(channel.confirmWatchPreview).toBeTypeOf("function");
|
|
return createElement(WatchSourceDialog, { channel, roomId: "friday", onClose() {} });
|
|
}
|
|
expect(() => renderToStaticMarkup(createElement(SampleDialog))).not.toThrow();
|
|
});
|