@vouchfor/embeds 0.0.0-experiment.e2a213c → 0.0.0-experiment.e50ad48

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vouchfor/embeds",
3
- "version": "0.0.0-experiment.e2a213c",
3
+ "version": "0.0.0-experiment.e50ad48",
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.e2a213c",
47
- "@vouchfor/media-player": "0.0.0-experiment.e2a213c",
46
+ "@vouchfor/canvas-video": "0.0.0-experiment.e50ad48",
47
+ "@vouchfor/media-player": "0.0.0-experiment.e50ad48",
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.e2a213c",
66
+ "@vouchfor/video-utils": "0.0.0-experiment.e50ad48",
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';
@@ -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()}