quasar-ui-qmediaplayer
quasar-ui-qmediaplayer copied to clipboard
Is it possible to load Blobs other than Filelist?
Is your feature request related to a problem? Please describe. I'm using webtorrent to share and download files for an application I am making and I would like to display them using qmediaplayer. However, qmediaplayer only accepts a filelist which can only be retrieved from an input. And we can't create our own filelists for security reasons. Which makes sense.
Also, it can be frustrating getting a filelist from the input. For instance, q-filepicker returns a file. Which isn't compatible.
Describe the solution you'd like I would like to see regular file objects, and blobs supported so that we may more easily load content into the qmediaplayer
Describe alternatives you've considered I've actually found a workaround that works with qmediaplayer. However, webtorrent does have the ability to drop files into a dom object. The downside is you don't have control of the media player. This is the work around that I'm using at the moment.
@missionz3r0 I leave on vacation soon, so don't have time to look into it However, here is the information I think you need: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject You will need to get the $media object from QMediaPlayer (use a ref: this.medaplayer.$media) Then you have access to the srcObject item. Let me know if that works out for you. I think we should open that up and give an example in docs.
It would be great to have an example in the docs.