2021-08-24 17:40:10 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
2022-02-11 20:12:44 +03:00
|
|
|
|
2022-11-04 18:35:45 +03:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<style>
|
|
|
|
video {
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<video id="video_source" controls="" autoplay="" name="media">
|
|
|
|
<source type="video/mp4" />
|
|
|
|
</video>
|
|
|
|
<script>
|
|
|
|
const { invoke, convertFileSrc } = window.__TAURI__.tauri
|
|
|
|
const video = document.getElementById('video_source')
|
|
|
|
const source = document.createElement('source')
|
|
|
|
invoke('video_uri').then(([scheme, path]) => {
|
2022-09-18 15:16:35 +03:00
|
|
|
source.type = 'video/mp4'
|
2022-11-04 18:35:45 +03:00
|
|
|
source.src = convertFileSrc(path, scheme)
|
2022-09-18 15:16:35 +03:00
|
|
|
video.appendChild(source)
|
|
|
|
video.load()
|
2022-11-04 18:35:45 +03:00
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|