We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm having trouble integrating Hls.js with QMediaPlayer. I'm using Quasar v2 with webpack. When I do it with HTML video tag, it works:
<template> <q-page class="video-page"> <div class="vp-container"> <h5>Video test Page</h5> <video controls ref="mediaPlayer" class="vp-video" crossorigin="use-credentials"> </video> </div> </q-page> </template> <script> import { defineComponent, ref, onMounted, onBeforeUnmount } from 'vue' import Hls from 'hls.js' export default defineComponent({ name: 'VideoPage', props: { url: { type: String, default: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8' } }, setup (props) { const mediaPlayer = ref(null) let player = null onMounted(() => { if (Hls.isSupported()) { player = new Hls() player.loadSource(props.url) console.log('Loaded') // console.log(mediaPlayer.value) player.attachMedia(mediaPlayer.value) player.on(Hls.Events.MANIFEST_PARSED, () => { mediaPlayer.value.play() }) } onBeforeUnmount(() => { if (player) { player.destroy() } }) return { mediaPlayer, player } } }) </script>
But when I try with QMediaPlayer it doesn't work
<template> <q-page class="video-page"> <div class="vp-container"> <h5>Video test Page</h5> <q-media-player ref="QMediaPlayer" class="vp-video" crossorigin="use-credentials"> </q-media-player> </div> </q-page> </template> <script> import { defineComponent, ref, onMounted, onBeforeUnmount } from 'vue' import Hls from 'hls.js' export default defineComponent({ name: 'VideoPage', props: { url: { type: String, default: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8' } }, setup (props) { const QMediaPlayer = ref(null) let player = null onMounted(() => { if (Hls.isSupported()) { player = new Hls() player.loadSource(props.url) console.log('Loaded') // console.log(QMediaPlayer.value.$media) player.attachMedia(QMediaPlayer.value.$media) player.on(Hls.Events.MANIFEST_PARSED, () => { QMediaPlayer.value.play() }) } }) onBeforeUnmount(() => { if (player) { player.destroy() } }) return { player, QMediaPlayer } } }) </script>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm having trouble integrating Hls.js with QMediaPlayer. I'm using Quasar v2 with webpack.
When I do it with HTML video tag, it works:
But when I try with QMediaPlayer it doesn't work
The text was updated successfully, but these errors were encountered: