mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-21 17:51:36 +03:00
31 lines
753 B
HTML
31 lines
753 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<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 { convertFileSrc } = window.__TAURI__.tauri
|
|
const video = document.getElementById('video_source')
|
|
const source = document.createElement('source')
|
|
source.type = 'video/mp4'
|
|
source.src = convertFileSrc('example/test_video.mp4', 'stream')
|
|
video.appendChild(source)
|
|
video.load()
|
|
</script>
|
|
</body>
|
|
|
|
</html> |