mirador-annotation-editor-video 0.0.19 → 0.0.21

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.
@@ -47,8 +47,6 @@ function mapStateToProps(state, {
47
47
  } else {
48
48
  _playerReferences.playerReferences.init(state, windowId, _OSDReferences.OSDReferences, actions);
49
49
  }
50
- console.log('overlay :', _playerReferences.playerReferences.getOverlay());
51
- console.log('mediaType :', _playerReferences.playerReferences.getMediaType());
52
50
  // This could be removed but it's serve the useEffect in AnnotationForm for now.
53
51
  let annotation = (0, _annotations.getPresentAnnotationsOnSelectedCanvases)(state, {
54
52
  windowId
@@ -9,6 +9,7 @@ var _reactRedux = require("react-redux");
9
9
  var _selectors = require("mirador/dist/es/src/state/selectors");
10
10
  var _canvases = require("mirador/dist/es/src/state/selectors/canvases");
11
11
  var _companionWindows = require("mirador/dist/es/src/state/selectors/companionWindows");
12
+ var _window = require("mirador/dist/es/src/state/selectors/window");
12
13
  const MiradorAnnotation = require('mirador-annotations/src/plugins/miradorAnnotationPlugin').default;
13
14
  // TODO use selector in main componenent
14
15
  /**
@@ -28,6 +29,9 @@ function mapStateToProps(state, {
28
29
  if (Object.keys(annotationCreationCompanionWindows).length !== 0) {
29
30
  annotationEditCompanionWindowIsOpened = false;
30
31
  }
32
+ let currrentTime = (0, _window.getWindowCurrentTime)(state, {
33
+ windowId
34
+ });
31
35
  return {
32
36
  annotationEditCompanionWindowIsOpened,
33
37
  canvases: (0, _canvases.getVisibleCanvases)(state, {
@@ -36,7 +40,8 @@ function mapStateToProps(state, {
36
40
  config: state.config,
37
41
  windowViewType: (0, _selectors.getWindowViewType)(state, {
38
42
  windowId
39
- })
43
+ }),
44
+ currentTime: currrentTime
40
45
  };
41
46
  }
42
47
  const enhance = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mirador-annotation-editor-video",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "Mirador 4 plugin wrapping Mirador Annotation Editor plugin and adding video annotation support",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@mui/icons-material": "^5.11.16",
26
26
  "mirador": "npm:mirador-video@1.0.14",
27
- "mirador-annotations": "npm:mirador-annotation-editor@1.0.57"
27
+ "mirador-annotations": "git://github.com/SCENE-CE/mirador-annotation-editor"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "lodash": "^4.17.11",
@@ -30,8 +30,6 @@ function mapStateToProps(state, { id: companionWindowId, windowId }) {
30
30
  }else{
31
31
  playerReferences.init(state, windowId,OSDReferences, actions);
32
32
  }
33
- console.log('overlay :',playerReferences.getOverlay())
34
- console.log('mediaType :', playerReferences.getMediaType())
35
33
  // This could be removed but it's serve the useEffect in AnnotationForm for now.
36
34
  let annotation = getPresentAnnotationsOnSelectedCanvases(state, { windowId })
37
35
  .flatMap((annoPage) => annoPage.json.items || [])
@@ -3,6 +3,7 @@ import { connect } from 'react-redux';
3
3
  import { getWindowViewType } from 'mirador/dist/es/src/state/selectors';
4
4
  import { getVisibleCanvases } from 'mirador/dist/es/src/state/selectors/canvases';
5
5
  import { getCompanionWindowsForContent } from 'mirador/dist/es/src/state/selectors/companionWindows';
6
+ import { getWindowCurrentTime } from "mirador/dist/es/src/state/selectors/window";
6
7
  const MiradorAnnotation = require('mirador-annotations/src/plugins/miradorAnnotationPlugin').default;
7
8
  // TODO use selector in main componenent
8
9
  /**
@@ -15,11 +16,13 @@ function mapStateToProps(state, { targetProps: { windowId } }) {
15
16
  if (Object.keys(annotationCreationCompanionWindows).length !== 0) {
16
17
  annotationEditCompanionWindowIsOpened = false;
17
18
  }
19
+ let currrentTime = getWindowCurrentTime(state, { windowId })
18
20
  return {
19
21
  annotationEditCompanionWindowIsOpened,
20
22
  canvases: getVisibleCanvases(state, { windowId }),
21
23
  config: state.config,
22
24
  windowViewType: getWindowViewType(state, { windowId }),
25
+ currentTime: currrentTime,
23
26
  };
24
27
  }
25
28