Skip to content
New issue

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

Is it possible to load Blobs other than Filelist? #128

Open
missionz3r0 opened this issue Jun 17, 2020 · 2 comments
Open

Is it possible to load Blobs other than Filelist? #128

missionz3r0 opened this issue Jun 17, 2020 · 2 comments
Labels
enhancement New feature or request Qv1 Qv2

Comments

@missionz3r0
Copy link

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.

@hawkeye64
Copy link
Member

@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.

@nucle nucle added Qv1 Qv2 enhancement New feature or request labels Oct 19, 2022
@i-mage
Copy link

i-mage commented Jan 19, 2023

It would be great to have an example in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Qv1 Qv2
Projects
None yet
Development

No branches or pull requests

4 participants