@vouchfor/embeds 0.0.0-experiment.f4325a2 → 0.0.0-experiment.f59de3c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vouchfor/embeds",
3
- "version": "0.0.0-experiment.f4325a2",
3
+ "version": "0.0.0-experiment.f59de3c",
4
4
  "license": "MIT",
5
5
  "author": "Aaron Williams",
6
6
  "main": "dist/es/embeds.js",
@@ -43,8 +43,8 @@
43
43
  "dependencies": {
44
44
  "@a11y/focus-trap": "^1.0.5",
45
45
  "@lit/task": "^1.0.0",
46
- "@vouchfor/canvas-video": "0.0.0-experiment.f4325a2",
47
- "@vouchfor/media-player": "0.0.0-experiment.f4325a2",
46
+ "@vouchfor/canvas-video": "0.0.0-experiment.f59de3c",
47
+ "@vouchfor/media-player": "0.0.0-experiment.f59de3c",
48
48
  "uuid": "^9.0.1"
49
49
  },
50
50
  "peerDependencies": {
@@ -63,7 +63,7 @@
63
63
  "@types/mocha": "^10.0.6",
64
64
  "@vouchfor/eslint-config": "^1.0.1",
65
65
  "@vouchfor/prettier-config": "^1.0.1",
66
- "@vouchfor/video-utils": "0.0.0-experiment.f4325a2",
66
+ "@vouchfor/video-utils": "0.0.0-experiment.f59de3c",
67
67
  "@web/dev-server-esbuild": "^1.0.2",
68
68
  "@web/test-runner": "^0.18.1",
69
69
  "@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';
@@ -222,6 +223,13 @@ class PlayerEmbed extends LitElement {
222
223
  return null;
223
224
  }
224
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
+
225
233
  render() {
226
234
  return html`
227
235
  ${this._renderStyles()}