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

OPENEUROPA-1316: Media entity video basic handling #3

Merged
merged 7 commits into from
Nov 5, 2018

Conversation

nagyad
Copy link
Member

@nagyad nagyad commented Oct 31, 2018

Implement remote video source type with 3 providers.

@nagyad nagyad changed the title OPENEUROPA-1304: Media entity video basic handling OPENEUROPA-1316: Media entity video basic handling Oct 31, 2018
$this->drupalGet("media/add/remote_video");
$page->fillField("oe_media_oembed_video[0][value]", $video_url);
$page->pressButton('Save');
$this->createScreenshot($this->root . '/screenshot.jpg');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove debug statement.

*
* @var array
*/
public $videos = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see if we can instead use a @dataProvider method instead of a public variable with a list of video URLs.

See for example in core: UnroutedUrlTest:testIsExternal() and its provider method: providerFromUri

oe_media.module Outdated

/**
* @file
* Media module.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the Media module.

oe_media.module Outdated
*/

/**
* Alters the information provided in \Drupal\media\Annotation\MediaSource.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implements hook_media_source_info_alter().

/**
* @file
* Media module.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing strict type declaration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

oe_media.module Outdated
* @param array $sources
* The array of media source plugin definitions, keyed by plugin ID.
*/
function oe_media_media_source_info_alter(array &$sources) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing return type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

oe_media.module Outdated
/**
* Implements hook_media_source_info_alter().
*
* Alters the information provided in \Drupal\media\Annotation\MediaSource.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The information being altered is not provided inside the annotation. Only the documentation is in the that docblock. Please correct the documentation to:

Adding Daily Motion to the list of providers exposed by the OEmbed video source plugin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

upchuk
upchuk previously approved these changes Nov 5, 2018
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

Successfully merging this pull request may close these issues.

4 participants