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

[FR] GraphQL Support #33

Open
denisyilmaz opened this issue May 19, 2020 · 9 comments
Open

[FR] GraphQL Support #33

denisyilmaz opened this issue May 19, 2020 · 9 comments

Comments

@denisyilmaz
Copy link

I can't find anything in the documentation:
Can this plugin be used to include transcoded video url fields via GraphQL directly for an asset?

@denisyilmaz
Copy link
Author

For example something like url @transcode(…) would be great.

{
  asset(kind: "video") {
    title
    url @transcoder(width:768 ,videoBitRate:"500k")
  }
}

@denisyilmaz
Copy link
Author

@khalwat I guess this has no priority?

@khalwat
Copy link
Contributor

khalwat commented Jul 1, 2020

It isn't something I'd planned to implement, but if enough people are interested, sure.

Understand if the video is in the middle of transcoding, you'll get nothing back. But I suppose that's not much different than the current Twig API.

@denisyilmaz
Copy link
Author

denisyilmaz commented Jul 2, 2020

alright, thanks for that information. then I hope there are people out there requesting this feature as well.

For anyone searching for a temporary solution, I used the Preparse Field Plugin that I added to the asset entry type to trigger the video transcoding. Here is the twig code I used to create a mp4 version of a video:

{% set myAsset = craft.assets().uid(element.uid).one() %}
{% if myAsset.kind == 'video' %}
    {% set mp4 = craft.transcoder.getVideoUrl(myAsset, {
        "width": "",
        "height": "",
    }) %}
    {{ { 'mp4': mp4 } | json_encode }}
{% endif %}

@khalwat are there events I could listen to inside a custom module to trigger a resave of that field when the transcoding is finished? Could not find anything in the documentation

@gaelpleeroy
Copy link

Hello @khalwat any news on that? We got some self-hosted video assets and it seems this is the only plugin available.
Also is there a roadmap?

@khalwat
Copy link
Contributor

khalwat commented Nov 23, 2021

@gaelpleeroy I have not done any work on implementing a GraphQL API for the Transcoder plugin. You're the second person who has requested such a feature, though, which adds to its likelihood of being implemented

@denisyilmaz
Copy link
Author

hi @khalwat , any plans to get this feature implemented in the near future?

@khalwat
Copy link
Contributor

khalwat commented May 24, 2022

It's on the list, but not immediately unfortunately.

@benfeather
Copy link

I'd really like to see GraphQL support as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants