Revision 70a4c29b
Added by Assos Assos over 9 years ago
drupal7/sites/all/modules/media_youtube/README.txt | ||
---|---|---|
1 |
# Media: YouTube |
|
1 |
CONTENTS OF THIS FILE |
|
2 |
--------------------- |
|
2 | 3 |
|
3 |
Media: YouTube integrates with the Media module to make YouTube videos |
|
4 |
available as file entities. Users can insert YouTube videos with file fields |
|
5 |
or directly into into WYSIWYG text areas with the Media module insert button. |
|
4 |
* Introduction |
|
5 |
* Requirements |
|
6 |
* Installation |
|
7 |
* Usage |
|
6 | 8 |
|
9 |
INTRODUCTION |
|
10 |
------------ |
|
7 | 11 |
|
8 |
## File fields
|
|
12 |
Current Maintainers:
|
|
9 | 13 |
|
10 |
- Add a new "file" type field to your content type or entity. Choose the widget |
|
11 |
type "Multimedia browser". You can also select an existing file field. |
|
12 |
- While setting up the field (or after selecting "edit" on an existing field) |
|
13 |
enable: |
|
14 |
- Enabled browser plugins: "Web" |
|
15 |
- Allowed remote media types: "Video" |
|
16 |
- Allowed URI schemes: "youtube:// (YouTube videos)" |
|
14 |
* Devin Carlson <http://drupal.org/user/290182> |
|
17 | 15 |
|
18 |
- On "Manage display" for the file field's content or entity type, choose |
|
19 |
"Rendered file" and a view mode. |
|
20 |
- Set up YouTube video formatter options for each view mode in Structure -> |
|
21 |
File types -> Manage file display. This is where you can choose size, autoplay, |
|
22 |
appearance, and special JS API integration options. |
|
23 |
- When using the file field while creating or editing content, paste a YouTube |
|
24 |
video url into the Web tab. |
|
16 |
Media: YouTube adds YouTube as a supported media provider. |
|
25 | 17 |
|
26 |
ProTip: You can use multiple providers (e.g., Media: YouTube and Media: Vimeo)
|
|
27 |
on the same file field.
|
|
18 |
REQUIREMENTS
|
|
19 |
------------
|
|
28 | 20 |
|
21 |
Media: YouTube has one dependency. |
|
29 | 22 |
|
30 |
## WYSIWYG inserts |
|
23 |
Contributed modules |
|
24 |
* Media Internet - A submodule of the Media module. |
|
31 | 25 |
|
32 |
- Enable the Media module "Media insert" button on your WYSIWYG profile. |
|
33 |
- Enable "Convert Media tags to markup" filter in the appropriate text formats. |
|
34 |
- Configure any desired settings in Configuration -> Media -> "Media browser |
|
35 |
settings" |
|
36 |
- Set up YouTube video formatter options in Structure -> File types -> Manage |
|
37 |
file display. **Note:** for any view mode that will be used in a WYSIWYG, |
|
38 |
enable both the YouTube video and preview image formatter. Arrange the Video |
|
39 |
formatter on top. This allows the video to be used when the content is viewed, |
|
40 |
and the preview when the content is being edited. |
|
26 |
INSTALLATION |
|
27 |
------------ |
|
41 | 28 |
|
42 |
- When editing a text area with your WYSIWYG, click the "Media insert" button,
|
|
43 |
and paste a YouTube video url into the Web tab of the media browser.
|
|
29 |
Media: YouTube can be installed via the standard Drupal installation process
|
|
30 |
(http://drupal.org/node/895232).
|
|
44 | 31 |
|
32 |
USAGE |
|
33 |
----- |
|
45 | 34 |
|
46 |
## Upgrading from 7.x-1.x or 7.x-2.0-alpha-2 to 7.x-2.0 |
|
35 |
Media: YouTube integrates the YouTube video-sharing service with the Media |
|
36 |
module to allow users to add and manage YouTube videos as they would any other |
|
37 |
piece of media. |
|
47 | 38 |
|
48 |
There are some important changes between the older recommended versions of |
|
49 |
Media: YouTube and the new stable release that may require manual updating. |
|
50 |
|
|
51 |
- 2.0 uses the YouTube iframe embed with the currently supported player |
|
52 |
parameters. If you were relying on parameters that no longer work with |
|
53 |
the iframe player, you may see some minor differences in player appearance. |
|
54 |
Please review your formatter settings after you update. |
|
55 |
|
|
56 |
- **The markup for the player embed has changed.** The 2.0 and 2.x-dev versions |
|
57 |
use simplified and updated markup that integrates better with responsive |
|
58 |
video techniques. There is a tpl provided at /includes/themes/media-youtube- |
|
59 |
video.legacy-example.tpl.php that duplicates the old markup. To use it, copy |
|
60 |
it to your theme folder and rename it to media-youtube-video.tpl.php. It is |
|
61 |
recommended that you revise any css or javascript that requires the old |
|
62 |
markup and then delete the legacy markup tpl file. |
|
63 |
|
|
64 |
|
|
65 |
## Further Reading |
|
66 |
|
|
67 |
- Media 2.x Overview, including file entities and view modes: |
|
68 |
http://drupal.stackexchange.com/questions/40229/how-to-set-media-styles-in-media-7-1-2-media-7-2-x/40685#40685 |
|
69 |
- Media 2.x Walkthrough: http://drupal.org/node/1699054 |
|
70 |
- YouTube player parameters and explanation. Media: YouTube uses only iframe |
|
71 |
player parameters: |
|
72 |
https://developers.google.com/youtube/player_parameters#Parameters |
|
73 |
- YouTube JS API example: |
|
74 |
http://stackoverflow.com/questions/7443578/youtube-iframe-api-how-do-i-control-a-iframe-player-thats-already-in-the-html/7513356#7513356 |
|
39 |
Internet media can be added on the Web tab of the Add file page (file/add/web). |
|
40 |
With Media: YouTube enabled, users can add a YouTube video by entering its URL |
|
41 |
or embed code. |
Also available in: Unified diff
Weekly update of contrib modules