Skip to content

Commit

Permalink
Set default camera position for video previews
Browse files Browse the repository at this point in the history
  • Loading branch information
cld9x committed May 28, 2019
1 parent 07d4072 commit 119a234
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/src/scenes/Video.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
onMount(() => {
let player = videojs(videoElement);
player.vr({
let vr = player.vr({
projection: '360',
forceCardboard: false
});
player.hotkeys({
alwaysCaptureHotkeys: true,
volumeStep: 0.1,
Expand All @@ -42,5 +43,9 @@
}
}
});
player.on("loadedmetadata", function() {
vr.camera.position.set(-1, 0, -1);
});
});
</script>

0 comments on commit 119a234

Please sign in to comment.