Warning: Constant MULTISITE already defined in /home/pbmalartu/public_html/wp-config.php on line 107

Warning: Constant SUBDOMAIN_INSTALL already defined in /home/pbmalartu/public_html/wp-config.php on line 108

Warning: Constant DOMAIN_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 109

Warning: Constant PATH_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 110

Warning: Constant SITE_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 111

Warning: Constant BLOG_ID_CURRENT_SITE already defined in /home/pbmalartu/public_html/wp-config.php on line 112

Warning: The magic method Pressbooks\Book::__wakeup() must have public visibility in /home/pbmalartu/public_html/wp-content/plugins/pressbooks/inc/class-book.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/pbmalartu/public_html/wp-config.php:107) in /home/pbmalartu/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758
{"id":91,"date":"2018-09-20T20:36:03","date_gmt":"2018-09-20T20:36:03","guid":{"rendered":"https:\/\/pb.malartu.org\/opentextauthorguide\/chapter\/embedding-youtube-videos\/"},"modified":"2018-09-20T20:36:03","modified_gmt":"2018-09-20T20:36:03","slug":"embedding-youtube-videos","status":"publish","type":"chapter","link":"https:\/\/pb.malartu.org\/opentextauthorguide\/chapter\/embedding-youtube-videos\/","title":{"rendered":"Embedding YouTube Videos"},"content":{"raw":"\nTypically, the best way to add videos to a textbook is to host them on YouTube, and then embed them into the book afterwards. This section assumes that the videos to be embedded are already hosted on YouTube.\n\nThere are two main ways to embed a YouTube video into a Pressbooks chapter:\n

Automatic Embed<\/h2>\nThe easiest way to embed a video is to simply copy the video's URL and paste it into either the Visual or Text view in the Pressbooks editor. Thus, the following code:\n
Opening paragraph here...<\/code>\nhttps:\/\/www.youtube.com\/watch?v=5_t6lmKhBOI<\/code>\nClosing paragraph here...<\/code><\/div>\nWould yield the following:\n
\nOpening paragraph here...\nhttps:\/\/www.youtube.com\/watch?v=5_t6lmKhBOI\nClosing paragraph here...\n<\/div>\n

Manual Embed<\/h2>\nAnother way to embed a video is to manually insert the embed code from the YouTube video. To do this, go to the YouTube video and right-click on the video, then select the \"Copy embed code\" option, and press Ctrl-C (PC) or Command-C (Mac) to copy the embed code. You can then paste the embed code into the Text view of the Pressbooks editor.\n\n[caption id=\"attachment_623\" align=\"aligncenter\" width=\"300\"]\"Right-click<\/a> Right-click the image, then select \"Copy embed code.\"[\/caption]\n\n[caption id=\"attachment_624\" align=\"aligncenter\" width=\"300\"]\"Once<\/a> Once the embed code is highlighted, use Ctrl-C (PC) or Command-C (Mac) to copy the embed code.[\/caption]\n\nThe embed code likely makes the video display too large - the ideal size is 500 by 281 pixels. Go into the Text View to edit these dimensions:\n\nThe default embed code ought to look like this:\n\n
\n<iframe width=\"854\" height=\"480\" src=\"https:\/\/www.youtube.com\/embed\/oXOSDwVX0Dw\" allowfullscreen><\/code>\n<\/div>\n\nChange that to:\n\n
\n<iframe width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/oXOSDwVX0Dw\" allowfullscreen><\/code>\n<\/div>\n\nThus, the following code:\n\n
\nOpening paragraph here...<\/code>\n<iframe width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/oXOSDwVX0Dw\" allowfullscreen><\/code>\nClosing paragraph here...<\/code>\n<\/div>\n\nWould yield the following:\n
\nOpening paragraph here...\n