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

Question: Trailer URL #31

Open
mpurcella opened this issue Mar 7, 2023 · 2 comments
Open

Question: Trailer URL #31

mpurcella opened this issue Mar 7, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mpurcella
Copy link

mpurcella commented Mar 7, 2023

Full disclosure first, I'm still somewhat new at web development, so I may be approaching this issue incorrectly.

I would love to be able to play/embed the trailers in my own app, but it seems that the ways I've tried haven't worked (I keep getting a CORB error). It looks like the Trailer URL provided is the URL to watch the trailer, rather than a URL to embed it. Would it be possible to change that trailer_url field to just the ID of the video – that way we would be able to create our own embed link and just use that ID?

@mpurcella mpurcella added the enhancement New feature or request label Mar 7, 2023
@AugustoMarcelo
Copy link
Owner

Hey, man. Can you share how you are doing this? I think using the ID is not the best way to handle it because it does not indicate from where that ID comes (youtube, vimeo)

@mpurcella
Copy link
Author

mpurcella commented Apr 14, 2023

I don't have a working example of trying to embed the trailers as I opted to just create an external link for them. I was playing around with The Movie Database not too long ago, and while they don't have the best way of doing it (in my opinion), it works. Maybe some sort of structure like this:

This is part of the returned data from an API request to TMDB:
Screenshot 2023-04-14 at 11 32 09 AM

So maybe something like:

trailers: [
    0: {
        id: <id>
        key: <key>
        name: <name>
        site: <site>
    }
    1: {
        ...
    }
]

With Youtube videos it'd be easy, but I'm not sure how the Brightcove videos would work. Just a thought.

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

No branches or pull requests

2 participants