Compare commits
No commits in common. "002dfacc3ef6d00383545188dec82e17aab4a9c9" and "67f848a9ee9d3a4a7e57c4c5309e6e7518e0fe33" have entirely different histories.
002dfacc3e
...
67f848a9ee
@ -5,7 +5,7 @@
|
|||||||
v-if="!triggerZoneEditorVisible"
|
v-if="!triggerZoneEditorVisible"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="spawn-container uw-ui-trigger"
|
class="spawn-container uw-ui-trigger debug-2"
|
||||||
:style="triggerZoneStyles"
|
:style="triggerZoneStyles"
|
||||||
>
|
>
|
||||||
|
|
||||||
@ -169,7 +169,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="triggerZoneEditorVisible"
|
v-if="triggerZoneEditorVisible"
|
||||||
class="context-spawn uw-ui-area"
|
class="context-spawn uw-ui-area"
|
||||||
style="z-index: 1000;"
|
style="z-index: 1000; border: 2px dashed red; overflow: hidden;"
|
||||||
>
|
>
|
||||||
<TriggerZoneEditor
|
<TriggerZoneEditor
|
||||||
:settings="settings"
|
:settings="settings"
|
||||||
@ -335,6 +335,7 @@ export default {
|
|||||||
this.statusFlags.aardErrors = data.aardErrors;
|
this.statusFlags.aardErrors = data.aardErrors;
|
||||||
break;
|
break;
|
||||||
case 'player-dimensions':
|
case 'player-dimensions':
|
||||||
|
console.log('player dimensions response received.', data);
|
||||||
this.playerDimensionsUpdate(data.data);
|
this.playerDimensionsUpdate(data.data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -450,6 +451,7 @@ export default {
|
|||||||
* Handles trigger zone
|
* Handles trigger zone
|
||||||
*/
|
*/
|
||||||
handleTriggerZone(mouseInside) {
|
handleTriggerZone(mouseInside) {
|
||||||
|
console.log('handing trigger zone!', mouseInside);
|
||||||
// this.triggerZoneActive = mouseInside;
|
// this.triggerZoneActive = mouseInside;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -56,21 +56,6 @@
|
|||||||
</OtherSiteSettings>
|
</OtherSiteSettings>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Reset options -->
|
|
||||||
<div class="flex flex-col" style="margin-top: 2rem">
|
|
||||||
<h2>Reset and backup</h2>
|
|
||||||
<p>
|
|
||||||
Pressing the button will reset settings to default without asking.
|
|
||||||
</p>
|
|
||||||
<button
|
|
||||||
class="danger"
|
|
||||||
@click="resetSettings"
|
|
||||||
>
|
|
||||||
Reset settings
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -268,6 +268,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
siteDefaultCrop() {
|
siteDefaultCrop() {
|
||||||
|
// console.log('Getting default site crop:', this.siteSettings.raw?.defaults?.crop ? 'yay' : '{useDefault}', this.siteSettings.raw?.defaults?.crop)
|
||||||
return this.siteSettings.raw?.defaults?.crop ? JSON.stringify(this.siteSettings.raw?.defaults?.crop) : JSON.stringify({useDefault: true});
|
return this.siteSettings.raw?.defaults?.crop ? JSON.stringify(this.siteSettings.raw?.defaults?.crop) : JSON.stringify({useDefault: true});
|
||||||
},
|
},
|
||||||
siteDefaultStretch() {
|
siteDefaultStretch() {
|
||||||
@ -401,6 +402,7 @@ export default {
|
|||||||
commandArguments = undefined;
|
commandArguments = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log('setting option', option, 'to cmd:', commandArguments, 'event data in:', value);
|
||||||
await this.siteSettings.set(option, commandArguments);
|
await this.siteSettings.set(option, commandArguments);
|
||||||
this.$nextTick( () => this.$forceUpdate() );
|
this.$nextTick( () => this.$forceUpdate() );
|
||||||
},
|
},
|
||||||
|
@ -7,11 +7,7 @@
|
|||||||
<div class="flex flex-col compact-form">
|
<div class="flex flex-col compact-form">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="label">Enable in-player UI</div>
|
<div class="label">Enable in-player UI</div>
|
||||||
<input
|
<input type="checkbox" v-model="settings.active.ui.inPlayer.enabled" />
|
||||||
type="checkbox"
|
|
||||||
v-model="settings.active.ui.inPlayer.enabled"
|
|
||||||
@change="saveSettings()"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col field-group compact-form"
|
class="flex flex-col field-group compact-form"
|
||||||
@ -30,7 +26,6 @@
|
|||||||
<select
|
<select
|
||||||
v-model="settings.active.ui.inPlayer.alignment"
|
v-model="settings.active.ui.inPlayer.alignment"
|
||||||
@click="setUiOption('alignment', $event)"
|
@click="setUiOption('alignment', $event)"
|
||||||
@change="saveSettings()"
|
|
||||||
>
|
>
|
||||||
<option value="left">Left</option>
|
<option value="left">Left</option>
|
||||||
<option value="right">Right</option>
|
<option value="right">Right</option>
|
||||||
@ -46,7 +41,6 @@
|
|||||||
<select
|
<select
|
||||||
v-model="settings.active.ui.inPlayer.activation"
|
v-model="settings.active.ui.inPlayer.activation"
|
||||||
@click="setUiOption('', $event)"
|
@click="setUiOption('', $event)"
|
||||||
@change="saveSettings()"
|
|
||||||
>
|
>
|
||||||
<option value="player">
|
<option value="player">
|
||||||
When mouse hovers over player
|
When mouse hovers over player
|
||||||
@ -140,9 +134,7 @@ export default {
|
|||||||
setUiPage(key, event) {
|
setUiPage(key, event) {
|
||||||
|
|
||||||
},
|
},
|
||||||
saveSettings() {
|
|
||||||
this.settings.saveWithoutReload();
|
|
||||||
},
|
|
||||||
startTriggerZoneEdit() {
|
startTriggerZoneEdit() {
|
||||||
this.eventBus.send('start-trigger-zone-edit');
|
this.eventBus.send('start-trigger-zone-edit');
|
||||||
},
|
},
|
||||||
|
@ -43,6 +43,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showContextMenu() {
|
showContextMenu() {
|
||||||
|
console.log('will show context menu.')
|
||||||
this.contextMenuVisible = true;
|
this.contextMenuVisible = true;
|
||||||
},
|
},
|
||||||
hideContextMenu() {
|
hideContextMenu() {
|
||||||
|
@ -210,6 +210,8 @@ export default {
|
|||||||
y: event.clientY
|
y: event.clientY
|
||||||
};
|
};
|
||||||
this.dragStartConfiguration = JSON.parse(JSON.stringify(this.settings.active.ui.inPlayer.triggerZoneDimensions));
|
this.dragStartConfiguration = JSON.parse(JSON.stringify(this.settings.active.ui.inPlayer.triggerZoneDimensions));
|
||||||
|
|
||||||
|
console.log(`Mousedown on ${corner}`);
|
||||||
},
|
},
|
||||||
handleMouseUp(event) {
|
handleMouseUp(event) {
|
||||||
if (!this.activeCornerDrag) {
|
if (!this.activeCornerDrag) {
|
||||||
@ -303,6 +305,7 @@ export default {
|
|||||||
return value.replaceAll(',', '.').split('.', 2).join('.').replace(/[^0-9.\-]/g, '');
|
return value.replaceAll(',', '.').split('.', 2).join('.').replace(/[^0-9.\-]/g, '');
|
||||||
},
|
},
|
||||||
setTriggerZoneSize(key, value, instantUpdate) {
|
setTriggerZoneSize(key, value, instantUpdate) {
|
||||||
|
console.log('setting trigger zone size:', key, value);
|
||||||
let size = (+this.forceNumber(value) / 100);
|
let size = (+this.forceNumber(value) / 100);
|
||||||
|
|
||||||
if (isNaN(+size)) {
|
if (isNaN(+size)) {
|
||||||
|
@ -287,6 +287,7 @@ export default {
|
|||||||
|
|
||||||
const observer = new IntersectionObserver(
|
const observer = new IntersectionObserver(
|
||||||
([e]) => {
|
([e]) => {
|
||||||
|
// console.log('observer triggered. intersection ratio?', e.intersectionRatio)
|
||||||
saveButton.classList.toggle('floating', e.intersectionRatio < 0.95);
|
saveButton.classList.toggle('floating', e.intersectionRatio < 0.95);
|
||||||
},
|
},
|
||||||
{threshold: [0, 0.5, 0.9, 0.95, 1]}
|
{threshold: [0, 0.5, 0.9, 0.95, 1]}
|
||||||
|
@ -33,18 +33,25 @@ export default {
|
|||||||
if (!dimensions.width || !dimensions.height) {
|
if (!dimensions.width || !dimensions.height) {
|
||||||
this.playerDimensions = undefined;
|
this.playerDimensions = undefined;
|
||||||
}
|
}
|
||||||
|
console.log('player dimensions update received:', dimensions);
|
||||||
if (dimensions?.width !== this.playerDimensions?.width || dimensions?.height !== this.playerDimensions?.height) {
|
if (dimensions?.width !== this.playerDimensions?.width || dimensions?.height !== this.playerDimensions?.height) {
|
||||||
|
console.log('Player dimensions changed!', dimensions);
|
||||||
|
|
||||||
this.playerDimensions = dimensions;
|
this.playerDimensions = dimensions;
|
||||||
this.updateTriggerZones();
|
this.updateTriggerZones();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateTriggerZones() {
|
updateTriggerZones() {
|
||||||
|
console.log('triggered zone style recheck. player dims:', this.playerDimensions, 'in player settings:', this.settings.active.ui);
|
||||||
if (this.playerDimensions && this.settings) {
|
if (this.playerDimensions && this.settings) {
|
||||||
this.triggerZoneStyles = {
|
this.triggerZoneStyles = {
|
||||||
width: `${Math.round(this.playerDimensions.width * this.settings.active.ui.inPlayer.triggerZoneDimensions.width)}px`,
|
width: `${Math.round(this.playerDimensions.width * this.settings.active.ui.inPlayer.triggerZoneDimensions.width)}px`,
|
||||||
height: `${Math.round(this.playerDimensions.height * this.settings.active.ui.inPlayer.triggerZoneDimensions.height)}px`,
|
height: `${Math.round(this.playerDimensions.height * this.settings.active.ui.inPlayer.triggerZoneDimensions.height)}px`,
|
||||||
transform: `translate(${(this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetX)}%, ${this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetY}%)`,
|
transform: `translate(${(this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetX)}%, ${this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetY}%)`,
|
||||||
};
|
};
|
||||||
|
console.log(
|
||||||
|
'player trigger zone css:', this.triggerZoneStyles
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -100,11 +107,13 @@ export default {
|
|||||||
this.uwTriggerZoneTimeout = setTimeout(
|
this.uwTriggerZoneTimeout = setTimeout(
|
||||||
() => {
|
() => {
|
||||||
this.uwTriggerZoneVisible = false;
|
this.uwTriggerZoneVisible = false;
|
||||||
|
// this.$forceRefresh();
|
||||||
},
|
},
|
||||||
500
|
750
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// console.log('[UI] hiding UI because conditions were not met. canShowUI:', eventData.canShowUI, 'isOverTriggerZone', isOverTriggerZone);
|
||||||
// this.uwTriggerZoneVisible = false;
|
// this.uwTriggerZoneVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ export class FallbackCanvas extends GlCanvas {
|
|||||||
protected initWebgl() { }
|
protected initWebgl() { }
|
||||||
|
|
||||||
drawVideoFrame(video: HTMLVideoElement) {
|
drawVideoFrame(video: HTMLVideoElement) {
|
||||||
|
console.log('context:', this.context, 'canvas:', this.canvas );
|
||||||
this.context.drawImage(video, this.context.canvas.width, this.context.canvas.height);
|
this.context.drawImage(video, this.context.canvas.width, this.context.canvas.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,8 +122,11 @@ export class SiteSettings {
|
|||||||
|
|
||||||
this.compileSettingsObject();
|
this.compileSettingsObject();
|
||||||
|
|
||||||
|
console.log('changes:', parsedSettings);
|
||||||
|
|
||||||
// trigger any subscriptions on change
|
// trigger any subscriptions on change
|
||||||
if (parsedSettings._updateFlags) {
|
if (parsedSettings._updateFlags) {
|
||||||
|
console.log('update flags yay!')
|
||||||
if (parsedSettings._updateFlags?.forSite === this.site) {
|
if (parsedSettings._updateFlags?.forSite === this.site) {
|
||||||
if (parsedSettings._updateFlags?.requireReload === true) {
|
if (parsedSettings._updateFlags?.requireReload === true) {
|
||||||
for (const key in this.storageChangeSubscriptions) {
|
for (const key in this.storageChangeSubscriptions) {
|
||||||
@ -137,9 +140,9 @@ export class SiteSettings {
|
|||||||
}
|
}
|
||||||
else if (parsedSettings._updateFlags?.requireReload) {
|
else if (parsedSettings._updateFlags?.requireReload) {
|
||||||
for (const key of parsedSettings._updateFlags?.requireReload) {
|
for (const key of parsedSettings._updateFlags?.requireReload) {
|
||||||
if (! this.storageChangeSubscriptions[key]) {
|
console.log('reload required for:', key, this.storageChangeSubscriptions);
|
||||||
continue;
|
|
||||||
}
|
if (! this.storageChangeSubscriptions[key]) continue;
|
||||||
|
|
||||||
for (const fn of this.storageChangeSubscriptions[key]) {
|
for (const fn of this.storageChangeSubscriptions[key]) {
|
||||||
fn(this, changes, area);
|
fn(this, changes, area);
|
||||||
|
@ -99,6 +99,8 @@ class PlayerData {
|
|||||||
}],
|
}],
|
||||||
'get-player-dimensions': [{
|
'get-player-dimensions': [{
|
||||||
function: () => {
|
function: () => {
|
||||||
|
console.log('received get player dimensions! -- returning:', this.dimensions)
|
||||||
|
|
||||||
this.eventBus.send('uw-config-broadcast', {
|
this.eventBus.send('uw-config-broadcast', {
|
||||||
type: 'player-dimensions',
|
type: 'player-dimensions',
|
||||||
data: this.dimensions
|
data: this.dimensions
|
||||||
|
Loading…
Reference in New Issue
Block a user