mirror of
https://github.com/sussy-code/smov.git
synced 2025-01-01 16:37:39 +01:00
autoplay if there is only one embed
This commit is contained in:
parent
e1edb1cc1f
commit
e939c6b0bd
1 changed files with 12 additions and 0 deletions
|
@ -109,6 +109,18 @@ export function EmbedSelectionView({ sourceId, id }: EmbedSelectionViewProps) {
|
||||||
router.close();
|
router.close();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (result.embeds.length === 1) {
|
||||||
|
const embedResult = await providers.runEmbedScraper({
|
||||||
|
id: result.embeds[0].embedId,
|
||||||
|
url: result.embeds[0].url,
|
||||||
|
});
|
||||||
|
setSourceId(sourceId);
|
||||||
|
setSource(
|
||||||
|
convertRunoutputToSource({ stream: embedResult.stream }),
|
||||||
|
progress
|
||||||
|
);
|
||||||
|
router.close();
|
||||||
|
}
|
||||||
return result.embeds;
|
return result.embeds;
|
||||||
}, [sourceId, meta, router]);
|
}, [sourceId, meta, router]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue