mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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?
|
||||
recording = "";
|
||||
|
||||
function log(message) {
|
||||
print(APP_NAME + ": " + message);
|
||||
}
|
||||
|
||||
function updateRecorder() {
|
||||
Messages.sendMessage(HIFI_RECORDER_CHANNEL, JSON.stringify({
|
||||
playing: isPlaying,
|
||||
|
@ -40,6 +44,24 @@
|
|||
case PLAYER_COMMAND_PLAY:
|
||||
isPlaying = true;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
Messages.sendMessage(HIFI_PLAYER_CHANNEL, JSON.stringify({
|
||||
player: playerIDs[index],
|
||||
command: PLAYER_COMMAND_PLAY,
|
||||
recording: mapping,
|
||||
recording: "atp:" + mapping,
|
||||
position: MyAvatar.position,
|
||||
orientation: MyAvatar.orientation
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue