mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +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();
|
||||
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;
|
||||
}, [sourceId, meta, router]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue