Skip to content

Commit

Permalink
Improve playback performance
Browse files Browse the repository at this point in the history
  • Loading branch information
undyingwraith committed Oct 24, 2024
1 parent 850cda2 commit 14ec43f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/ui/src/components/organisms/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export function VideoPlayer(props: { file: IVideoFile; }) {
if (videoRef.value != null) {
shaka.net.NetworkingEngine.registerScheme('ipfs', createShakaIpfsPlugin(ipfs), 1, false);
const player = new shaka.Player();
player.configure({
streaming: {
rebufferingGoal: 5,
bufferingGoal: 30,
}
});
playerRef.value = player;
player.attach(videoRef.value)
.then(() => player.load(`ipfs://${props.file.cid}/${props.file.video.name}`))
Expand Down

0 comments on commit 14ec43f

Please sign in to comment.