Comments

slashrsm created an issue. See original summary.

sam152’s picture

I'll have a look into this. The biggest issue will be coming up with an automatic title from the available information. We don't have access to a video title based on the interface. The two bits of info we have that might be useful are the ID and the name of the provider. I'm thinking {{ provider }}: {{ id }} might work. This would produce titles like "YouTube: XgYu7-DQjDQ".

slashrsm’s picture

Could we get title from the API (if available) and fall back to {{ provider }}: {{ id }} if it is not?

sam152’s picture

Assigned: Unassigned » sam152

We would want to do it generically. Perhaps introduce a NamedVideoProviderInterface so that each provider has the chance to provide a name, then fall back to provider: id. I'll have a look at it, this week.

sam152’s picture

Status: Active » Needs review
StatusFileSize
new3.22 KB

Part one, a default name in the media plugin. I know vimeo has a public oembed endpoint, but I'm not sure if the same is true for youtube. In any case, this makes it a bit nicer then the UUID.

sam152’s picture

  • Sam152 committed 82fa4a9 on 8.x-1.x
    Issue #2762219 by Sam152, slashrsm: Provide default media name for Video...
sam152’s picture

StatusFileSize
new3.31 KB

An API based option for the Vimeo provider without breaking BC.

benjy’s picture

+++ b/src/NamedVideoPluginInterface.php
@@ -0,0 +1,18 @@
+interface NamedVideoPluginInterface {

If this extends your existing interface then you'll only need to implement this one interface on the base class.

sam152’s picture

StatusFileSize
new4.07 KB

Fixed vimeo test.

sam152’s picture

Cleaned up some of the code and moved the { provider }: { id } logic into the plugin base. I believe this retains BC but I'm questioning if we actually have to. In every plugin I've encountered, it extends our base. Perhaps a BC break and a change record is enough?

sam152’s picture

StatusFileSize
new2.7 KB
sam152’s picture

StatusFileSize
new5.38 KB

Full patch.

sam152’s picture

Here is the BC breaking version.

sam152’s picture

Fixed broken vimeo handler.

The last submitted patch, 12: 2762219-11.patch, failed testing.

The last submitted patch, 12: 2762219-11.patch, failed testing.

The last submitted patch, 12: 2762219-11.patch, failed testing.

The last submitted patch, 12: 2762219-11.patch, failed testing.

The last submitted patch, 13: 2762219-11.patch, failed testing.

The last submitted patch, 14: 2762219-14-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 14: 2762219-14-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 13: 2762219-11.patch, failed testing.

The last submitted patch, 13: 2762219-11.patch, failed testing.

The last submitted patch, 13: 2762219-11.patch, failed testing.

The last submitted patch, 14: 2762219-14-BC-BREAK-name-on-interface.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 15: 2762219-15-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 15: 2762219-15-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 14: 2762219-14-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 15: 2762219-15-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 15: 2762219-15-BC-BREAK-name-on-interface.patch, failed testing.

sam152’s picture

Status: Needs work » Needs review
StatusFileSize
new5.47 KB

And another one..

Status: Needs review » Needs work

The last submitted patch, 32: 2762219-32-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 32: 2762219-32-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 32: 2762219-32-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 32: 2762219-32-BC-BREAK-name-on-interface.patch, failed testing.

sam152’s picture

Status: Needs work » Needs review
StatusFileSize
new6.09 KB

Should pass with a few alterations.

Status: Needs review » Needs work

The last submitted patch, 37: 2762219-37-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 37: 2762219-37-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 37: 2762219-37-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 37: 2762219-37-BC-BREAK-name-on-interface.patch, failed testing.

sam152’s picture

Status: Needs work » Needs review
StatusFileSize
new0 bytes

Status: Needs review » Needs work

The last submitted patch, 42: 2762219-39-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 42: 2762219-39-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 42: 2762219-39-BC-BREAK-name-on-interface.patch, failed testing.

The last submitted patch, 42: 2762219-39-BC-BREAK-name-on-interface.patch, failed testing.

sam152’s picture

Status: Needs work » Needs review
StatusFileSize
new7.13 KB
sam152’s picture

Status: Needs review » Fixed

  • Sam152 committed dbb3b92 on 8.x-1.x
    Issue #2762219 by Sam152, slashrsm, benjy: Provide default media name...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.