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

Feature Proposal: loadMedia, getMedia #4342

Closed
gkatsev opened this issue May 10, 2017 · 3 comments · Fixed by #5652
Closed

Feature Proposal: loadMedia, getMedia #4342

gkatsev opened this issue May 10, 2017 · 3 comments · Fixed by #5652

Comments

@gkatsev
Copy link
Member

gkatsev commented May 10, 2017

More and more, when videojs is used, more than just a source is needed. There's the poster image, there's captions, and there's also various properties like muted, and loop, and autoplay.
Loading all these things are often implemented in places like videojs-playlist and Google has a new Media Session API that expects similar items.
This method would accept an object that has all these properties and when called, it'll make sure to unset all the old things. That means that all old posters, all old text tracks would be removed and unset and then the new things would be set. This would be different than something like src which wouldn't necessarily remove old textTracks or posters.

@imbcmdth I wonder if we'd want to revert the change to the addRemoteTextTrack flag for remove on src change in this case? Or maybe, just keep the default the same?

Also, we're thinking of having it be native in 6.x and be a simpler plugin 5.x that doesn't have as deep of integration with the rest of the player (like removing old text tracks).

@heff
Copy link
Member

heff commented May 10, 2017

This sounds cool to me. A single API for loading a "video" would be pretty convenient. Wrapping in controls like muted and loop feels a little odd to me, but I haven't read the spec and what they're trying to accomplish.

You might consider how this would overlap with the video object schema. If only for terminology of the properties.
https://developers.google.com/webmasters/videosearch/schema

@gkatsev
Copy link
Member Author

gkatsev commented May 10, 2017

Yeah, not sure whether we want to have those other properties or not yet, just threw it out there.
That VideoObject schema sounds interesting.

@stale
Copy link

stale bot commented Jul 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the outdated Things closed automatically by stalebot label Jul 3, 2018
@gkatsev gkatsev added enhancement confirmed and removed outdated Things closed automatically by stalebot labels Jul 3, 2018
gkatsev pushed a commit that referenced this issue Jan 3, 2019
`loadMedia` accepts a MediaObject and an optional ready handler. It'll reset the player -- including text tracks, poster, and source -- before setting the new provided media, which include sources, poster, text tracks.
`getMedia` will return either the provided media object or the currently set values for sources, text tracks, and poster.

Fixes #4342
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants