@clockworkdog/cogs-client 3.0.0-alpha.1 → 3.0.0-alpha.3
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/AudioPlayer.js +1 -1
- package/dist/VideoPlayer.js +2 -3
- package/dist/browser/index.mjs +485 -486
- package/dist/browser/index.umd.js +4 -4
- package/package.json +2 -2
package/dist/AudioPlayer.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Howl, Howler } from 'howler/dist/howler.core.min.js';
|
|
4
4
|
const DEBUG = false;
|
|
5
5
|
// Check an iOS-only property (See https://developer.mozilla.org/en-US/docs/Web/API/Navigator#non-standard_properties)
|
|
6
|
-
const IS_IOS = typeof navigator.standalone !== 'undefined';
|
|
6
|
+
const IS_IOS = typeof navigator !== 'undefined' && typeof navigator.standalone !== 'undefined';
|
|
7
7
|
export default class AudioPlayer {
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
9
|
constructor(cogsConnection) {
|
package/dist/VideoPlayer.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ActiveVideoClipState } from './types/VideoState';
|
|
2
|
-
const DEFAULT_PARENT_ELEMENT = document.body;
|
|
3
2
|
export default class VideoPlayer {
|
|
4
3
|
constructor(
|
|
5
4
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
-
cogsConnection, parentElement =
|
|
5
|
+
cogsConnection, parentElement = document.body) {
|
|
7
6
|
this.cogsConnection = cogsConnection;
|
|
8
7
|
this.eventTarget = new EventTarget();
|
|
9
8
|
this.globalVolume = 1;
|
|
@@ -70,7 +69,7 @@ export default class VideoPlayer {
|
|
|
70
69
|
});
|
|
71
70
|
}
|
|
72
71
|
resetParentElement() {
|
|
73
|
-
this.setParentElement(
|
|
72
|
+
this.setParentElement(document.body);
|
|
74
73
|
}
|
|
75
74
|
setGlobalVolume(globalVolume) {
|
|
76
75
|
Object.values(this.videoClipPlayers).forEach((clipPlayer) => {
|