Log parsing for udon video URL's

This commit is contained in:
Natsumi
2021-04-08 19:16:18 +12:00
parent 2100fbe730
commit 46e5862fed
5 changed files with 65 additions and 3 deletions

View File

@@ -4371,6 +4371,9 @@ speechSynthesis.getVoices();
case 'Event':
this.speak(noty.data);
break;
case 'VideoPlay':
this.speak(`Now playing: ${noty.data}`);
break;
default:
break;
}
@@ -4448,6 +4451,9 @@ speechSynthesis.getVoices();
case 'Event':
AppApi.XSNotification('VRCX', noty.data, timeout, image);
break;
case 'VideoPlay':
AppApi.XSNotification('VRCX', `Now playing: ${noty.data}`, timeout, image);
break;
default:
break;
}
@@ -4522,7 +4528,10 @@ speechSynthesis.getVoices();
AppApi.DesktopNotification(noty.data, `has spawned a portal`, image);
break;
case 'Event':
AppApi.DesktopNotification('Event', noty.data, '');
AppApi.DesktopNotification('Event', noty.data, image);
break;
case 'VideoPlay':
AppApi.DesktopNotification('Now playing', noty.data, image);
break;
default:
break;
@@ -5783,7 +5792,6 @@ speechSynthesis.getVoices();
};
break;
case 'event':
tableData = {
created_at: gameLog.dt,
@@ -5792,6 +5800,14 @@ speechSynthesis.getVoices();
};
break;
case 'video-play':
tableData = {
created_at: gameLog.dt,
type: 'VideoPlay',
data: gameLog.videoURL
};
break;
default:
break;
}
@@ -6957,6 +6973,7 @@ speechSynthesis.getVoices();
sharedFeedFilters.noty.unmute = 'On';
sharedFeedFilters.noty.PortalSpawn = 'Everyone';
sharedFeedFilters.noty.Event = 'On';
sharedFeedFilters.noty.VideoPlay = 'Off';
sharedFeedFilters.wrist.Location = 'On';
sharedFeedFilters.wrist.OnPlayerJoined = 'Everyone';
sharedFeedFilters.wrist.OnPlayerLeft = 'Everyone';
@@ -6981,6 +6998,7 @@ speechSynthesis.getVoices();
sharedFeedFilters.wrist.unmute = 'On';
sharedFeedFilters.wrist.PortalSpawn = 'Everyone';
sharedFeedFilters.wrist.Event = 'On';
sharedFeedFilters.wrist.VideoPlay = 'On';
configRepository.setString('sharedFeedFilters', JSON.stringify(sharedFeedFilters));
}

View File

@@ -167,7 +167,7 @@ html
template(#tool)
div(style="margin:0 0 10px;display:flex;align-items:center")
el-select(v-model="gameLogTable.filters[0].value" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
el-option(v-once v-for="type in ['Location', 'OnPlayerJoined', 'OnPlayerLeft', 'Notification', 'PortalSpawn', 'Event']" :key="type" :label="type" :value="type")
el-option(v-once v-for="type in ['Location', 'OnPlayerJoined', 'OnPlayerLeft', 'Notification', 'PortalSpawn', 'Event', 'VideoPlay']" :key="type" :label="type" :value="type")
el-input(v-model="gameLogTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px")
el-button(type="default" @click="resetGameLog()" icon="el-icon-refresh" circle style="flex:none")
el-table-column(type="expand")
@@ -186,6 +186,8 @@ html
location(v-if="scope.row.type === 'Location'" :location="scope.row.data[0]" :hint="scope.row.data[1]")
template(v-else-if="scope.row.type === 'Event'")
span(v-text="scope.row.data")
template(v-else-if="scope.row.type === 'VideoPlay'")
span.x-link(v-text="scope.row.data" @click="openExternalLink(scope.row.data)")
template(v-else-if="scope.row.type === 'Notification'")
span.x-link(v-else v-text="scope.row.data" @click="lookupUser(scope.row.data)")
@@ -1519,6 +1521,9 @@ html
div
span.toggle-name Events
toggle-switch(:options="toggleSwitchOptionsOn" group="switchNotyGrouprequestEvent" v-model="sharedFeedFilters.noty.Event" class="toggle-switch")
div
span.toggle-name Video Play
toggle-switch(:options="toggleSwitchOptionsOn" group="switchNotyGrouprequestVideoPlay" v-model="sharedFeedFilters.noty.VideoPlay" class="toggle-switch")
template(#footer)
el-button(type="small" @click="cancelSharedFeedFilters") Cancel
el-button(type="primary" size="small" style="margin-left:10px" @click="saveSharedFeedFilters") Save
@@ -1598,6 +1603,9 @@ html
div
span.toggle-name Events
toggle-switch(:options="toggleSwitchOptionsOn" group="switchWristGrouprequestEvent" v-model="sharedFeedFilters.wrist.Event" class="toggle-switch")
div
span.toggle-name Video Play
toggle-switch(:options="toggleSwitchOptionsOn" group="switchWristGrouprequestVideoPlay" v-model="sharedFeedFilters.wrist.VideoPlay" class="toggle-switch")
template(#footer)
el-button(type="small" @click="cancelSharedFeedFilters") Cancel
el-button(type="primary" size="small" @click="saveSharedFeedFilters") Save

View File

@@ -36,6 +36,10 @@ function parseRawGameLog(dt, type, args) {
gameLog.event = args[0];
break;
case 'video-play':
gameLog.videoURL = args[0];
break;
default:
break;
}

View File

@@ -958,6 +958,9 @@ speechSynthesis.getVoices();
case 'Event':
text = noty.data;
break;
case 'VideoPlay':
text = `<strong>Now playing:</strong> ${noty.data}`;
break;
default:
break;
}