mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
Play recording
This commit is contained in:
parent
75d970f5d5
commit
ce898ae42a
2 changed files with 23 additions and 1 deletions
|
@ -22,6 +22,10 @@
|
||||||
isPlaying = false, // TODO: Just use recording value instead?
|
isPlaying = false, // TODO: Just use recording value instead?
|
||||||
recording = "";
|
recording = "";
|
||||||
|
|
||||||
|
function log(message) {
|
||||||
|
print(APP_NAME + ": " + message);
|
||||||
|
}
|
||||||
|
|
||||||
function updateRecorder() {
|
function updateRecorder() {
|
||||||
Messages.sendMessage(HIFI_RECORDER_CHANNEL, JSON.stringify({
|
Messages.sendMessage(HIFI_RECORDER_CHANNEL, JSON.stringify({
|
||||||
playing: isPlaying,
|
playing: isPlaying,
|
||||||
|
@ -40,6 +44,24 @@
|
||||||
case PLAYER_COMMAND_PLAY:
|
case PLAYER_COMMAND_PLAY:
|
||||||
isPlaying = true;
|
isPlaying = true;
|
||||||
recording = message.recording;
|
recording = message.recording;
|
||||||
|
|
||||||
|
log("Play recording " + recording);
|
||||||
|
|
||||||
|
Agent.isAvatar = true;
|
||||||
|
Avatar.position = message.position;
|
||||||
|
Avatar.orientation = message.orientation;
|
||||||
|
|
||||||
|
Recording.loadRecording(recording);
|
||||||
|
Recording.setPlayFromCurrentLocation(true);
|
||||||
|
Recording.setPlayerUseDisplayName(true);
|
||||||
|
Recording.setPlayerUseHeadModel(false);
|
||||||
|
Recording.setPlayerUseAttachments(true);
|
||||||
|
Recording.setPlayerLoop(true);
|
||||||
|
Recording.setPlayerUseSkeletonModel(true);
|
||||||
|
|
||||||
|
Recording.setPlayerTime(0.0);
|
||||||
|
Recording.startPlaying();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -321,7 +321,7 @@
|
||||||
Messages.sendMessage(HIFI_PLAYER_CHANNEL, JSON.stringify({
|
Messages.sendMessage(HIFI_PLAYER_CHANNEL, JSON.stringify({
|
||||||
player: playerIDs[index],
|
player: playerIDs[index],
|
||||||
command: PLAYER_COMMAND_PLAY,
|
command: PLAYER_COMMAND_PLAY,
|
||||||
recording: mapping,
|
recording: "atp:" + mapping,
|
||||||
position: MyAvatar.position,
|
position: MyAvatar.position,
|
||||||
orientation: MyAvatar.orientation
|
orientation: MyAvatar.orientation
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue