@vouchfor/embeds 2.1.0 → 3.0.0
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/dist/es/embeds.js +11 -4
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/src/components/PlayerEmbed/index.d.ts +2 -0
- package/dist/iife/dialog-embed/embed.iife.js +143 -139
- package/dist/iife/dialog-embed/embed.iife.js.map +1 -1
- package/dist/iife/embeds.iife.js +154 -150
- package/dist/iife/embeds.iife.js.map +1 -1
- package/dist/iife/player-embed/embed.iife.js +166 -162
- package/dist/iife/player-embed/embed.iife.js.map +1 -1
- package/package.json +4 -4
- package/src/components/PlayerEmbed/index.ts +10 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vouchfor/embeds",
|
3
|
-
"version": "
|
3
|
+
"version": "3.0.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Aaron Williams",
|
6
6
|
"main": "dist/es/embeds.js",
|
@@ -46,8 +46,8 @@
|
|
46
46
|
"dependencies": {
|
47
47
|
"@a11y/focus-trap": "^1.0.5",
|
48
48
|
"@lit/task": "^1.0.0",
|
49
|
-
"@vouchfor/canvas-video": "^8.
|
50
|
-
"@vouchfor/media-player": "^
|
49
|
+
"@vouchfor/canvas-video": "^8.2.0",
|
50
|
+
"@vouchfor/media-player": "^4.0.0",
|
51
51
|
"uuid": "^9.0.1"
|
52
52
|
},
|
53
53
|
"peerDependencies": {
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"@types/mocha": "^10.0.6",
|
67
67
|
"@vouchfor/eslint-config": "^1.0.1",
|
68
68
|
"@vouchfor/prettier-config": "^1.0.1",
|
69
|
-
"@vouchfor/video-utils": "^1.
|
69
|
+
"@vouchfor/video-utils": "^1.2.0",
|
70
70
|
"@web/dev-server-esbuild": "^1.0.2",
|
71
71
|
"@web/test-runner": "^0.18.1",
|
72
72
|
"@web/test-runner-browserstack": "^0.7.1",
|
@@ -5,6 +5,7 @@ import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
5
|
|
6
6
|
import type { Scene, Scenes, TemplateInstance } from '@vouchfor/canvas-video';
|
7
7
|
import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
|
8
|
+
import type { PropertyValueMap } from 'lit';
|
8
9
|
import type { Environment } from '~/utils/env';
|
9
10
|
|
10
11
|
import { EventForwardController } from './controllers/event-forwarder';
|
@@ -64,10 +65,12 @@ class PlayerEmbed extends LitElement {
|
|
64
65
|
'playing',
|
65
66
|
'ratechange',
|
66
67
|
'scenechange',
|
68
|
+
'scenesupdate',
|
67
69
|
'seeking',
|
68
70
|
'seeked',
|
69
71
|
'timeupdate',
|
70
72
|
'volumechange',
|
73
|
+
'processing',
|
71
74
|
'waiting',
|
72
75
|
|
73
76
|
'video:loadeddata',
|
@@ -220,6 +223,13 @@ class PlayerEmbed extends LitElement {
|
|
220
223
|
return null;
|
221
224
|
}
|
222
225
|
|
226
|
+
protected willUpdate(changedProperties: PropertyValueMap<PlayerEmbedProps>) {
|
227
|
+
// If the vouch this embed is pointing to changes then reset the player
|
228
|
+
if (changedProperties.has('vouchId') && this.vouchId !== changedProperties.get('vouchId')) {
|
229
|
+
this.reset(0, false);
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
223
233
|
render() {
|
224
234
|
return html`
|
225
235
|
${this._renderStyles()}
|