@vanillaskyai/video 0.10.11 → 0.10.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ VanillaSky follows semantic versioning. This changelog begins with the 0.1 beta.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.10.12
|
|
8
|
+
|
|
9
|
+
- Use query context to choose between equally relevant Pexels subject matches in the starter, while preserving subject, activity and equipment priority.
|
|
10
|
+
|
|
7
11
|
## 0.10.11
|
|
8
12
|
|
|
9
13
|
- Keep the opening chapter visible until the first body visual and narration are ready, without mounting a second player or replaying the opening.
|
package/package.json
CHANGED
|
@@ -71,7 +71,9 @@ export async function findStockFootage(query: string, orientation: VideoOrientat
|
|
|
71
71
|
if (selection && subject.length) {
|
|
72
72
|
const covers = (phrase: string) => terms(phrase).every(word => subject.includes(word));
|
|
73
73
|
if (!covers(selection.subject) || selection.exclude?.some(covers)) continue;
|
|
74
|
-
|
|
74
|
+
// Query context breaks equal hint matches without outweighing a hint.
|
|
75
|
+
const contextScore = matches / (tokens.length + 1);
|
|
76
|
+
matches = 2 + contextScore + Number(Boolean(selection.activity && covers(selection.activity)))
|
|
75
77
|
+ Number(Boolean(selection.equipment && covers(selection.equipment)));
|
|
76
78
|
}
|
|
77
79
|
// The documented Video resource can have only a numeric page URL and no
|