1 2 3<!DOCTYPE html> 4<html lang="en"> 5<head> 6 <meta charset="UTF-8"> 7 <link type="text/css" href="https://bento.pbs.org/prod/3.149.0/staticfiles/dist/frontend/lib/bootstrap.css" rel="stylesheet" /> 8 <link type="text/css" href="https://bento.pbs.org/prod/3.149.0/staticfiles/dist/frontend/lib/bootstrap-responsive.css" rel="stylesheet" /> 9 <link type="text/css" href="https://bento.pbs.org/prod/3.149.0/staticfiles/dist/frontend/css/frontend_style.css" rel="stylesheet" /> 10 <link type="text/css" href="https://bento.pbs.org/prod/3.149.0/staticfiles/dist/frontend/js/frontend_js.css" rel="stylesheet" /> 11 12 13 <title>Watch New Episodes</title><meta name="description" content="Reading Rainbow, co-created by WNED-TV & GPN to foster & inspire the love of reading, quickly became a public TV blockbuster, classroom staple & cultural icon."/><!-- Twitter Card data --><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Watch New Episodes"><meta name="twitter:description" 14 content="Reading Rainbow, co-created by WNED-TV & GPN to foster & inspire the love of reading, quickly became a public TV blockbuster, classroom staple & cultural icon."/><!-- Open Graph data --><meta property="og:title" content="Watch New Episodes"/><meta property="og:type" content="website"/><meta property="og:url" content="https://www.readingrainbow.org/new-episodes/"/><meta property="og:description" 15 content="Reading Rainbow, co-created by WNED-TV & GPN to foster & inspire the love of reading, quickly became a public TV blockbuster, classroom staple & cultural icon."/><meta property="og:site_name" content="Reading Rainbow"/><meta name="robots" content="index, follow"/><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"/><link rel="apple-touch-icon" sizes="180x180" href="https://image.pbs.org/bento3-prod/readingrainbow-bento-live-pbs/Graphics/Favicon/55f195a9c6_favicon.ico?resize=180x180"><link rel="icon" type="image/png" href="https://image.pbs.org/bento3-prod/readingrainbow-bento-live-pbs/Graphics/Favicon/55f195a9c6_favicon.ico?resize=32x32" sizes="32x32"><link rel="icon" type="image/png" href="https://image.pbs.org/bento3-prod/readingrainbow-bento-live-pbs/Graphics/Favicon/55f195a9c6_favicon.ico?resize=16x16" sizes="16x16"><meta name="theme-color" content="#d42029"><!-- Google Ad Manager -->
15<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
15<script> 16 window.googletag = window.googletag || {cmd: []}; 17</script>
17<!-- End Google Ad Manager -->
17<script type="application/ld+json"> 18 19{ 20 "@context": "http://schema.org", 21 "@type": "WebSite", 22 "url": "https://www.readingrainbow.org/new-episodes/", 23 "name": "Watch New Episodes", 24 "description": "Reading Rainbow, co-created by WNED-TV & GPN to foster & inspire the love of reading, quickly became a public TV blockbuster, classroom staple & cultural icon.", 25 "publisher": { 26 "@type": "Organization", 27 "name": "Reading Rainbow", 28 "logo": {} 29 }, 30 "keywords": "" 31} 32 33</script>
33<!-- Google Tag Manager -->
33<script>
vendor: 321 bytes, lines 33-37
33(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 34new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 35j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 36'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 37})(window,document,'script','dataLayer','
37GTM-MJTWLHL
vendor: 3 bytes, line 37
37');
37</script>
37<!-- End Google Tag Manager --> 38 39</head> 40 41<body id="page-204964" class="studio bento3"> 42<style type="text/css" title="Bento Theme"> 43 a { 44 color: #d42029; 45} 46 47a:hover, 48a:active, 49a:visited { 50 color: #e3912d; 51} 52 53/* expose accent classes */ 54 55.colorPalette-main { 56 color: #d42029 !important; 57} 58 59.colorPalette-accent1 { 60 color: #e3912d !important; 61} 62 63.colorPalette-accent2 { 64 color: #f1e8d3 !important; 65} 66 67.colorPalette-accent3 { 68 color: #fef8ea !important; 69} 70 71.colorPalette-accent4 { 72 color: #fffcf5 !important; 73} 74 75 76 </style> 77 78<!-- Google Tag Manager (noscript) -->
vendor: 61 bytes, line 78
78<noscript><iframe src="//www.googletagmanager.com/ns.html?id=
78GTM-MJTWLHL
vendor: 82 bytes, lines 78-79
78" 79height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
79<!-- End Google Tag Manager (noscript) --><header><a href="#main-content" class="skipnav" aria-label="skip to main link"> 80 Skip to main content 81 </a><div class="row-fluid"><style type="text/css"> 82 83 84#layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.layout-padding { 85 padding: px 0px px 0px; 86} 87 88@media (min-width: 1024px) { 89 #layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.layout-padding { 90 padding: px px px px; 91 } 92} 93 94#layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.has-background-image { 95 background-image: url(""); 96} 97 98 99@media (min-width: 1200px) {#layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.has-background-image {background-image: url("1920w");}}@media (min-width: 992px) and (max-width: 1199px) {#layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.has-background-image {background-image: url("1199w");}}@media (min-width: 768px) and (max-width: 991px) {#layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.has-background-image {background-image: url("991w");}}@media (min-width: 576px) and (max-width: 767px) {#layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.has-background-image {background-image: url("767w");}}@media (max-width: 575px) {#layout-321573f9-9792-4ba1-b240-9fab24d36c6c.container.has-background-image {background-image: url("575w");}} 100 101 </style><div id=""><div id="layout-321573f9-9792-4ba1-b240-9fab24d36c6c" 102 class="container 103 104 105 106 107 has-background-color 108 " 109 style=" background-color: #c71f4b;"><div id="column-14b743ef-7053-4196-b0e2-98a5e38e4a2c" 110 class="span12 column-12 111 "><div id="component-11b56510-9ab6-11ee-a55d-dd5d624fb99a" class="component">
111<script> 112 (function(d){ 113 var s = d.createElement("script"); 114 s.setAttribute("data-position", 5); // Set position to lower right corner 115 /* uncomment the following line to override default size (values: small, large)*/ 116 s.setAttribute("data-size", "small"); 117 /* uncomment the following line to override default language (e.g., fr, de, es, he, nl, etc.)*/ 118 /* s.setAttribute("data-language", "null");*/ 119 /* uncomment the following line to override color set via widget (e.g., #053f67)*/ 120 /* s.setAttribute("data-color", "#2d68ff");*/ 121 /* uncomment the following line to override type set via widget (1=person, 2=chair, 3=eye, 4=text)*/ 122 /* s.setAttribute("data-type", "1");*/ 123 /* s.setAttribute("data-statement_text:", "Our Accessibility Statement");*/ 124 /* s.setAttribute("data-statement_url", "http://www.example.com/accessibility";*/ 125 /* uncomment the following line to override support on mobile devices*/ 126 /* s.setAttribute("data-mobile", true);*/ 127 /* uncomment the following line to set custom trigger action for accessibility menu*/ 128 /* s.setAttribute("data-trigger", "triggerId")*/ 129 s.setAttribute("data-account", "oTsuXlBFR2"); 130 s.setAttribute("src", "https://cdn.userway.org/widget.js"); 131 (d.body || d.head).appendChild(s);})(document) 132 </script>
132</div><div id="component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0" class="component"><style type="text/css"> 133 134#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu__trigger * { 135 fill: #d42029 !important; 136} 137 138#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu__trigger:hover *, 139#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu__trigger:focus * { 140 fill: #e3912d !important; 141} 142 143#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu__trigger { 144 border-color: #d42029 !important; 145} 146 147#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu__trigger:hover, 148#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu__trigger:focus { 149 border-color: #e3912d !important; 150} 151 152#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav { 153 border-bottom: 4px solid #d42029 !important; 154} 155 156#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu__li:hover > .menu-item, 157#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu__li:focus > .menu-item, 158#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu__li:focus-within > .menu-item { 159 background-color: #fffcf5; 160} 161 162#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .dropdown-menu, 163#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .submenu, 164#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu__li.submenu-is-open { 165 background-color: #fffcf5; 166} 167 168#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu-promo, 169#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .links, 170#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu-promo-wrapper, 171#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .links-wrapper { 172 background: transparent; 173} 174 175#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .station-header-search:hover, 176#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .station-header-search:focus, 177#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .station-header-search:focus-within { 178 background-color: #fffcf5; 179} 180 181#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu__li > a:focus, 182#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .submenu__li > a:focus { 183 z-index: 1; 184 position: relative; 185} 186 187 188#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .menu__li > a:focus, 189#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .submenu__li > a:focus, 190#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .station-header-search:focus, 191#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .station-header #station-header-search-input:focus, 192#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .station-header a:focus,
193#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .station-header button:focus, 194#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .station-header input:focus, 195#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .station-header .menu__li:focus, 196#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .station-header .station-header-login:focus, 197#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .station-header .station-header-logo:focus { 198 outline: 2px solid #ffffff; 199 outline-offset: 2px; 200 box-shadow: 0 0 0 4px #d42029; 201} 202 203#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav + .menu--navbar-nav__spacer { 204 background-color: #fffcf5; 205} 206 207#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .submenu__li .menu-item{ 208 color: #d42029; 209} 210 211#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .submenu__li .menu-item:hover, 212#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .submenu__li .menu-item:focus, 213#component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0 .menu--navbar-nav .submenu__li .menu-item:visited{ 214 color: #e3912d; 215} 216 217 218 219@media screen and (min-width: 1025px) { 220 .menu__trigger { 221 display: none; 222 } 223} 224 225 </style><nav id="48d46cf0-a3b2-11ec-9968-03437a2eb5a0" 226 class="station-header menu--default menu--navbar-nav container 227 navbar-fixed-top 228 " 229><button class="menu__trigger"><svg width="150" height="110" viewBox="0 0 150 110" xmlns="http://www.w3.org/2000/svg" class="pbs-hamburger" aria-labelledby="pbs-hamburger__title-48d46cf0-a3b2-11ec-9968-03437a2eb5a0"><title id="pbs-hamburger__title-48d46cf0-a3b2-11ec-9968-03437a2eb5a0"> 230 Menu 231 </title><path class="path1" d="M0,2c0-1.1,0.9-2,2-2h146c1.1,0,2,0.9,2,2v16c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V2L0,2z"/><path class="path2" d="M0,47c0-1.1,0.9-2,2-2h146c1.1,0,2,0.9,2,2v16c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V47L0,47z"/><path class="path3" d="M0,47c0-1.1,0.9-2,2-2h146c1.1,0,2,0.9,2,2v16c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V47L0,47z"/><path class="path4" d="M0,92c0-1.1,0.9-2,2-2h146c1.1,0,2,0.9,2,2v16c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V92L0,92z"/></svg></button><div class="menu-container clearfix"><ul class="navbar-nav menu__ul 232 align-left"><li id="31a29d31-ee2c-42f4-b5d7-a60693452ae0" class="menu__li "><a aria-label="Home link" 233 234 href="/" 235 236 237 238 class="menu-item 239 240 " 241 > 242 Home 243 244 </a></li><li id="bad4efa6-6af9-4df4-9536-40fe985d17e1" class="menu__li "><a aria-label="About link" 245 246 href="/About/" 247 248 249 250 class="menu-item 251 252 " 253 > 254 About 255 256 </a></li><li id="b59d4431-46d7-43b8-bd92-cd934abad6ea" class="menu__li "><a aria-label="Watch New Episodes link" 257 258 href="/new-episodes/" 259 260 261 262 class="menu-item 263 active 264 " 265 > 266 Watch New Episodes 267 268 </a></li><li id="b6a1061a-6300-442b-b0c3-ccd15bbcecbe" class="menu__li "><a aria-label="Book Drive link" 269 270 href="/book-drive/" 271 272 273 274 class="menu-item 275 276 " 277 > 278 Book Drive 279 280 </a></li><li id="f5d807e3-a959-4ce4-a2dc-4a7f2388a76f" class="menu__li "><a aria-label="Watch Stories link" 281 282 href="/watch/" 283 284 285 286 class="menu-item 287 288 289 has-children 290 291 292 293 294 295 296 297 298 299 300 301 302 303 " 304 > 305 Watch Stories 306 307 <i class="menu-item-caret fas fa-angle-down" aria-hidden="true"></i></a><button class="submenu__trigger" aria-label="Open Submenu"><i class="menu-item-caret fas fa-caret-down" aria-hidden="true"></i></button><ul class="submenu"><li id="61006746-959b-470e-a89c-fbaabddbc676" class="submenu__li"><a aria-label="Stories About Animals link" 308 309 href="/watch/stories-about-animals/" 310 311 312 313 class="menu-item 314 315 " 316 > 317 Stories About Animals 318 319 </a></li><li id="86de4bbc-e20e-47e1-b31a-45b78b5f7b03" class="submenu__li"><a aria-label="Stories About Families link" 320 321 href="/watch/stories-about-families/" 322 323 324 325 class="menu-item 326 327 " 328 > 329 Stories About Families 330 331 </a></li><li id="ceb221ff-da1b-4a5f-8664-3a3081dcfbd5" class="submenu__li"><a aria-label="Stories About World Cultures link" 332 333 href="/watch/stories-about-world-cultures/" 334 335 336 337 class="menu-item 338 339 " 340 > 341 Stories About World Cultures 342 343 </a></li><li id="242d4cca-3c5c-4828-9488-e1e788ed857d" class="submenu__li"><a aria-label="Stories that Spark Creativity link" 344 345 href="/watch/stories-that-spark-creativity/" 346 347 348 349 class="menu-item 350 351 " 352 > 353 Stories that Spark Creativity 354 355 </a></li><li id="7a18d920-f0c3-4b50-b837-70fc1f5088ff" class="submenu__li"><a aria-label="Stories with a Message link" 356 357 href="/watch/stories-with-a-message/" 358 359 360 361 class="menu-item 362 363 " 364 > 365 Stories with a Message 366 367 </a></li><li id="d952ecfc-65d4-47f7-a047-ad5505384c28" class="submenu__li"><a aria-label="Stories with STEM Connections link" 368 369 href="/watch/stories-with-stem-connections/" 370 371 372 373 class="menu-item 374 375 " 376 > 377 Stories with STEM Connections 378 379 </a></li></ul></li><li id="757c8e80-c369-4155-9959-592103828e78" class="menu__li "><a aria-label="Resources link" 380 381 href="/resources/" 382 383 384 385 class="menu-item 386 387 " 388 > 389 Resources 390 391 </a></li><li id="22ef53da-8e4c-451e-8626-0202b6e0a49f" class="menu__li "><a aria-label="Shop link" 392 393 href="/shop/" 394 395 396 397 class="menu-item 398 399 " 400 > 401 Shop 402 403 </a></li><li id="440e985f-b0e5-41b5-b1e4-e4aaad7455bc" class="menu__li highlight"><a aria-label="Support Reading Rainbow link" 404 405 href="https://www.wnedmembers.org/alleg/WebModule/Donate.aspx?P=READRAIN&PAGETYPE=PLG&CHECK=j6mzWGcR5EOlVMCrNZZ5z23L5BYddGq6PVAl6UEf65g%3d" 406 407 target="_blank" rel="noopener noreferrer" 408 409 410 411 class="menu-item 412 413 " 414 > 415 Support Reading Rainbow 416 417 </a></li></ul></div></nav><div class="menu--navbar-nav__spacer"></div><div class="header-fixed-spacer"></div></div><div id="component-e3a52ff0-aad1-11e7-a670-9b81544db018" class="component"><meta name="keywords" content="Reading,Rainbow,Education,Family,Entertainment,Children,Book,Books,Reading Rainbow"/></div></div></div></div></div></header> 418 419
420 <main id="main-content" class="content "> 421 <div class="row-fluid"> 422 <div class="container"> 423 424 425<div class="content-wrapper full-width 426 427 "><div class="row-fluid"><style type="text/css"> 428 429 430#layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.layout-padding { 431 padding: 0px 0px 0px 0px; 432} 433 434@media (min-width: 1024px) { 435 #layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.layout-padding { 436 padding: 0px 0px 0px 0px; 437 } 438} 439 440#layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.has-background-image { 441 background-image: url(""); 442} 443 444 445@media (min-width: 1200px) {#layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.has-background-image {background-image: url("1920w");}}@media (min-width: 992px) and (max-width: 1199px) {#layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.has-background-image {background-image: url("1199w");}}@media (min-width: 768px) and (max-width: 991px) {#layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.has-background-image {background-image: url("991w");}}@media (min-width: 576px) and (max-width: 767px) {#layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.has-background-image {background-image: url("767w");}}@media (max-width: 575px) {#layout-88ec810a-434f-4ea9-95a3-748dda7dab26.container.has-background-image {background-image: url("575w");}} 446 447 </style><div id=""><div id="layout-88ec810a-434f-4ea9-95a3-748dda7dab26" 448 class="container 449 450 451 452 453 454 layout-padding " 455 style=""><div id="column-da643630-a2bb-11f0-a220-47993a11141d" 456 class="span12 column-12 457 "><div id="component-ab1b6620-b33a-11f0-bc3b-b3b2467592aa" class="component"><style type="text/css"> 458 #video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa.video-component { 459 border: 1px solid #fef8ea; 460 background-color: #fffcf5; 461} 462 463#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-container { 464 background-color: #fffcf5; 465 border-bottom: 1px solid #fef8ea; 466} 467 468#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-info { 469 border-top: 1px solid #fef8ea; 470} 471 472#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa section { 473 background-color: #fffcf5; 474} 475 476#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist__wrapper { 477 border-left: 1px solid #fef8ea; 478 background-color: #fffcf5; 479} 480 481#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-item, 482#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-body, 483#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-info { 484 background-color: #fffcf5; 485} 486 487#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-item-title { 488 color: #d42029; 489} 490 491#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-item.selected-item .playlist-item-title, 492#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-item:hover .playlist-item-title { 493 color: #e3912d; 494} 495 496#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-item.selected-item, 497#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-item:hover { 498 background-color: #fef8ea; 499} 500 501#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-header { 502 background-color: #f1e8d3; 503} 504 505#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-cta { 506 border-color: #d42029; 507 color: #d42029; 508} 509 510#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-cta { 511 color: #d42029; 512} 513 514#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-cta:hover, 515#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-cta:focus { 516 background-color: #e3912d; 517 border-color: #e3912d; 518 color: #fffcf5; 519} 520 521#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .video-cta:hover { 522 text-decoration: underline; 523} 524 525#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-body .playlist-item { 526 /* Remove default button appearance in Firefox */ 527 appearance: none; 528 -webkit-appearance: none; 529 -moz-appearance: none; 530 /* Add visible focus style for accessibility */ 531} 532 533#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .playlist-body .playlist-item:focus { 534 outline: 2px solid #ffffff; 535 outline-offset: -4px; 536 box-shadow: inset 0 0 0 4px #d42029; 537 position: relative; 538 z-index: 1; 539} 540 541#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa button:focus, 542#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa a:focus { 543 overflow: visible; 544 outline: 2px solid #ffffff; 545 outline-offset: 2px; 546 box-shadow: 0 0 0 4px #d42029; 547} 548 549#video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa .pill-button-component:focus { 550 outline: 2px solid #d42029; 551 outline-offset: 2px; 552 box-shadow: 0 0 0 4px #ffffff; 553} 554 555 556 557</style><div id='video-component_ab1b6620-b33a-11f0-bc3b-b3b2467592aa' class='video-component column-12'><div class="video-container__wrapper"><!-- The <iframe> (and video player) will replace this <div> tag. --><div id='video-container_ab1b6620-b33a-11f0-bc3b-b3b2467592aa' class='video-container'></div><div class='video-info'><span class='channel'>Kidzuko</span><div class='title'>Moo Hoo | Full Episode</div><p class='description'>Mychal The Librarian explores the many ways we can understand and express our emotions in this heartfelt new episode of Reading Rainbow! Actor Adam Devine reads aloud âMoo-Hooâ by Audrey Perrott, a story about embracing your feelings, being true to yourself, and finding friends who like you just the way you are. <br><br>Along the way, dancers Rylee Arnold and Ezra Sosa from Dancing With The Stars visit a rage room to release their emotions through art, while we learn how to make our own homemade sensory bottles to help us focus and feel calm. <br><br>Psychologist and professor Dr. Raquel Martin also joins to explain why we feel big emotions and how we
557can manage them in healthy ways. </p></div></div></div></div><div id="component-c052d000-ab88-11f0-a499-f56d58164f6c" class="component"><style type="text/css"> 558 #video-component_c052d000-ab88-11f0-a499-f56d58164f6c.video-component { 559 border: 1px solid #fef8ea; 560 background-color: #fffcf5; 561} 562 563#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-container { 564 background-color: #fffcf5; 565 border-bottom: 1px solid #fef8ea; 566} 567 568#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-info { 569 border-top: 1px solid #fef8ea; 570} 571 572#video-component_c052d000-ab88-11f0-a499-f56d58164f6c section { 573 background-color: #fffcf5; 574} 575 576#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist__wrapper { 577 border-left: 1px solid #fef8ea; 578 background-color: #fffcf5; 579} 580 581#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-item, 582#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-body, 583#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-info { 584 background-color: #fffcf5; 585} 586 587#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-item-title { 588 color: #d42029; 589} 590 591#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-item.selected-item .playlist-item-title, 592#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-item:hover .playlist-item-title { 593 color: #e3912d; 594} 595 596#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-item.selected-item, 597#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-item:hover { 598 background-color: #fef8ea; 599} 600 601#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-header { 602 background-color: #f1e8d3; 603} 604 605#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-cta { 606 border-color: #d42029; 607 color: #d42029; 608} 609 610#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-cta { 611 color: #d42029; 612} 613 614#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-cta:hover, 615#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-cta:focus { 616 background-color: #e3912d; 617 border-color: #e3912d; 618 color: #fffcf5; 619} 620 621#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .video-cta:hover { 622 text-decoration: underline; 623} 624 625#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-body .playlist-item { 626 /* Remove default button appearance in Firefox */ 627 appearance: none; 628 -webkit-appearance: none; 629 -moz-appearance: none; 630 /* Add visible focus style for accessibility */ 631} 632 633#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .playlist-body .playlist-item:focus { 634 outline: 2px solid #ffffff; 635 outline-offset: -4px; 636 box-shadow: inset 0 0 0 4px #d42029; 637 position: relative; 638 z-index: 1; 639} 640 641#video-component_c052d000-ab88-11f0-a499-f56d58164f6c button:focus, 642#video-component_c052d000-ab88-11f0-a499-f56d58164f6c a:focus { 643 overflow: visible; 644 outline: 2px solid #ffffff; 645 outline-offset: 2px; 646 box-shadow: 0 0 0 4px #d42029; 647} 648 649#video-component_c052d000-ab88-11f0-a499-f56d58164f6c .pill-button-component:focus { 650 outline: 2px solid #d42029; 651 outline-offset: 2px; 652 box-shadow: 0 0 0 4px #ffffff; 653} 654 655 656 657</style><div id='video-component_c052d000-ab88-11f0-a499-f56d58164f6c' class='video-component column-12'><div class="video-container__wrapper"><!-- The <iframe> (and video player) will replace this <div> tag. --><div id='video-container_c052d000-ab88-11f0-a499-f56d58164f6c' class='video-container'></div><div class='video-info'><span class='channel'>Kidzuko</span><div class='title'>More Than Peach | Full Episode</div><p class='description'>Grab your crayons and your imagination because weâre reading More Than Peach, the inspiring story by Bellen Woodard, who at 9 years old showed us that beauty comes in every shade! The story is read aloud by actress Gabrielle Union, reminding us weâre all more than peach. Then we catch up with Bellen again, now a 14-year-old CEO changing the world one crayon at a time! Plus, activist Blair Imani shows us how to stand up for the causes we care about, and we get crafty making our own homemade postcards. <br> </p></div></div></div></div><div id="component-879adaa0-ab88-11f0-a499-f56d58164f6c" class="component"><style type="text/css"> 658 #video-component_879adaa0-ab88-11f0-a499-f56d58164f6c.video-component { 659 border: 1px solid #fef8ea; 660 background-color: #fffcf5; 661} 662 663#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-container { 664 background-color: #fffcf5; 665 border-bottom: 1px solid #fef8ea; 666} 667 668#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-info { 669 border-top: 1px solid #fef8ea; 670} 671 672#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c section { 673 background-color: #fffcf5; 674} 675 676#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist__wrapper { 677 border-left: 1px solid #fef8ea; 678 background-color: #fffcf5; 679} 680 681#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-item, 682#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-body, 683#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-info { 684 background-color: #fffcf5; 685} 686 687#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-item-title { 688 color: #d42029; 689} 690 691#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-item.selected-item .playlist-item-title, 692#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-item:hover .playlist-item-title { 693 color: #e3912d; 694} 695 696#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-item.selected-item, 697#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-item:hover { 698 background-color: #fef8ea; 699} 700 701#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-header { 702 background-color: #f1e8d3; 703} 704 705#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-cta { 706 border-color: #d42029; 707 color: #d42029; 708} 709 710#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-cta { 711 color: #d42029; 712} 713 714#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-cta:hover, 715#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-cta:focus { 716 background-color: #e3912d; 717 border-color: #e3912d; 718 color: #fffcf5; 719} 720 721#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .video-cta:hover { 722 text-decoration: underline; 723} 724 725#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-body .playlist-item { 726 /* Remove default button appearance in Firefox */ 727 appearance: none; 728 -webkit-appearance: none; 729 -moz-appearance: none; 730 /* Add visible focus style for accessibility */ 731} 732 733#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .playlist-body .playlist-item:focus { 734 outline: 2px solid #ffffff; 735 outline-offset: -4px; 736 box-shadow: inset 0 0 0 4px #d42029; 737 position: relative; 738 z-index: 1; 739} 740 741#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c button:focus, 742#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c a:focus { 743 overflow: visible; 744 outline: 2px solid #ffffff; 745 outline-offset: 2px; 746 box-shadow: 0 0 0 4px #d42029; 747} 748 749#video-component_879adaa0-ab88-11f0-a499-f56d58164f6c .pill-button-component:focus { 750 outline: 2px solid #d42029; 751 outline-offset: 2px; 752 box-shadow: 0 0 0 4px #ffffff; 753} 754 755 756 757</style><div id='video-component_879adaa0-ab88-11f0-a499-f56d58164f6c' class='video-component column-12'><div class="video-container__wrapper"><!-- The <iframe> (and video player) will replace this <div> tag. --><div id='video-container_879adaa0-ab88-11f0-a499-f56d58164f6c' class='video-container'></div><div class='video-info'><span class='channel'>Kidzuko</span><div class='title'>Tiny Troubles: Nelli's Purpose | Full Episode</div><p class='description'>Mychal The Librarian shares the many ways someone can find their purpose, while Chrissy Teigen and John Legend read a story about two best friends on a journey to find theirs. Along the way, we meet people fulfilling their unique purposes in the real world and build buzzing bee buffets as we learn all about a beeâs special role in nature. </p></div></div></div></div><div id="component-428bb740-ab88-11f0-a499-f56d58164f6c" class="component"><style type="text/css"> 758 #video-component_428bb740-ab88-11f0-a499-f56d58164f6c.video-component { 759 border: 1px solid #fef8ea; 760 background-color: #fffcf5; 761} 762 763#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-container { 764 background-color: #fffcf5; 765 border-bottom: 1px solid #fef8ea; 766} 767 768#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-info { 769 border-top: 1px solid #fef8ea; 770} 771 772#video-component_428bb740-ab88-11f0-a499-f56d58164f6c section { 773 background-color: #fffcf5; 774} 775 776#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist__wrapper { 777 border-left: 1px solid #fef8ea; 778 background-color: #fffcf5; 779} 780 781#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-item, 782#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-body, 783#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-info { 784 background-color: #fffcf5; 785} 786 787#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-item-title { 788 color: #d42029; 789} 790 791#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-item.selected-item .playlist-item-title, 792#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-item:hover .playlist-item-title { 793 color: #e3912d; 794} 795 796#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-item.selected-item, 797#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-item:hover { 798 background-color: #fef8ea; 799} 800 801#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-header { 802 background-color: #f1e8d3; 803} 804 805#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-cta { 806 border-color: #d42029; 807 color: #d42029; 808} 809 810#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-cta { 811 color: #d42029; 812} 813 814#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-cta:hover, 815#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-cta:focus { 816 background-color: #e3912d; 817 border-color: #e3912d; 818 color: #fffcf5; 819} 820 821#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .video-cta:hover { 822 text-decoration: underline; 823} 824 825#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-body .playlist-item { 826 /* Remove default button appearance in Firefox */ 827 appearance: none; 828 -webkit-appearance: none; 829 -moz-appearance: none; 830 /* Add visible focus style for accessibility */ 831} 832 833#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .playlist-body .playlist-item:focus { 834 outline: 2px solid #ffffff; 835 outline-offset: -4px; 836 box-shadow: inset 0 0 0 4px #d42029; 837 position: relative; 838 z-index: 1; 839} 840 841#video-component_428bb740-ab88-11f0-a499-f56d58164f6c button:focus, 842#video-component_428bb740-ab88-11f0-a499-f56d58164f6c a:focus { 843 overflow: visible; 844 outline: 2px solid #ffffff; 845 outline-offset: 2px; 846 box-shadow: 0 0 0 4px #d42029; 847} 848 849#video-component_428bb740-ab88-11f0-a499-f56d58164f6c .pill-button-component:focus { 850 outline: 2px solid #d42029; 851 outline-offset: 2px; 852 box-shadow: 0 0 0 4px #ffffff; 853} 854 855 856 857</style><div id='video-component_428bb740-ab88-11f0-a499-f56d58164f6c' class='video-component column-12'><div class="video-container__wrapper"><!-- The <iframe> (and video player) will replace this <div> tag. --><div id='video-container_428bb740-ab88-11f0-a499-f56d58164f6c' class='video-container'></div><div class='video-info'><span class='channel'>Kidzuko</span><div class='title'>No Cats In The Library | Full Episode</div><p class='description'>Mychal The Librarian builds tiny libraries, while Actress Jamie Chung reads a story about a cat who loves being read to at the library, and Actor Ebon Moss-Bachrach shows how you can read to cats at your local animal shelter.</p></div></div></div></div></div></div></div></div> 858 859 860</div> 861 862 863 864 865 866 867 </div> 868 </div> 869 </main> 870 871 872<footer><div class="row-fluid"><style type="text/css"> 873 874 875#layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.layout-padding { 876 padding: px 0px px 0px; 877} 878 879@media (min-width: 1024px) { 880 #layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.layout-padding { 881 padding: px px px px; 882 } 883} 884 885#layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.has-background-image { 886 background-image: url(""); 887} 888 889 890@media (min-width: 1200px) {#layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.has-background-image {background-image: url("1920w");}}@media (min-width: 992px) and (max-width: 1199px) {#layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.has-background-image {background-image: url("1199w");}}@media (min-width: 768px) and (max-width: 991px) {#layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.has-background-image {background-image: url("991w");}}@media (min-width: 576px) and (max-width: 767px) {#layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.has-background-image {background-image: url("767w");}}@media (max-width: 575px) {#layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336.container.has-background-image {background-image: url("575w");}} 891 892 </style><div id=""><div id="layout-4d341d67-a986-44c5-bbe9-5d1dfaccc336" 893 class="container 894 895 896 897 898 has-background-color 899 " 900 style=" background-color: #248ec2;">
900<div id="column-74b13364-e133-4fe0-badf-489a97a5386b" 901 class="span12 column-12 902 "><div id="component-4fbff620-93df-11e7-9227-9759c1fb856f" class="component"><!--FAVICON WORKAROUND SCRIPT ICO FILE
903<script> 904//Delete link that has favicon in the href 905for (var headLinksIndex =document.getElementsByTagName('head')[0].getElementsByTagName('link').length-1; headLinksIndex > 0; headLinksIndex-- ) { 906 if (document.getElementsByTagName('head')[0].getElementsByTagName('link')[headLinksIndex].getAttribute('href').includes("favicon") ) { 907 document.getElementsByTagName('head')[0].getElementsByTagName('link')[headLinksIndex].remove(); 908 } 909 } 910 //Create favIcon 911 var favIcon = document.createElement('link'); favIcon.href = "https://pbs-ingest.s3.amazonaws.com/shaw_festival/Reading_Rainbow/favicon/favicon.ico"; favIcon.type = "image/png"; favIcon.rel = "icon"; 912 //Insert favIcon at the end of the Head tag 913 document.getElementsByTagName('head')[0].appendChild(favIcon); 914</script>
914--></div><div id="component-c6011aa0-7303-11ec-bd9c-8b88e1c356da" class="component"><div id="c6011aa0-7303-11ec-bd9c-8b88e1c356da" class="social-component bento-component"><article class="span12 col-xs-12"><div class="row-fluid"><div class="social-text align-center dark"> 915 Connect With Us 916 </div><div class="social-icons align-center"><a aria-label="facebook link" href="https://www.facebook.com/readingrainbow/" 917 target="_blank" 918 rel="noopener" 919 class="icon "><span class="facebook-dark" role="img" aria-label="Facebook"></span></a><a aria-label="twitter link" href="https://twitter.com/readingrainbow" 920 target="_blank" 921 rel="noopener" 922 class="icon "><span class="twitter-dark" role="img" aria-label="Twitter"></span></a><a aria-label="instagram link" href="https://www.instagram.com/readingrainbow/" 923 target="_blank" 924 rel="noopener" 925 class="icon "><span class="instagram-dark" role="img" aria-label="Instagram"></span></a><a aria-label="you-tube link" href="https://www.youtube.com/@ReadingRainbowOfficial/featured" 926 target="_blank" 927 rel="noopener" 928 class="icon "><span class="you-tube-dark" role="img" aria-label="YouTube"></span></a></div></div></article></div></div><div id="component-0a2e0d90-a2da-11e7-a2b8-b1b7b1560050" class="component"><style type="text/css"> 929#component-0a2e0d90-a2da-11e7-a2b8-b1b7b1560050 .text-container { 930 background-color: rgba(255, 255, 255, 100); 931 padding: 0px 16px 16px 16px; 932} 933 934#component-0a2e0d90-a2da-11e7-a2b8-b1b7b1560050 .text-container.text-background-color { 935 background-color: rgba(255, 255, 255, 0); 936} 937 938#component-0a2e0d90-a2da-11e7-a2b8-b1b7b1560050 .text-container.text-padding { 939 padding: px 16px px 16px; 940} 941 942@media (min-width: 1024px) { 943 #component-0a2e0d90-a2da-11e7-a2b8-b1b7b1560050 .text-container.text-padding { 944 padding: px px px px; 945 } 946} 947 948</style><div class="text-container 949 text-background-color 950 "><div id="rich-text-0a2e0d90-a2da-11e7-a2b8-b1b7b1560050" 951 style=" 952 max-width: 100%; 953 "><p style="text-align:center;"><a href="https://dc79r36mj3c9w.cloudfront.net/prod/filer_public/wned/About/PDF/e093d04d4f_BTPM_Privacy_Policy_and_Terms_of_Use.pdf" target="_blank" rel="noopener noreferrer"><span style="color:hsl(0,0%,100%);">Privacy Policy</span></a><span style="color:hsl(0,0%,100%);"> </span><a href="https://www.readingrainbow.org/contact/"><span style="color:hsl(0,0%,100%);">Contact Reading Rainbow</span></a></p><p style="text-align:center;"><span style="color:hsl(0,0%,100%);">Reading Rainbow ® and its logo are registered trademarks of Western New York Public Broadcasting Association (WNED-PBS).</span><br><span style="color:hsl(0,0%,100%);">Buffalo Toronto Public Media is the sole owner of all Reading Rainbow ® intellectual property.</span></p></div>
953<script type="text/javascript"> 954 (function (document) { 955 var downloadAPI = "/bento-api/filer-file-download/" 956 var baseURL = 'https://www.readingrainbow.org/', 957 baseUrlLength = baseURL.length, 958 component = document.getElementById('rich-text-0a2e0d90-a2da-11e7-a2b8-b1b7b1560050'), 959 aPageTags = component.querySelectorAll('a[data-link-page-id]'), 960 aFileTags = component.querySelectorAll('a[data-link-file-id]'), 961 aFileDownloads = component.querySelectorAll('a[href^="/bento-api/filer-file-download/"]'), 962 filerImages = component.querySelectorAll('img[data-img-filer-id]'), 963 filerImage; 964 965 if (baseURL[baseUrlLength - 1] === '/') { 966 baseURL = baseURL.substr(0, baseUrlLength - 1); 967 } 968 969 for (var index = 0; index < aPageTags.length; index++) { 970 // all internal links are relative 971 aPageTags[index].href = aPageTags[index].dataset.linkPageId; 972 } 973 974 for (var index = 0; index < aFileDownloads.length; index++) { 975 var splited = aFileDownloads[index].href.split(downloadAPI) 976 splited[0] = baseURL; 977 aFileDownloads[index].href = splited.join(downloadAPI) 978 } 979 980 for (var index = 0; index < aFileTags.length; index++) { 981 aFileTags[index].href = aFileTags[index].dataset.linkFileId; 982 } 983 984 for (var imgIndex = 0; imgIndex < filerImages.length; imgIndex++) { 985 filerImage = filerImages[imgIndex]; 986 filerImage.src = filerImage.dataset.imgFilerId; 987 if (filerImage.alt === '' || filerImage.alt === undefined) { 988 filerImage.alt = 'Filer image element'; 989 } 990 } 991 992 // Fix all links without discernible names for accessibility 993 var allLinks = component.querySelectorAll('a[href]'); 994 for (var linkIdx = 0; linkIdx < allLinks.length; linkIdx++) { 995 var link = allLinks[linkIdx]; 996 var hasAriaLabel = link.getAttribute('aria-label'); 997 var hasAriaLabelledBy = link.getAttribute('aria-labelledby'); 998 var hasTitle = link.getAttribute('title'); 999 var hasVisibleText = link.textContent.trim(); 1000 if (!hasAriaLabel && !hasAriaLabelledBy && !hasTitle && !hasVisibleText) { 1001 // Try to get alt text from an associated image inside the link 1002 var nestedImg = link.querySelector('img'); 1003 var altText = nestedImg ? nestedImg.getAttribute('alt') : ''; 1004 if (altText) { 1005 altText = altText.trim(); 1006 } 1007 // Only use meaningful alt text, not generic fallbacks 1008 if (altText && altText !== 'Filer image element') { 1009 link.setAttribute('aria-label', altText); 1010 } 1011 } 1012 } 1013 })(document); 1014</script>
1014</div></div></div></div></div></div></footer> 1015 1016 1017 1018 1019 1020 1021
1022<script type="text/javascript"> 1023 PBS = window.PBS || {}; 1024 PBS.BentoConfig = PBS.BentoConfig || {}; 1025 PBS.BentoConfig.baseURL = 'https://www.readingrainbow.org/'; 1026 PBS.BentoConfig.APIBaseURL = 'https://www.readingrainbow.org/'; 1027 PBS.BentoConfig.ItsPrefix = 'https://image.pbs.org/bento3-prod'; 1028 1029</script>
1029 1030
1031<script type="text/javascript" src="https://bento.pbs.org/prod/3.149.0/staticfiles/dist/frontend/css/frontend_style.js" ></script>
vendor: 1 bytes, line 1031
1031
1032<script type="text/javascript" src="https://bento.pbs.org/prod/3.149.0/staticfiles/dist/frontend/js/frontend_js.js" ></script>
1032 1033 1034
1035<script type="text/javascript"> 1036(function(PBS){ 1037 PBS = PBS || {}; 1038 PBS.snippets = PBS.snippets || {}; 1039 PBS.snippets['48d46cf0-a3b2-11ec-9968-03437a2eb5a0'] = new PBS.Menu({ 1040 component: document.getElementById('component-48d46cf0-a3b2-11ec-9968-03437a2eb5a0'), 1041 id: '48d46cf0-a3b2-11ec-9968-03437a2eb5a0' 1042 }); 1043}(window.PBS)); 1044 1045</script>
1045 1046 1047
1048<script type="text/javascript"> 1049(function(PBS){ 1050 PBS = PBS || {}; 1051 PBS.snippets = PBS.snippets || {}; 1052 PBS.snippets['page-content-disqus'] = new PBS.Disqus({ 1053 disqus_shortname: "", 1054 show_disqus: false, 1055 page_url: "https://www.readingrainbow.org/new-episodes/", 1056 page_id: 204964 1057 }); 1058}(window.PBS)); 1059</script>
1059 1060
1061<script> 1062 $(document).ready(function () { 1063 var currentPlaylist = playlistMapping['ab1b6620-b33a-11f0-bc3b-b3b2467592aa']; 1064 var currentSettings = settingsMapping['ab1b6620-b33a-11f0-bc3b-b3b2467592aa']; 1065 $('.playlist-item').on('click', function () { 1066 $(this).addClass('selected-item').siblings().removeClass('selected-item'); 1067 }); 1068 if (currentPlaylist[0].videoSource === 'cove') { 1069 loadMMVideo('ab1b6620-b33a-11f0-bc3b-b3b2467592aa', 0, currentPlaylist, currentSettings, 'WNED'); 1070 } 1071 }); 1072 1073 function displayMMInfoItem(type, item, metadataSection) { 1074 var tag = ''; 1075 1076 var label = type && (type[0].toUpperCase() + type.slice(1)); 1077 var tag = type !== 'runtime' ? label : ''; 1078 1079 if (item) { 1080 $('<div class="additional-mm-info ' + type + '"></div>').appendTo(metadataSection); 1081 var mediaManagerInfoItem = $(metadataSection + ' .' + type); 1082 tag && mediaManagerInfoItem.html(label + ': '); 1083 mediaManagerInfoItem.append(item); 1084 } 1085 } 1086 1087 function fitMMVideo(elem) { 1088 var iFrame = elem; 1089 var aspectRatio = null; 1090 var actualPlayerWidth = iFrame.width(); 1091 var topBarHeight = 0; 1092 1093 1094 if (iFrame.attr("width") != '100%') { 1095 //for backwards compatibility use hardcoded old values for player dimensions 1096 try { 1097 var styleWidth = 512; 1098 var styleHeight = 288; 1099 aspectRatio = styleWidth / styleHeight; 1100 1101 iFrame.css({ 1102 "max-width": styleWidth, 1103 "max-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth, 1104 "min-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth 1105 }); 1106 } catch (e) { 1107 } 1108 } else { 1109 // the new player with width=100% and height=100% 1110 try { 1111 aspectRatio = 16 / 9; 1112 1113 if (iFrame.attr('src').indexOf('topbar=true') != -1) { 1114 topBarHeight = 40; 1115 } 1116 1117 iFrame.css({ 1118 "height": actualPlayerWidth / aspectRatio + topBarHeight, 1119 }); 1120 iFrame.parent().css({ 1121 "height": actualPlayerWidth / aspectRatio + topBarHeight, 1122 }); 1123 } catch (e) { 1124 } 1125 } 1126 } 1127 1128 function loadVideoIframe(response, playerObject, callsign) { 1129 var currentSettings = settingsMapping['ab1b6620-b33a-11f0-bc3b-b3b2467592aa']; 1130 template = response.player_code.template; 1131 var iframe = jQuery(template); 1132 iframe.attr('allow', 'encrypted-media'); 1133 iframe.attr('title', 'Video player'); 1134 /* WCAG 2.1 1.2.2: Ensure captions are enabled. The PBS partner player 1135 should have closed-caption tracks available by default. If captions 1136 are missing, content editors must provide them. */ 1137 1138 if (callsign) { 1139 iframe.attr('src', function (i, e) { 1140 return e += '&callsign=' + callsign; 1141 }) 1142 } 1143 iframe.attr('src', function (i, e) { 1144 return e += '&endscreen=' + !!currentSettings.endScreen; 1145 }) 1146 playerObject.html(iframe); 1147 fitMMVideo(iframe); 1148 iframe.on('load', function () { 1149 fitMMVideo(jQuery(this)); 1150 }); 1151 } 1152 1153 function loadVideoMetadata(currentSettings, item, metadataSection) { 1154 currentSettings.showTitle && 1155 $(metadataSection + ' .title').html(item.title); 1156 1157 currentSettings.showContentChannel && 1158 $(metadataSection + ' .channel').html(item.channel); 1159 1160 $(metadataSection + ' .additional-mm-info').remove(); 1161 if (currentSettings.showAdditionalMediaManagerInfo) { 1162 var mediaManagerInfoTypes = ['runtime', 'published', 'expires', 'rating']; 1163 var mediaManagerInfoTypesLength = mediaManagerInfoTypes.length; 1164 for (var i = 0; i <= mediaManagerInfoTypesLength; i++) { 1165 displayMMInfoItem(mediaManagerInfoTypes[i], item[mediaManagerInfoTypes[i]], metadataSection); 1166 } 1167 } 1168 1169 if (currentSettings.showDescription) { 1170 $(metadataSection + ' .description').remove(); 1171 $('<p class="description"></p>').appendTo(metadataSection); 1172 $(metadataSection + ' .description').html(item.description); 1173 } 1174 } 1175 1176 function loadMMVideo(componentId, index, currentPlaylist, currentSettings, c
1176allsign) { 1177 var youtubeWrapper = '#youtube-wrapper_' + componentId; 1178 var videoContainer = '#video-container_' + componentId; 1179 var videoComponent = '#video-component_' + componentId; 1180 var videoContainerWrapper = videoComponent + ' .video-container__wrapper'; 1181 var metadataSection = videoComponent + ' .video-info'; 1182 1183 $(youtubeWrapper).remove(); 1184 $(videoContainer).remove(); 1185 1186 var videoContainerEl = document.createElement('div'); 1187 videoContainerEl.id = 'video-container_' + componentId; 1188 videoContainerEl.className = 'video-container'; 1189 $(videoContainerWrapper).prepend(videoContainerEl); 1190 var videoId = currentPlaylist[index].videoId; 1191 var title = currentPlaylist[index].title; 1192 var partnerPlayerUrl = currentPlaylist[index].partnerPlayerUrl; 1193 var APIBaseURL = PBS.BentoConfig.APIBaseURL || '/'; 1194 var url = APIBaseURL + 'merlin_plugin/video_frame/'; 1195 url += partnerPlayerUrl ? partnerPlayerUrl : videoId; 1196 if (callsign) { 1197 url += '/?callsign=' + callsign + '&title=' + title; 1198 } 1199 url += '/'; 1200 $.ajax({ 1201 url: url, 1202 dataType: 'json', 1203 success: function (response) { 1204 var template, notAvailableImg; 1205 var playerObject = $('#video-container_' + componentId); 1206 var imgUrl = currentPlaylist[index].img.url; 1207 1208 if (response.player_code) { 1209 loadVideoIframe(response, playerObject, callsign); 1210 } else { 1211 var notAvailableVideo = $('<img />'); 1212 notAvailableVideo.attr('src', imgUrl); 1213 notAvailableVideo.attr('alt', 'Video is not available'); 1214 playerObject.html($(notAvailableVideo)); 1215 } 1216 1217 loadVideoMetadata(currentSettings, currentPlaylist[index], metadataSection); 1218 1219 }, 1220 error: function (xhr, status, err) { 1221 console.error(xhr, status, err.toString()); 1222 } 1223 }); 1224 } 1225 </script>
vendor: 1 bytes, line 1225
1225
1226<script> 1227 $(document).ready(function() { 1228 var currentPlaylist = playlistMapping['ab1b6620-b33a-11f0-bc3b-b3b2467592aa']; 1229 var currentSettings = settingsMapping['ab1b6620-b33a-11f0-bc3b-b3b2467592aa']; 1230 1231 window.youtubeIframeMap = window.youtubeIframeMap || {}; 1232 if(currentPlaylist[0].videoSource === 'youtube') { 1233 if (typeof window.youtubeIframeMap === 'undefined') { 1234 window.youtubeIframeMap = {}; 1235 } 1236 window.youtubeIframeMap['ab1b6620-b33a-11f0-bc3b-b3b2467592aa'] = { 1237 'playlist': currentPlaylist, 1238 'settings': currentSettings, 1239 }; 1240 } 1241 1242 //check if single video & no metadata 1243 if ((currentPlaylist.length === 1 || !currentSettings.showPlaylist) && 1244 !currentSettings.showTitle && 1245 !currentSettings.showContentChannel && 1246 !currentSettings.showDescription && 1247 !currentSettings.showAdditionalMediaManagerInfo){ 1248 $('#video-component_' + 'ab1b6620-b33a-11f0-bc3b-b3b2467592aa').css({border: 'none'}); 1249 } 1250 1251 // This code loads the IFrame Player API code asynchronously. 1252 var scriptTag = document.getElementById("youtube_iframe_api"); 1253 if(!scriptTag) { 1254 scriptTag = document.createElement('script'); 1255 scriptTag.src = "https://www.youtube.com/iframe_api"; 1256 scriptTag.id = "youtube_iframe_api"; 1257 var firstScriptTag = document.getElementsByTagName('script')[0]; 1258 firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag); 1259 } 1260 }) 1261 1262 // This function creates an <iframe> (and YouTube player) after the API code downloads. 1263 function onYouTubeIframeAPIReady() { 1264 for (var componentId in window.youtubeIframeMap) { 1265 var currentPlaylist = window.youtubeIframeMap[componentId]['playlist']; 1266 var currentSettings = window.youtubeIframeMap[componentId]['settings']; 1267 loadYoutubeVideo(componentId, 0, currentPlaylist, currentSettings); 1268 } 1269 } 1270 1271 function loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings) { 1272 var player, playerVars; 1273 var videoComponent = '#video-component_' + componentId; 1274 var youtubeWrapper = document.createElement('div'); 1275 youtubeWrapper.id = 'youtube-wrapper_' + componentId; 1276 youtubeWrapper.className = 'youtube-wrapper video-container'; 1277 1278 $('#video-container_' + componentId).remove(); 1279 $('#youtube-wrapper_' + componentId).remove(); 1280 var videoContainerEl = document.createElement('div'); 1281 videoContainerEl.id = 'video-container_' + componentId; 1282 1283 $(videoComponent + ' .video-container__wrapper').prepend(youtubeWrapper); 1284 1285 $(videoComponent + ' .youtube-wrapper').prepend(videoContainerEl); 1286 1287 playerVars = Object.assign({}, 1288 { cc_load_policy: 1 }, 1289 (currentPlaylist[index].rel === false) && { rel: 0 }, 1290 (currentPlaylist[index].controls === false) && { controls: 0 }, 1291 (currentPlaylist[index].fs === false) && { fs: 0 }, 1292 (currentPlaylist[index].autoplay === true) && { autoplay: 1 }, 1293 (currentPlaylist[index].start > 0) && { start: currentPlaylist[index].start }, 1294 (currentPlaylist[index].end > 0 && currentPlaylist[index].start < currentPlaylist[index].end) && { end: currentPlaylist[index].end } 1295 ); 1296 1297 player = new YT.Player('video-container_' + componentId, { 1298 videoId: currentPlaylist[index].videoId, 1299 playerVars 1300 }); 1301 1302 currentSettings.showTitle && 1303 $(videoComponent + ' .title').html(currentPlaylist[index].title); 1304 1305 currentSettings.showContentChannel && 1306 $(videoComponent + ' .channel').html(currentPlaylist[index].channel); 1307 1308 currentSettings.showDescription && 1309 $(videoComponent + ' .description').html(currentPlaylist[index].description); 1310 1311 $(videoComponent + ' .additional-mm-info').remove(); 1312 } 1313</script>
vendor: 1 bytes, line 1313
1313
1314<script> 1315 1316 var playlistJson = [ 1317 { 1318 "fs": true, 1319 "id": "7e45ae6f-ae53-4937-9d41-93f641183252", 1320 "end": 0, 1321 "img": { 1322 "url": "https://i.ytimg.com/vi/rsqcbUcunbM/maxresdefault.jpg", 1323 "isDefault": false 1324 }, 1325 "rel": false, 1326 "url": "https://www.youtube.com/watch?v=rsqcbUcunbM", 1327 "start": 0, 1328 "title": "Moo Hoo | Full Episode", 1329 "channel": "Kidzuko", 1330 "videoId": "rsqcbUcunbM", 1331 "autoplay": false, 1332 "controls": true, 1333 "published": "", 1334 "description": "Mychal The Librarian explores the many ways we can understand and express our emotions in this heartfelt new episode of Reading Rainbow! Actor Adam Devine reads aloud \u201cMoo-Hoo\u201d by Audrey Perrott, a story about embracing your feelings, being true to yourself, and finding friends who like you just the way you are. <br><br>Along the way, dancers Rylee Arnold and Ezra Sosa from Dancing With The Stars visit a rage room to release their emotions through art, while we learn how to make our own homemade sensory bottles to help us focus and feel calm. <br><br>Psychologist and professor Dr. Raquel Martin also joins to explain why we feel big emotions and how we can manage them in healthy ways. ", 1335 "videoSource": "youtube", 1336 "titlePlaceholder": "Title", 1337 "channelPlaceholder": "Content channel", 1338 "descriptionPlaceholder": "Description" 1339 } 1340]; 1341 var settingsJson = { 1342 "endScreen": false, 1343 "showTitle": true, 1344 "showPlaylist": false, 1345 "playlistHeight": 4, 1346 "selectedRegions": [ 1347 { 1348 "label": "US", 1349 "value": "US" 1350 } 1351 ], 1352 "showDescription": true, 1353 "showContentChannel": true, 1354 "showAdditionalMediaManagerInfo": true 1355} 1356 1357 1358 1359 function updatePlaylistHeaderTabindex(componentId) { 1360 var playlistHeader = document.getElementById('playlist-header_' + componentId); 1361 if (!playlistHeader) return; 1362 var caret = playlistHeader.querySelector('.dropdown-caret'); 1363 if (window.innerWidth > 1023) { 1364 // On desktop with one-column layout, playlist header is not interactive 1365 if (caret && window.getComputedStyle(caret).display === 'none') { 1366 playlistHeader.disabled = true; 1367 playlistHeader.setAttribute('aria-disabled', 'true'); 1368 playlistHeader.setAttribute('tabindex', '-1'); 1369 } else { 1370 playlistHeader.disabled = false; 1371 playlistHeader.removeAttribute('aria-disabled'); 1372 playlistHeader.setAttribute('tabindex', '0'); 1373 } 1374 } else { 1375 playlistHeader.disabled = false; 1376 playlistHeader.removeAttribute('aria-disabled'); 1377 playlistHeader.setAttribute('tabindex', '0'); 1378 } 1379 } 1380 $(window).on('load', function(){ 1381 resizePlaylist('ab1b6620-b33a-11f0-bc3b-b3b2467592aa'); 1382 updatePlaylistHeaderTabindex('ab1b6620-b33a-11f0-bc3b-b3b2467592aa'); 1383 }); 1384 $(window).resize(function(){ 1385 resizePlaylist('ab1b6620-b33a-11f0-bc3b-b3b2467592aa'); 1386 updatePlaylistHeaderTabindex('ab1b6620-b33a-11f0-bc3b-b3b2467592aa'); 1387 }); 1388 1389 if (typeof window.playlistMapping === 'undefined') { 1390 window.playlistMapping = {}; 1391 } 1392 1393 if (typeof window.settingsMapping === 'undefined') { 1394 window.settingsMapping = {}; 1395 } 1396 window.playlistMapping['ab1b6620-b33a-11f0-bc3b-b3b2467592aa'] = playlistJson; 1397 window.settingsMapping['ab1b6620-b33a-11f0-bc3b-b3b2467592aa'] = settingsJson; 1398 1399 function resizePlaylist(componentId) { 1400 const videoComponent = $('#video-component_' + componentId); 1401 const playlistWrapper = videoComponent.find('.playlist__wrapper'); 1402 const playlistBody = playlistWrapper.find('.playlist-body'); 1403 const isSmallPlaylist = playlistWrapper.hasClass('playlist-sm'); 1404 const isLargeWindow = $(window).width() >= 1024; 1405 const isOneColWithPlaylist = videoComponent.hasClass('column-12'); 1406 if (isOneColWithPlaylist) { 1407 if(isLargeWindow) { 1408 const mainVideoHeight = videoComponent.find('.video-container').outerHeight() + 1409 videoComponent.find('.video-info').outerHeight() + 1410 (videoComponent.find('.video-cta-container').outerHeight(true) || 0); 1411 const playlistHeaderHeight = $('#playlist-header_' + componentId).outerHeight(); 1412 1413 playlistWrapper.css('height', mainVideoHeight + 'px'); 1414 playlistBody.css('max-height', (mainVideoHeight - playlistHeaderHeight) + 'px'); 1415 } 1416 else { 1417 playlistWrapper.css('height', 'auto'); 1418 playlistBody.css('max-height', '400px'); 1419 } 1420 } 1421 if(isSmallPlaylist){ 1422 const playlistItemImgWrapper = playlistWrapper.find('.playlist-item-img-wrapper'); 1423 const playlistItemInfo = playlistWrapper.find('.playlist-item-info'); 1424 if(!isLargeWindow) { 1425 $(playlistItemImgWrapper).removeClass('span6'); 1426 $(playlistItemInfo).removeClass('span6'); 1427 $(playlistItemImgWrapper).addClass('span4'); 1428 $(playlistItemInfo).addClass('span8'); 1429 } 1430 else { 1431 $(playlistItemImgWrapper).removeClass('span4'); 1432 $(playlistItemInfo).removeClass('span8'); 1433 $(playlistItemImgWrapper).addClass('span6'); 1434 $(playlistItemInfo).addClass('span6'); 1435 } 1436 } 1437 1438 } 1439 1440 function selectPlaylistItem(componentId, index, videoSource) { 1441 var currentPlaylist = playlistMapping[componentId]; 1442 var currentSettings = settingsMapping[componentId]; 1443 switch(videoSource) { 1444 case 'cove': 1445 loadMMVideo(componentId, index, currentPlaylist, currentSettings); 1446 break; 1447 case 'youtube': 1448 loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings); 1449 break; 1450 default: 1451 loadDefault(componentId, index, currentPlaylist, currentSettings); 1452 break; 1453 } 1454 1455 } 1456 1457 function loadDefault(componentId, index, currentPlaylist, currentSettings) { 1458 var youtubeWrapper = '#youtube-wrapper_' + componentId; 1459 var videoContainer = '#video-container_' + componentId; 1460 var videoComponent = '#video-component_' + componentId; 1461 1462 $(youtubeWrapper).remove(); 1463 $(videoContainer).remove(); 1464 1465 var videoContainerEl = document.createElement('div'); 1466 videoContainerEl.id = 'video-container_' + componentId; 1467 videoContainerEl.className = 'video-container'; 1468 $(videoComponent + ' .video-container__wrapper').prepend(vi
1468deoContainerEl); 1469 1470 var defaultImg = document.createElement('img'); 1471 defaultImg.alt = currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder; 1472 defaultImg.src = currentPlaylist[index].img.url; 1473 $(videoContainerEl).prepend(defaultImg); 1474 1475 currentSettings.showTitle && 1476 $(videoComponent + ' .title').html(currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder); 1477 1478 currentSettings.showContentChannel && 1479 $(videoComponent + ' .channel').html(currentPlaylist[index].channel||currentPlaylist[index].channelPlaceholder); 1480 1481 currentSettings.showDescription && 1482 $(videoComponent + ' .description').html(currentPlaylist[index].description||currentPlaylist[index].descriptionPlaceholder); 1483 1484 $(videoComponent + ' .additional-mm-info').remove(); 1485 } 1486 1487 function showCurrentIndex(index, componentId) { 1488 var itemsCount = $('#playlist-items-count_' + componentId); 1489 var currentItem = itemsCount.children('span'); 1490 currentItem.text(index + '/'); 1491 } 1492 1493 function togglePlaylist(componentId) { 1494 var playlistHeader = $('#playlist-header_' + componentId); 1495 // Do not toggle if the header is disabled 1496 if (playlistHeader.prop('disabled')) return; 1497 var caret = playlistHeader.find('.dropdown-caret'); 1498 // Only toggle if the caret is visible (not just present in DOM) 1499 if (caret.length && caret.is(':visible')) { 1500 var playlistBody = $('#playlist-body_' + componentId); 1501 playlistBody.css('overflow', 'auto'); 1502 playlistBody.slideToggle('slow', function(){ playlistBody.css('overflow','auto') }); 1503 playlistHeader.find('i').toggleClass('fa-caret-up fa-caret-down'); 1504 // Toggle aria-expanded for accessibility 1505 var isExpanded = playlistHeader.attr('aria-expanded') === 'true'; 1506 playlistHeader.attr('aria-expanded', !isExpanded); 1507 } 1508 } 1509 1510</script>
vendor: 1 bytes, line 1510
1510
1511<script> 1512 $(document).ready(function () { 1513 var currentPlaylist = playlistMapping['c052d000-ab88-11f0-a499-f56d58164f6c']; 1514 var currentSettings = settingsMapping['c052d000-ab88-11f0-a499-f56d58164f6c']; 1515 $('.playlist-item').on('click', function () { 1516 $(this).addClass('selected-item').siblings().removeClass('selected-item'); 1517 }); 1518 if (currentPlaylist[0].videoSource === 'cove') { 1519 loadMMVideo('c052d000-ab88-11f0-a499-f56d58164f6c', 0, currentPlaylist, currentSettings, 'WNED'); 1520 } 1521 }); 1522 1523 function displayMMInfoItem(type, item, metadataSection) { 1524 var tag = ''; 1525 1526 var label = type && (type[0].toUpperCase() + type.slice(1)); 1527 var tag = type !== 'runtime' ? label : ''; 1528 1529 if (item) { 1530 $('<div class="additional-mm-info ' + type + '"></div>').appendTo(metadataSection); 1531 var mediaManagerInfoItem = $(metadataSection + ' .' + type); 1532 tag && mediaManagerInfoItem.html(label + ': '); 1533 mediaManagerInfoItem.append(item); 1534 } 1535 } 1536 1537 function fitMMVideo(elem) { 1538 var iFrame = elem; 1539 var aspectRatio = null; 1540 var actualPlayerWidth = iFrame.width(); 1541 var topBarHeight = 0; 1542 1543 1544 if (iFrame.attr("width") != '100%') { 1545 //for backwards compatibility use hardcoded old values for player dimensions 1546 try { 1547 var styleWidth = 512; 1548 var styleHeight = 288; 1549 aspectRatio = styleWidth / styleHeight; 1550 1551 iFrame.css({ 1552 "max-width": styleWidth, 1553 "max-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth, 1554 "min-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth 1555 }); 1556 } catch (e) { 1557 } 1558 } else { 1559 // the new player with width=100% and height=100% 1560 try { 1561 aspectRatio = 16 / 9; 1562 1563 if (iFrame.attr('src').indexOf('topbar=true') != -1) { 1564 topBarHeight = 40; 1565 } 1566 1567 iFrame.css({ 1568 "height": actualPlayerWidth / aspectRatio + topBarHeight, 1569 }); 1570 iFrame.parent().css({ 1571 "height": actualPlayerWidth / aspectRatio + topBarHeight, 1572 }); 1573 } catch (e) { 1574 } 1575 } 1576 } 1577 1578 function loadVideoIframe(response, playerObject, callsign) { 1579 var currentSettings = settingsMapping['c052d000-ab88-11f0-a499-f56d58164f6c']; 1580 template = response.player_code.template; 1581 var iframe = jQuery(template); 1582 iframe.attr('allow', 'encrypted-media'); 1583 iframe.attr('title', 'Video player'); 1584 /* WCAG 2.1 1.2.2: Ensure captions are enabled. The PBS partner player 1585 should have closed-caption tracks available by default. If captions 1586 are missing, content editors must provide them. */ 1587 1588 if (callsign) { 1589 iframe.attr('src', function (i, e) { 1590 return e += '&callsign=' + callsign; 1591 }) 1592 } 1593 iframe.attr('src', function (i, e) { 1594 return e += '&endscreen=' + !!currentSettings.endScreen; 1595 }) 1596 playerObject.html(iframe); 1597 fitMMVideo(iframe); 1598 iframe.on('load', function () { 1599 fitMMVideo(jQuery(this)); 1600 }); 1601 } 1602 1603 function loadVideoMetadata(currentSettings, item, metadataSection) { 1604 currentSettings.showTitle && 1605 $(metadataSection + ' .title').html(item.title); 1606 1607 currentSettings.showContentChannel && 1608 $(metadataSection + ' .channel').html(item.channel); 1609 1610 $(metadataSection + ' .additional-mm-info').remove(); 1611 if (currentSettings.showAdditionalMediaManagerInfo) { 1612 var mediaManagerInfoTypes = ['runtime', 'published', 'expires', 'rating']; 1613 var mediaManagerInfoTypesLength = mediaManagerInfoTypes.length; 1614 for (var i = 0; i <= mediaManagerInfoTypesLength; i++) { 1615 displayMMInfoItem(mediaManagerInfoTypes[i], item[mediaManagerInfoTypes[i]], metadataSection); 1616 } 1617 } 1618 1619 if (currentSettings.showDescription) { 1620 $(metadataSection + ' .description').remove(); 1621 $('<p class="description"></p>').appendTo(metadataSection); 1622 $(metadataSection + ' .description').html(item.description); 1623 } 1624 } 1625 1626 function loadMMVideo(componentId, index, currentPlaylist, currentSettings, c
1626allsign) { 1627 var youtubeWrapper = '#youtube-wrapper_' + componentId; 1628 var videoContainer = '#video-container_' + componentId; 1629 var videoComponent = '#video-component_' + componentId; 1630 var videoContainerWrapper = videoComponent + ' .video-container__wrapper'; 1631 var metadataSection = videoComponent + ' .video-info'; 1632 1633 $(youtubeWrapper).remove(); 1634 $(videoContainer).remove(); 1635 1636 var videoContainerEl = document.createElement('div'); 1637 videoContainerEl.id = 'video-container_' + componentId; 1638 videoContainerEl.className = 'video-container'; 1639 $(videoContainerWrapper).prepend(videoContainerEl); 1640 var videoId = currentPlaylist[index].videoId; 1641 var title = currentPlaylist[index].title; 1642 var partnerPlayerUrl = currentPlaylist[index].partnerPlayerUrl; 1643 var APIBaseURL = PBS.BentoConfig.APIBaseURL || '/'; 1644 var url = APIBaseURL + 'merlin_plugin/video_frame/'; 1645 url += partnerPlayerUrl ? partnerPlayerUrl : videoId; 1646 if (callsign) { 1647 url += '/?callsign=' + callsign + '&title=' + title; 1648 } 1649 url += '/'; 1650 $.ajax({ 1651 url: url, 1652 dataType: 'json', 1653 success: function (response) { 1654 var template, notAvailableImg; 1655 var playerObject = $('#video-container_' + componentId); 1656 var imgUrl = currentPlaylist[index].img.url; 1657 1658 if (response.player_code) { 1659 loadVideoIframe(response, playerObject, callsign); 1660 } else { 1661 var notAvailableVideo = $('<img />'); 1662 notAvailableVideo.attr('src', imgUrl); 1663 notAvailableVideo.attr('alt', 'Video is not available'); 1664 playerObject.html($(notAvailableVideo)); 1665 } 1666 1667 loadVideoMetadata(currentSettings, currentPlaylist[index], metadataSection); 1668 1669 }, 1670 error: function (xhr, status, err) { 1671 console.error(xhr, status, err.toString()); 1672 } 1673 }); 1674 } 1675 </script>
vendor: 1 bytes, line 1675
1675
1676<script> 1677 $(document).ready(function() { 1678 var currentPlaylist = playlistMapping['c052d000-ab88-11f0-a499-f56d58164f6c']; 1679 var currentSettings = settingsMapping['c052d000-ab88-11f0-a499-f56d58164f6c']; 1680 1681 window.youtubeIframeMap = window.youtubeIframeMap || {}; 1682 if(currentPlaylist[0].videoSource === 'youtube') { 1683 if (typeof window.youtubeIframeMap === 'undefined') { 1684 window.youtubeIframeMap = {}; 1685 } 1686 window.youtubeIframeMap['c052d000-ab88-11f0-a499-f56d58164f6c'] = { 1687 'playlist': currentPlaylist, 1688 'settings': currentSettings, 1689 }; 1690 } 1691 1692 //check if single video & no metadata 1693 if ((currentPlaylist.length === 1 || !currentSettings.showPlaylist) && 1694 !currentSettings.showTitle && 1695 !currentSettings.showContentChannel && 1696 !currentSettings.showDescription && 1697 !currentSettings.showAdditionalMediaManagerInfo){ 1698 $('#video-component_' + 'c052d000-ab88-11f0-a499-f56d58164f6c').css({border: 'none'}); 1699 } 1700 1701 // This code loads the IFrame Player API code asynchronously. 1702 var scriptTag = document.getElementById("youtube_iframe_api"); 1703 if(!scriptTag) { 1704 scriptTag = document.createElement('script'); 1705 scriptTag.src = "https://www.youtube.com/iframe_api"; 1706 scriptTag.id = "youtube_iframe_api"; 1707 var firstScriptTag = document.getElementsByTagName('script')[0]; 1708 firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag); 1709 } 1710 }) 1711 1712 // This function creates an <iframe> (and YouTube player) after the API code downloads. 1713 function onYouTubeIframeAPIReady() { 1714 for (var componentId in window.youtubeIframeMap) { 1715 var currentPlaylist = window.youtubeIframeMap[componentId]['playlist']; 1716 var currentSettings = window.youtubeIframeMap[componentId]['settings']; 1717 loadYoutubeVideo(componentId, 0, currentPlaylist, currentSettings); 1718 } 1719 } 1720 1721 function loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings) { 1722 var player, playerVars; 1723 var videoComponent = '#video-component_' + componentId; 1724 var youtubeWrapper = document.createElement('div'); 1725 youtubeWrapper.id = 'youtube-wrapper_' + componentId; 1726 youtubeWrapper.className = 'youtube-wrapper video-container'; 1727 1728 $('#video-container_' + componentId).remove(); 1729 $('#youtube-wrapper_' + componentId).remove(); 1730 var videoContainerEl = document.createElement('div'); 1731 videoContainerEl.id = 'video-container_' + componentId; 1732 1733 $(videoComponent + ' .video-container__wrapper').prepend(youtubeWrapper); 1734 1735 $(videoComponent + ' .youtube-wrapper').prepend(videoContainerEl); 1736 1737 playerVars = Object.assign({}, 1738 { cc_load_policy: 1 }, 1739 (currentPlaylist[index].rel === false) && { rel: 0 }, 1740 (currentPlaylist[index].controls === false) && { controls: 0 }, 1741 (currentPlaylist[index].fs === false) && { fs: 0 }, 1742 (currentPlaylist[index].autoplay === true) && { autoplay: 1 }, 1743 (currentPlaylist[index].start > 0) && { start: currentPlaylist[index].start }, 1744 (currentPlaylist[index].end > 0 && currentPlaylist[index].start < currentPlaylist[index].end) && { end: currentPlaylist[index].end } 1745 ); 1746 1747 player = new YT.Player('video-container_' + componentId, { 1748 videoId: currentPlaylist[index].videoId, 1749 playerVars 1750 }); 1751 1752 currentSettings.showTitle && 1753 $(videoComponent + ' .title').html(currentPlaylist[index].title); 1754 1755 currentSettings.showContentChannel && 1756 $(videoComponent + ' .channel').html(currentPlaylist[index].channel); 1757 1758 currentSettings.showDescription && 1759 $(videoComponent + ' .description').html(currentPlaylist[index].description); 1760 1761 $(videoComponent + ' .additional-mm-info').remove(); 1762 } 1763</script>
vendor: 1 bytes, line 1763
1763
1764<script> 1765 1766 var playlistJson = [ 1767 { 1768 "fs": true, 1769 "id": "85564154-b4b9-4122-a7cd-a271dd0077d8", 1770 "end": 0, 1771 "img": { 1772 "url": "https://i.ytimg.com/vi/e4VIV48ZB0M/maxresdefault.jpg", 1773 "isDefault": false 1774 }, 1775 "rel": true, 1776 "url": "https://www.youtube.com/watch?v=e4VIV48ZB0M", 1777 "start": 0, 1778 "title": "More Than Peach | Full Episode", 1779 "channel": "Kidzuko", 1780 "videoId": "e4VIV48ZB0M", 1781 "autoplay": false, 1782 "controls": true, 1783 "published": "", 1784 "description": "Grab your crayons and your imagination because we\u2019re reading More Than Peach, the inspiring story by Bellen Woodard, who at 9 years old showed us that beauty comes in every shade! The story is read aloud by actress Gabrielle Union, reminding us we\u2019re all more than peach. Then we catch up with Bellen again, now a 14-year-old CEO changing the world one crayon at a time! Plus, activist Blair Imani shows us how to stand up for the causes we care about, and we get crafty making our own homemade postcards. <br> ", 1785 "videoSource": "youtube", 1786 "titlePlaceholder": "Title", 1787 "channelPlaceholder": "Content channel", 1788 "descriptionPlaceholder": "Description" 1789 } 1790]; 1791 var settingsJson = { 1792 "endScreen": false, 1793 "showTitle": true, 1794 "showPlaylist": false, 1795 "playlistHeight": 4, 1796 "selectedRegions": [ 1797 { 1798 "label": "US", 1799 "value": "US" 1800 } 1801 ], 1802 "showDescription": true, 1803 "showContentChannel": true, 1804 "showAdditionalMediaManagerInfo": true 1805} 1806 1807 1808 1809 function updatePlaylistHeaderTabindex(componentId) { 1810 var playlistHeader = document.getElementById('playlist-header_' + componentId); 1811 if (!playlistHeader) return; 1812 var caret = playlistHeader.querySelector('.dropdown-caret'); 1813 if (window.innerWidth > 1023) { 1814 // On desktop with one-column layout, playlist header is not interactive 1815 if (caret && window.getComputedStyle(caret).display === 'none') { 1816 playlistHeader.disabled = true; 1817 playlistHeader.setAttribute('aria-disabled', 'true'); 1818 playlistHeader.setAttribute('tabindex', '-1'); 1819 } else { 1820 playlistHeader.disabled = false; 1821 playlistHeader.removeAttribute('aria-disabled'); 1822 playlistHeader.setAttribute('tabindex', '0'); 1823 } 1824 } else { 1825 playlistHeader.disabled = false; 1826 playlistHeader.removeAttribute('aria-disabled'); 1827 playlistHeader.setAttribute('tabindex', '0'); 1828 } 1829 } 1830 $(window).on('load', function(){ 1831 resizePlaylist('c052d000-ab88-11f0-a499-f56d58164f6c'); 1832 updatePlaylistHeaderTabindex('c052d000-ab88-11f0-a499-f56d58164f6c'); 1833 }); 1834 $(window).resize(function(){ 1835 resizePlaylist('c052d000-ab88-11f0-a499-f56d58164f6c'); 1836 updatePlaylistHeaderTabindex('c052d000-ab88-11f0-a499-f56d58164f6c'); 1837 }); 1838 1839 if (typeof window.playlistMapping === 'undefined') { 1840 window.playlistMapping = {}; 1841 } 1842 1843 if (typeof window.settingsMapping === 'undefined') { 1844 window.settingsMapping = {}; 1845 } 1846 window.playlistMapping['c052d000-ab88-11f0-a499-f56d58164f6c'] = playlistJson; 1847 window.settingsMapping['c052d000-ab88-11f0-a499-f56d58164f6c'] = settingsJson; 1848 1849 function resizePlaylist(componentId) { 1850 const videoComponent = $('#video-component_' + componentId); 1851 const playlistWrapper = videoComponent.find('.playlist__wrapper'); 1852 const playlistBody = playlistWrapper.find('.playlist-body'); 1853 const isSmallPlaylist = playlistWrapper.hasClass('playlist-sm'); 1854 const isLargeWindow = $(window).width() >= 1024; 1855 const isOneColWithPlaylist = videoComponent.hasClass('column-12'); 1856 if (isOneColWithPlaylist) { 1857 if(isLargeWindow) { 1858 const mainVideoHeight = videoComponent.find('.video-container').outerHeight() + 1859 videoComponent.find('.video-info').outerHeight() + 1860 (videoComponent.find('.video-cta-container').outerHeight(true) || 0); 1861 const playlistHeaderHeight = $('#playlist-header_' + componentId).outerHeight(); 1862 1863 playlistWrapper.css('height', mainVideoHeight + 'px'); 1864 playlistBody.css('max-height', (mainVideoHeight - playlistHeaderHeight) + 'px'); 1865 } 1866 else { 1867 playlistWrapper.css('height', 'auto'); 1868 playlistBody.css('max-height', '400px'); 1869 } 1870 } 1871 if(isSmallPlaylist){ 1872 const playlistItemImgWrapper = playlistWrapper.find('.playlist-item-img-wrapper'); 1873 const playlistItemInfo = playlistWrapper.find('.playlist-item-info'); 1874 if(!isLargeWindow) { 1875 $(playlistItemImgWrapper).removeClass('span6'); 1876 $(playlistItemInfo).removeClass('span6'); 1877 $(playlistItemImgWrapper).addClass('span4'); 1878 $(playlistItemInfo).addClass('span8'); 1879 } 1880 else { 1881 $(playlistItemImgWrapper).removeClass('span4'); 1882 $(playlistItemInfo).removeClass('span8'); 1883 $(playlistItemImgWrapper).addClass('span6'); 1884 $(playlistItemInfo).addClass('span6'); 1885 } 1886 } 1887 1888 } 1889 1890 function selectPlaylistItem(componentId, index, videoSource) { 1891 var currentPlaylist = playlistMapping[componentId]; 1892 var currentSettings = settingsMapping[componentId]; 1893 switch(videoSource) { 1894 case 'cove': 1895 loadMMVideo(componentId, index, currentPlaylist, currentSettings); 1896 break; 1897 case 'youtube': 1898 loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings); 1899 break; 1900 default: 1901 loadDefault(componentId, index, currentPlaylist, currentSettings); 1902 break; 1903 } 1904 1905 } 1906 1907 function loadDefault(componentId, index, currentPlaylist, currentSettings) { 1908 var youtubeWrapper = '#youtube-wrapper_' + componentId; 1909 var videoContainer = '#video-container_' + componentId; 1910 var videoComponent = '#video-component_' + componentId; 1911 1912 $(youtubeWrapper).remove(); 1913 $(videoContainer).remove(); 1914 1915 var videoContainerEl = document.createElement('div'); 1916 videoContainerEl.id = 'video-container_' + componentId; 1917 videoContainerEl.className = 'video-container'; 1918 $(videoComponent + ' .video-container__wrapper').prepend(vi
1918deoContainerEl); 1919 1920 var defaultImg = document.createElement('img'); 1921 defaultImg.alt = currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder; 1922 defaultImg.src = currentPlaylist[index].img.url; 1923 $(videoContainerEl).prepend(defaultImg); 1924 1925 currentSettings.showTitle && 1926 $(videoComponent + ' .title').html(currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder); 1927 1928 currentSettings.showContentChannel && 1929 $(videoComponent + ' .channel').html(currentPlaylist[index].channel||currentPlaylist[index].channelPlaceholder); 1930 1931 currentSettings.showDescription && 1932 $(videoComponent + ' .description').html(currentPlaylist[index].description||currentPlaylist[index].descriptionPlaceholder); 1933 1934 $(videoComponent + ' .additional-mm-info').remove(); 1935 } 1936 1937 function showCurrentIndex(index, componentId) { 1938 var itemsCount = $('#playlist-items-count_' + componentId); 1939 var currentItem = itemsCount.children('span'); 1940 currentItem.text(index + '/'); 1941 } 1942 1943 function togglePlaylist(componentId) { 1944 var playlistHeader = $('#playlist-header_' + componentId); 1945 // Do not toggle if the header is disabled 1946 if (playlistHeader.prop('disabled')) return; 1947 var caret = playlistHeader.find('.dropdown-caret'); 1948 // Only toggle if the caret is visible (not just present in DOM) 1949 if (caret.length && caret.is(':visible')) { 1950 var playlistBody = $('#playlist-body_' + componentId); 1951 playlistBody.css('overflow', 'auto'); 1952 playlistBody.slideToggle('slow', function(){ playlistBody.css('overflow','auto') }); 1953 playlistHeader.find('i').toggleClass('fa-caret-up fa-caret-down'); 1954 // Toggle aria-expanded for accessibility 1955 var isExpanded = playlistHeader.attr('aria-expanded') === 'true'; 1956 playlistHeader.attr('aria-expanded', !isExpanded); 1957 } 1958 } 1959 1960</script>
vendor: 1 bytes, line 1960
1960
1961<script> 1962 $(document).ready(function () { 1963 var currentPlaylist = playlistMapping['879adaa0-ab88-11f0-a499-f56d58164f6c']; 1964 var currentSettings = settingsMapping['879adaa0-ab88-11f0-a499-f56d58164f6c']; 1965 $('.playlist-item').on('click', function () { 1966 $(this).addClass('selected-item').siblings().removeClass('selected-item'); 1967 }); 1968 if (currentPlaylist[0].videoSource === 'cove') { 1969 loadMMVideo('879adaa0-ab88-11f0-a499-f56d58164f6c', 0, currentPlaylist, currentSettings, 'WNED'); 1970 } 1971 }); 1972 1973 function displayMMInfoItem(type, item, metadataSection) { 1974 var tag = ''; 1975 1976 var label = type && (type[0].toUpperCase() + type.slice(1)); 1977 var tag = type !== 'runtime' ? label : ''; 1978 1979 if (item) { 1980 $('<div class="additional-mm-info ' + type + '"></div>').appendTo(metadataSection); 1981 var mediaManagerInfoItem = $(metadataSection + ' .' + type); 1982 tag && mediaManagerInfoItem.html(label + ': '); 1983 mediaManagerInfoItem.append(item); 1984 } 1985 } 1986 1987 function fitMMVideo(elem) { 1988 var iFrame = elem; 1989 var aspectRatio = null; 1990 var actualPlayerWidth = iFrame.width(); 1991 var topBarHeight = 0; 1992 1993 1994 if (iFrame.attr("width") != '100%') { 1995 //for backwards compatibility use hardcoded old values for player dimensions 1996 try { 1997 var styleWidth = 512; 1998 var styleHeight = 288; 1999 aspectRatio = styleWidth / styleHeight; 2000 2001 iFrame.css({ 2002 "max-width": styleWidth, 2003 "max-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth, 2004 "min-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth 2005 }); 2006 } catch (e) { 2007 } 2008 } else { 2009 // the new player with width=100% and height=100% 2010 try { 2011 aspectRatio = 16 / 9; 2012 2013 if (iFrame.attr('src').indexOf('topbar=true') != -1) { 2014 topBarHeight = 40; 2015 } 2016 2017 iFrame.css({ 2018 "height": actualPlayerWidth / aspectRatio + topBarHeight, 2019 }); 2020 iFrame.parent().css({ 2021 "height": actualPlayerWidth / aspectRatio + topBarHeight, 2022 }); 2023 } catch (e) { 2024 } 2025 } 2026 } 2027 2028 function loadVideoIframe(response, playerObject, callsign) { 2029 var currentSettings = settingsMapping['879adaa0-ab88-11f0-a499-f56d58164f6c']; 2030 template = response.player_code.template; 2031 var iframe = jQuery(template); 2032 iframe.attr('allow', 'encrypted-media'); 2033 iframe.attr('title', 'Video player'); 2034 /* WCAG 2.1 1.2.2: Ensure captions are enabled. The PBS partner player 2035 should have closed-caption tracks available by default. If captions 2036 are missing, content editors must provide them. */ 2037 2038 if (callsign) { 2039 iframe.attr('src', function (i, e) { 2040 return e += '&callsign=' + callsign; 2041 }) 2042 } 2043 iframe.attr('src', function (i, e) { 2044 return e += '&endscreen=' + !!currentSettings.endScreen; 2045 }) 2046 playerObject.html(iframe); 2047 fitMMVideo(iframe); 2048 iframe.on('load', function () { 2049 fitMMVideo(jQuery(this)); 2050 }); 2051 } 2052 2053 function loadVideoMetadata(currentSettings, item, metadataSection) { 2054 currentSettings.showTitle && 2055 $(metadataSection + ' .title').html(item.title); 2056 2057 currentSettings.showContentChannel && 2058 $(metadataSection + ' .channel').html(item.channel); 2059 2060 $(metadataSection + ' .additional-mm-info').remove(); 2061 if (currentSettings.showAdditionalMediaManagerInfo) { 2062 var mediaManagerInfoTypes = ['runtime', 'published', 'expires', 'rating']; 2063 var mediaManagerInfoTypesLength = mediaManagerInfoTypes.length; 2064 for (var i = 0; i <= mediaManagerInfoTypesLength; i++) { 2065 displayMMInfoItem(mediaManagerInfoTypes[i], item[mediaManagerInfoTypes[i]], metadataSection); 2066 } 2067 } 2068 2069 if (currentSettings.showDescription) { 2070 $(metadataSection + ' .description').remove(); 2071 $('<p class="description"></p>').appendTo(metadataSection); 2072 $(metadataSection + ' .description').html(item.description); 2073 } 2074 } 2075 2076 function loadMMVideo(componentId, index, currentPlaylist, currentSettings, c
2076allsign) { 2077 var youtubeWrapper = '#youtube-wrapper_' + componentId; 2078 var videoContainer = '#video-container_' + componentId; 2079 var videoComponent = '#video-component_' + componentId; 2080 var videoContainerWrapper = videoComponent + ' .video-container__wrapper'; 2081 var metadataSection = videoComponent + ' .video-info'; 2082 2083 $(youtubeWrapper).remove(); 2084 $(videoContainer).remove(); 2085 2086 var videoContainerEl = document.createElement('div'); 2087 videoContainerEl.id = 'video-container_' + componentId; 2088 videoContainerEl.className = 'video-container'; 2089 $(videoContainerWrapper).prepend(videoContainerEl); 2090 var videoId = currentPlaylist[index].videoId; 2091 var title = currentPlaylist[index].title; 2092 var partnerPlayerUrl = currentPlaylist[index].partnerPlayerUrl; 2093 var APIBaseURL = PBS.BentoConfig.APIBaseURL || '/'; 2094 var url = APIBaseURL + 'merlin_plugin/video_frame/'; 2095 url += partnerPlayerUrl ? partnerPlayerUrl : videoId; 2096 if (callsign) { 2097 url += '/?callsign=' + callsign + '&title=' + title; 2098 } 2099 url += '/'; 2100 $.ajax({ 2101 url: url, 2102 dataType: 'json', 2103 success: function (response) { 2104 var template, notAvailableImg; 2105 var playerObject = $('#video-container_' + componentId); 2106 var imgUrl = currentPlaylist[index].img.url; 2107 2108 if (response.player_code) { 2109 loadVideoIframe(response, playerObject, callsign); 2110 } else { 2111 var notAvailableVideo = $('<img />'); 2112 notAvailableVideo.attr('src', imgUrl); 2113 notAvailableVideo.attr('alt', 'Video is not available'); 2114 playerObject.html($(notAvailableVideo)); 2115 } 2116 2117 loadVideoMetadata(currentSettings, currentPlaylist[index], metadataSection); 2118 2119 }, 2120 error: function (xhr, status, err) { 2121 console.error(xhr, status, err.toString()); 2122 } 2123 }); 2124 } 2125 </script>
vendor: 1 bytes, line 2125
2125
2126<script> 2127 $(document).ready(function() { 2128 var currentPlaylist = playlistMapping['879adaa0-ab88-11f0-a499-f56d58164f6c']; 2129 var currentSettings = settingsMapping['879adaa0-ab88-11f0-a499-f56d58164f6c']; 2130 2131 window.youtubeIframeMap = window.youtubeIframeMap || {}; 2132 if(currentPlaylist[0].videoSource === 'youtube') { 2133 if (typeof window.youtubeIframeMap === 'undefined') { 2134 window.youtubeIframeMap = {}; 2135 } 2136 window.youtubeIframeMap['879adaa0-ab88-11f0-a499-f56d58164f6c'] = { 2137 'playlist': currentPlaylist, 2138 'settings': currentSettings, 2139 }; 2140 } 2141 2142 //check if single video & no metadata 2143 if ((currentPlaylist.length === 1 || !currentSettings.showPlaylist) && 2144 !currentSettings.showTitle && 2145 !currentSettings.showContentChannel && 2146 !currentSettings.showDescription && 2147 !currentSettings.showAdditionalMediaManagerInfo){ 2148 $('#video-component_' + '879adaa0-ab88-11f0-a499-f56d58164f6c').css({border: 'none'}); 2149 } 2150 2151 // This code loads the IFrame Player API code asynchronously. 2152 var scriptTag = document.getElementById("youtube_iframe_api"); 2153 if(!scriptTag) { 2154 scriptTag = document.createElement('script'); 2155 scriptTag.src = "https://www.youtube.com/iframe_api"; 2156 scriptTag.id = "youtube_iframe_api"; 2157 var firstScriptTag = document.getElementsByTagName('script')[0]; 2158 firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag); 2159 } 2160 }) 2161 2162 // This function creates an <iframe> (and YouTube player) after the API code downloads. 2163 function onYouTubeIframeAPIReady() { 2164 for (var componentId in window.youtubeIframeMap) { 2165 var currentPlaylist = window.youtubeIframeMap[componentId]['playlist']; 2166 var currentSettings = window.youtubeIframeMap[componentId]['settings']; 2167 loadYoutubeVideo(componentId, 0, currentPlaylist, currentSettings); 2168 } 2169 } 2170 2171 function loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings) { 2172 var player, playerVars; 2173 var videoComponent = '#video-component_' + componentId; 2174 var youtubeWrapper = document.createElement('div'); 2175 youtubeWrapper.id = 'youtube-wrapper_' + componentId; 2176 youtubeWrapper.className = 'youtube-wrapper video-container'; 2177 2178 $('#video-container_' + componentId).remove(); 2179 $('#youtube-wrapper_' + componentId).remove(); 2180 var videoContainerEl = document.createElement('div'); 2181 videoContainerEl.id = 'video-container_' + componentId; 2182 2183 $(videoComponent + ' .video-container__wrapper').prepend(youtubeWrapper); 2184 2185 $(videoComponent + ' .youtube-wrapper').prepend(videoContainerEl); 2186 2187 playerVars = Object.assign({}, 2188 { cc_load_policy: 1 }, 2189 (currentPlaylist[index].rel === false) && { rel: 0 }, 2190 (currentPlaylist[index].controls === false) && { controls: 0 }, 2191 (currentPlaylist[index].fs === false) && { fs: 0 }, 2192 (currentPlaylist[index].autoplay === true) && { autoplay: 1 }, 2193 (currentPlaylist[index].start > 0) && { start: currentPlaylist[index].start }, 2194 (currentPlaylist[index].end > 0 && currentPlaylist[index].start < currentPlaylist[index].end) && { end: currentPlaylist[index].end } 2195 ); 2196 2197 player = new YT.Player('video-container_' + componentId, { 2198 videoId: currentPlaylist[index].videoId, 2199 playerVars 2200 }); 2201 2202 currentSettings.showTitle && 2203 $(videoComponent + ' .title').html(currentPlaylist[index].title); 2204 2205 currentSettings.showContentChannel && 2206 $(videoComponent + ' .channel').html(currentPlaylist[index].channel); 2207 2208 currentSettings.showDescription && 2209 $(videoComponent + ' .description').html(currentPlaylist[index].description); 2210 2211 $(videoComponent + ' .additional-mm-info').remove(); 2212 } 2213</script>
vendor: 1 bytes, line 2213
2213
2214<script> 2215 2216 var playlistJson = [ 2217 { 2218 "fs": true, 2219 "id": "7f4d324c-1a7d-40b3-83f9-5710f7631995", 2220 "end": 0, 2221 "img": { 2222 "url": "https://i.ytimg.com/vi/q2TfLbwiQNs/maxresdefault.jpg", 2223 "isDefault": false 2224 }, 2225 "rel": false, 2226 "url": "https://www.youtube.com/watch?v=q2TfLbwiQNs", 2227 "start": 0, 2228 "title": "Tiny Troubles: Nelli's Purpose | Full Episode", 2229 "channel": "Kidzuko", 2230 "videoId": "q2TfLbwiQNs", 2231 "autoplay": false, 2232 "controls": true, 2233 "published": "", 2234 "description": "Mychal The Librarian shares the many ways someone can find their purpose, while Chrissy Teigen and John Legend read a story about two best friends on a journey to find theirs. Along the way, we meet people fulfilling their unique purposes in the real world and build buzzing bee buffets as we learn all about a bee\u2019s special role in nature. ", 2235 "videoSource": "youtube", 2236 "titlePlaceholder": "Title", 2237 "channelPlaceholder": "Content channel", 2238 "descriptionPlaceholder": "Description" 2239 } 2240]; 2241 var settingsJson = { 2242 "endScreen": false, 2243 "showTitle": true, 2244 "showPlaylist": false, 2245 "playlistHeight": 4, 2246 "selectedRegions": [ 2247 { 2248 "label": "US", 2249 "value": "US" 2250 } 2251 ], 2252 "showDescription": true, 2253 "showContentChannel": true, 2254 "showAdditionalMediaManagerInfo": true 2255} 2256 2257 2258 2259 function updatePlaylistHeaderTabindex(componentId) { 2260 var playlistHeader = document.getElementById('playlist-header_' + componentId); 2261 if (!playlistHeader) return; 2262 var caret = playlistHeader.querySelector('.dropdown-caret'); 2263 if (window.innerWidth > 1023) { 2264 // On desktop with one-column layout, playlist header is not interactive 2265 if (caret && window.getComputedStyle(caret).display === 'none') { 2266 playlistHeader.disabled = true; 2267 playlistHeader.setAttribute('aria-disabled', 'true'); 2268 playlistHeader.setAttribute('tabindex', '-1'); 2269 } else { 2270 playlistHeader.disabled = false; 2271 playlistHeader.removeAttribute('aria-disabled'); 2272 playlistHeader.setAttribute('tabindex', '0'); 2273 } 2274 } else { 2275 playlistHeader.disabled = false; 2276 playlistHeader.removeAttribute('aria-disabled'); 2277 playlistHeader.setAttribute('tabindex', '0'); 2278 } 2279 } 2280 $(window).on('load', function(){ 2281 resizePlaylist('879adaa0-ab88-11f0-a499-f56d58164f6c'); 2282 updatePlaylistHeaderTabindex('879adaa0-ab88-11f0-a499-f56d58164f6c'); 2283 }); 2284 $(window).resize(function(){ 2285 resizePlaylist('879adaa0-ab88-11f0-a499-f56d58164f6c'); 2286 updatePlaylistHeaderTabindex('879adaa0-ab88-11f0-a499-f56d58164f6c'); 2287 }); 2288 2289 if (typeof window.playlistMapping === 'undefined') { 2290 window.playlistMapping = {}; 2291 } 2292 2293 if (typeof window.settingsMapping === 'undefined') { 2294 window.settingsMapping = {}; 2295 } 2296 window.playlistMapping['879adaa0-ab88-11f0-a499-f56d58164f6c'] = playlistJson; 2297 window.settingsMapping['879adaa0-ab88-11f0-a499-f56d58164f6c'] = settingsJson; 2298 2299 function resizePlaylist(componentId) { 2300 const videoComponent = $('#video-component_' + componentId); 2301 const playlistWrapper = videoComponent.find('.playlist__wrapper'); 2302 const playlistBody = playlistWrapper.find('.playlist-body'); 2303 const isSmallPlaylist = playlistWrapper.hasClass('playlist-sm'); 2304 const isLargeWindow = $(window).width() >= 1024; 2305 const isOneColWithPlaylist = videoComponent.hasClass('column-12'); 2306 if (isOneColWithPlaylist) { 2307 if(isLargeWindow) { 2308 const mainVideoHeight = videoComponent.find('.video-container').outerHeight() + 2309 videoComponent.find('.video-info').outerHeight() + 2310 (videoComponent.find('.video-cta-container').outerHeight(true) || 0); 2311 const playlistHeaderHeight = $('#playlist-header_' + componentId).outerHeight(); 2312 2313 playlistWrapper.css('height', mainVideoHeight + 'px'); 2314 playlistBody.css('max-height', (mainVideoHeight - playlistHeaderHeight) + 'px'); 2315 } 2316 else { 2317 playlistWrapper.css('height', 'auto'); 2318 playlistBody.css('max-height', '400px'); 2319 } 2320 } 2321 if(isSmallPlaylist){ 2322 const playlistItemImgWrapper = playlistWrapper.find('.playlist-item-img-wrapper'); 2323 const playlistItemInfo = playlistWrapper.find('.playlist-item-info'); 2324 if(!isLargeWindow) { 2325 $(playlistItemImgWrapper).removeClass('span6'); 2326 $(playlistItemInfo).removeClass('span6'); 2327 $(playlistItemImgWrapper).addClass('span4'); 2328 $(playlistItemInfo).addClass('span8'); 2329 } 2330 else { 2331 $(playlistItemImgWrapper).removeClass('span4'); 2332 $(playlistItemInfo).removeClass('span8'); 2333 $(playlistItemImgWrapper).addClass('span6'); 2334 $(playlistItemInfo).addClass('span6'); 2335 } 2336 } 2337 2338 } 2339 2340 function selectPlaylistItem(componentId, index, videoSource) { 2341 var currentPlaylist = playlistMapping[componentId]; 2342 var currentSettings = settingsMapping[componentId]; 2343 switch(videoSource) { 2344 case 'cove': 2345 loadMMVideo(componentId, index, currentPlaylist, currentSettings); 2346 break; 2347 case 'youtube': 2348 loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings); 2349 break; 2350 default: 2351 loadDefault(componentId, index, currentPlaylist, currentSettings); 2352 break; 2353 } 2354 2355 } 2356 2357 function loadDefault(componentId, index, currentPlaylist, currentSettings) { 2358 var youtubeWrapper = '#youtube-wrapper_' + componentId; 2359 var videoContainer = '#video-container_' + componentId; 2360 var videoComponent = '#video-component_' + componentId; 2361 2362 $(youtubeWrapper).remove(); 2363 $(videoContainer).remove(); 2364 2365 var videoContainerEl = document.createElement('div'); 2366 videoContainerEl.id = 'video-container_' + componentId; 2367 videoContainerEl.className = 'video-container'; 2368 $(videoComponent + ' .video-container__wrapper').prepend(vi
2368deoContainerEl); 2369 2370 var defaultImg = document.createElement('img'); 2371 defaultImg.alt = currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder; 2372 defaultImg.src = currentPlaylist[index].img.url; 2373 $(videoContainerEl).prepend(defaultImg); 2374 2375 currentSettings.showTitle && 2376 $(videoComponent + ' .title').html(currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder); 2377 2378 currentSettings.showContentChannel && 2379 $(videoComponent + ' .channel').html(currentPlaylist[index].channel||currentPlaylist[index].channelPlaceholder); 2380 2381 currentSettings.showDescription && 2382 $(videoComponent + ' .description').html(currentPlaylist[index].description||currentPlaylist[index].descriptionPlaceholder); 2383 2384 $(videoComponent + ' .additional-mm-info').remove(); 2385 } 2386 2387 function showCurrentIndex(index, componentId) { 2388 var itemsCount = $('#playlist-items-count_' + componentId); 2389 var currentItem = itemsCount.children('span'); 2390 currentItem.text(index + '/'); 2391 } 2392 2393 function togglePlaylist(componentId) { 2394 var playlistHeader = $('#playlist-header_' + componentId); 2395 // Do not toggle if the header is disabled 2396 if (playlistHeader.prop('disabled')) return; 2397 var caret = playlistHeader.find('.dropdown-caret'); 2398 // Only toggle if the caret is visible (not just present in DOM) 2399 if (caret.length && caret.is(':visible')) { 2400 var playlistBody = $('#playlist-body_' + componentId); 2401 playlistBody.css('overflow', 'auto'); 2402 playlistBody.slideToggle('slow', function(){ playlistBody.css('overflow','auto') }); 2403 playlistHeader.find('i').toggleClass('fa-caret-up fa-caret-down'); 2404 // Toggle aria-expanded for accessibility 2405 var isExpanded = playlistHeader.attr('aria-expanded') === 'true'; 2406 playlistHeader.attr('aria-expanded', !isExpanded); 2407 } 2408 } 2409 2410</script>
vendor: 1 bytes, line 2410
2410
2411<script> 2412 $(document).ready(function () { 2413 var currentPlaylist = playlistMapping['428bb740-ab88-11f0-a499-f56d58164f6c']; 2414 var currentSettings = settingsMapping['428bb740-ab88-11f0-a499-f56d58164f6c']; 2415 $('.playlist-item').on('click', function () { 2416 $(this).addClass('selected-item').siblings().removeClass('selected-item'); 2417 }); 2418 if (currentPlaylist[0].videoSource === 'cove') { 2419 loadMMVideo('428bb740-ab88-11f0-a499-f56d58164f6c', 0, currentPlaylist, currentSettings, 'WNED'); 2420 } 2421 }); 2422 2423 function displayMMInfoItem(type, item, metadataSection) { 2424 var tag = ''; 2425 2426 var label = type && (type[0].toUpperCase() + type.slice(1)); 2427 var tag = type !== 'runtime' ? label : ''; 2428 2429 if (item) { 2430 $('<div class="additional-mm-info ' + type + '"></div>').appendTo(metadataSection); 2431 var mediaManagerInfoItem = $(metadataSection + ' .' + type); 2432 tag && mediaManagerInfoItem.html(label + ': '); 2433 mediaManagerInfoItem.append(item); 2434 } 2435 } 2436 2437 function fitMMVideo(elem) { 2438 var iFrame = elem; 2439 var aspectRatio = null; 2440 var actualPlayerWidth = iFrame.width(); 2441 var topBarHeight = 0; 2442 2443 2444 if (iFrame.attr("width") != '100%') { 2445 //for backwards compatibility use hardcoded old values for player dimensions 2446 try { 2447 var styleWidth = 512; 2448 var styleHeight = 288; 2449 aspectRatio = styleWidth / styleHeight; 2450 2451 iFrame.css({ 2452 "max-width": styleWidth, 2453 "max-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth, 2454 "min-height": actualPlayerWidth * styleHeight / styleWidth > styleHeight ? styleHeight : actualPlayerWidth * styleHeight / styleWidth 2455 }); 2456 } catch (e) { 2457 } 2458 } else { 2459 // the new player with width=100% and height=100% 2460 try { 2461 aspectRatio = 16 / 9; 2462 2463 if (iFrame.attr('src').indexOf('topbar=true') != -1) { 2464 topBarHeight = 40; 2465 } 2466 2467 iFrame.css({ 2468 "height": actualPlayerWidth / aspectRatio + topBarHeight, 2469 }); 2470 iFrame.parent().css({ 2471 "height": actualPlayerWidth / aspectRatio + topBarHeight, 2472 }); 2473 } catch (e) { 2474 } 2475 } 2476 } 2477 2478 function loadVideoIframe(response, playerObject, callsign) { 2479 var currentSettings = settingsMapping['428bb740-ab88-11f0-a499-f56d58164f6c']; 2480 template = response.player_code.template; 2481 var iframe = jQuery(template); 2482 iframe.attr('allow', 'encrypted-media'); 2483 iframe.attr('title', 'Video player'); 2484 /* WCAG 2.1 1.2.2: Ensure captions are enabled. The PBS partner player 2485 should have closed-caption tracks available by default. If captions 2486 are missing, content editors must provide them. */ 2487 2488 if (callsign) { 2489 iframe.attr('src', function (i, e) { 2490 return e += '&callsign=' + callsign; 2491 }) 2492 } 2493 iframe.attr('src', function (i, e) { 2494 return e += '&endscreen=' + !!currentSettings.endScreen; 2495 }) 2496 playerObject.html(iframe); 2497 fitMMVideo(iframe); 2498 iframe.on('load', function () { 2499 fitMMVideo(jQuery(this)); 2500 }); 2501 } 2502 2503 function loadVideoMetadata(currentSettings, item, metadataSection) { 2504 currentSettings.showTitle && 2505 $(metadataSection + ' .title').html(item.title); 2506 2507 currentSettings.showContentChannel && 2508 $(metadataSection + ' .channel').html(item.channel); 2509 2510 $(metadataSection + ' .additional-mm-info').remove(); 2511 if (currentSettings.showAdditionalMediaManagerInfo) { 2512 var mediaManagerInfoTypes = ['runtime', 'published', 'expires', 'rating']; 2513 var mediaManagerInfoTypesLength = mediaManagerInfoTypes.length; 2514 for (var i = 0; i <= mediaManagerInfoTypesLength; i++) { 2515 displayMMInfoItem(mediaManagerInfoTypes[i], item[mediaManagerInfoTypes[i]], metadataSection); 2516 } 2517 } 2518 2519 if (currentSettings.showDescription) { 2520 $(metadataSection + ' .description').remove(); 2521 $('<p class="description"></p>').appendTo(metadataSection); 2522 $(metadataSection + ' .description').html(item.description); 2523 } 2524 } 2525 2526 function loadMMVideo(componentId, index, currentPlaylist, currentSettings, c
2526allsign) { 2527 var youtubeWrapper = '#youtube-wrapper_' + componentId; 2528 var videoContainer = '#video-container_' + componentId; 2529 var videoComponent = '#video-component_' + componentId; 2530 var videoContainerWrapper = videoComponent + ' .video-container__wrapper'; 2531 var metadataSection = videoComponent + ' .video-info'; 2532 2533 $(youtubeWrapper).remove(); 2534 $(videoContainer).remove(); 2535 2536 var videoContainerEl = document.createElement('div'); 2537 videoContainerEl.id = 'video-container_' + componentId; 2538 videoContainerEl.className = 'video-container'; 2539 $(videoContainerWrapper).prepend(videoContainerEl); 2540 var videoId = currentPlaylist[index].videoId; 2541 var title = currentPlaylist[index].title; 2542 var partnerPlayerUrl = currentPlaylist[index].partnerPlayerUrl; 2543 var APIBaseURL = PBS.BentoConfig.APIBaseURL || '/'; 2544 var url = APIBaseURL + 'merlin_plugin/video_frame/'; 2545 url += partnerPlayerUrl ? partnerPlayerUrl : videoId; 2546 if (callsign) { 2547 url += '/?callsign=' + callsign + '&title=' + title; 2548 } 2549 url += '/'; 2550 $.ajax({ 2551 url: url, 2552 dataType: 'json', 2553 success: function (response) { 2554 var template, notAvailableImg; 2555 var playerObject = $('#video-container_' + componentId); 2556 var imgUrl = currentPlaylist[index].img.url; 2557 2558 if (response.player_code) { 2559 loadVideoIframe(response, playerObject, callsign); 2560 } else { 2561 var notAvailableVideo = $('<img />'); 2562 notAvailableVideo.attr('src', imgUrl); 2563 notAvailableVideo.attr('alt', 'Video is not available'); 2564 playerObject.html($(notAvailableVideo)); 2565 } 2566 2567 loadVideoMetadata(currentSettings, currentPlaylist[index], metadataSection); 2568 2569 }, 2570 error: function (xhr, status, err) { 2571 console.error(xhr, status, err.toString()); 2572 } 2573 }); 2574 } 2575 </script>
vendor: 1 bytes, line 2575
2575
2576<script> 2577 $(document).ready(function() { 2578 var currentPlaylist = playlistMapping['428bb740-ab88-11f0-a499-f56d58164f6c']; 2579 var currentSettings = settingsMapping['428bb740-ab88-11f0-a499-f56d58164f6c']; 2580 2581 window.youtubeIframeMap = window.youtubeIframeMap || {}; 2582 if(currentPlaylist[0].videoSource === 'youtube') { 2583 if (typeof window.youtubeIframeMap === 'undefined') { 2584 window.youtubeIframeMap = {}; 2585 } 2586 window.youtubeIframeMap['428bb740-ab88-11f0-a499-f56d58164f6c'] = { 2587 'playlist': currentPlaylist, 2588 'settings': currentSettings, 2589 }; 2590 } 2591 2592 //check if single video & no metadata 2593 if ((currentPlaylist.length === 1 || !currentSettings.showPlaylist) && 2594 !currentSettings.showTitle && 2595 !currentSettings.showContentChannel && 2596 !currentSettings.showDescription && 2597 !currentSettings.showAdditionalMediaManagerInfo){ 2598 $('#video-component_' + '428bb740-ab88-11f0-a499-f56d58164f6c').css({border: 'none'}); 2599 } 2600 2601 // This code loads the IFrame Player API code asynchronously. 2602 var scriptTag = document.getElementById("youtube_iframe_api"); 2603 if(!scriptTag) { 2604 scriptTag = document.createElement('script'); 2605 scriptTag.src = "https://www.youtube.com/iframe_api"; 2606 scriptTag.id = "youtube_iframe_api"; 2607 var firstScriptTag = document.getElementsByTagName('script')[0]; 2608 firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag); 2609 } 2610 }) 2611 2612 // This function creates an <iframe> (and YouTube player) after the API code downloads. 2613 function onYouTubeIframeAPIReady() { 2614 for (var componentId in window.youtubeIframeMap) { 2615 var currentPlaylist = window.youtubeIframeMap[componentId]['playlist']; 2616 var currentSettings = window.youtubeIframeMap[componentId]['settings']; 2617 loadYoutubeVideo(componentId, 0, currentPlaylist, currentSettings); 2618 } 2619 } 2620 2621 function loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings) { 2622 var player, playerVars; 2623 var videoComponent = '#video-component_' + componentId; 2624 var youtubeWrapper = document.createElement('div'); 2625 youtubeWrapper.id = 'youtube-wrapper_' + componentId; 2626 youtubeWrapper.className = 'youtube-wrapper video-container'; 2627 2628 $('#video-container_' + componentId).remove(); 2629 $('#youtube-wrapper_' + componentId).remove(); 2630 var videoContainerEl = document.createElement('div'); 2631 videoContainerEl.id = 'video-container_' + componentId; 2632 2633 $(videoComponent + ' .video-container__wrapper').prepend(youtubeWrapper); 2634 2635 $(videoComponent + ' .youtube-wrapper').prepend(videoContainerEl); 2636 2637 playerVars = Object.assign({}, 2638 { cc_load_policy: 1 }, 2639 (currentPlaylist[index].rel === false) && { rel: 0 }, 2640 (currentPlaylist[index].controls === false) && { controls: 0 }, 2641 (currentPlaylist[index].fs === false) && { fs: 0 }, 2642 (currentPlaylist[index].autoplay === true) && { autoplay: 1 }, 2643 (currentPlaylist[index].start > 0) && { start: currentPlaylist[index].start }, 2644 (currentPlaylist[index].end > 0 && currentPlaylist[index].start < currentPlaylist[index].end) && { end: currentPlaylist[index].end } 2645 ); 2646 2647 player = new YT.Player('video-container_' + componentId, { 2648 videoId: currentPlaylist[index].videoId, 2649 playerVars 2650 }); 2651 2652 currentSettings.showTitle && 2653 $(videoComponent + ' .title').html(currentPlaylist[index].title); 2654 2655 currentSettings.showContentChannel && 2656 $(videoComponent + ' .channel').html(currentPlaylist[index].channel); 2657 2658 currentSettings.showDescription && 2659 $(videoComponent + ' .description').html(currentPlaylist[index].description); 2660 2661 $(videoComponent + ' .additional-mm-info').remove(); 2662 } 2663</script>
vendor: 1 bytes, line 2663
2663
2664<script> 2665 2666 var playlistJson = [ 2667 { 2668 "fs": true, 2669 "id": "897a6dd9-2916-4e32-9789-8915a34c0de7", 2670 "end": 0, 2671 "img": { 2672 "url": "https://i.ytimg.com/vi/gHAIjSkmnYI/maxresdefault.jpg", 2673 "isDefault": false 2674 }, 2675 "rel": false, 2676 "url": "https://www.youtube.com/watch?v=gHAIjSkmnYI", 2677 "start": 0, 2678 "title": "No Cats In The Library | Full Episode", 2679 "channel": "Kidzuko", 2680 "videoId": "gHAIjSkmnYI", 2681 "autoplay": false, 2682 "controls": true, 2683 "published": "", 2684 "description": "Mychal The Librarian builds tiny libraries, while Actress Jamie Chung reads a story about a cat who loves being read to at the library, and Actor Ebon Moss-Bachrach shows how you can read to cats at your local animal shelter.", 2685 "videoSource": "youtube", 2686 "titlePlaceholder": "Title", 2687 "channelPlaceholder": "Content channel", 2688 "descriptionPlaceholder": "Description" 2689 } 2690]; 2691 var settingsJson = { 2692 "endScreen": false, 2693 "showTitle": true, 2694 "showPlaylist": false, 2695 "playlistHeight": 4, 2696 "selectedRegions": [ 2697 { 2698 "label": "US", 2699 "value": "US" 2700 } 2701 ], 2702 "showDescription": true, 2703 "showContentChannel": true, 2704 "showAdditionalMediaManagerInfo": true 2705} 2706 2707 2708 2709 function updatePlaylistHeaderTabindex(componentId) { 2710 var playlistHeader = document.getElementById('playlist-header_' + componentId); 2711 if (!playlistHeader) return; 2712 var caret = playlistHeader.querySelector('.dropdown-caret'); 2713 if (window.innerWidth > 1023) { 2714 // On desktop with one-column layout, playlist header is not interactive 2715 if (caret && window.getComputedStyle(caret).display === 'none') { 2716 playlistHeader.disabled = true; 2717 playlistHeader.setAttribute('aria-disabled', 'true'); 2718 playlistHeader.setAttribute('tabindex', '-1'); 2719 } else { 2720 playlistHeader.disabled = false; 2721 playlistHeader.removeAttribute('aria-disabled'); 2722 playlistHeader.setAttribute('tabindex', '0'); 2723 } 2724 } else { 2725 playlistHeader.disabled = false; 2726 playlistHeader.removeAttribute('aria-disabled'); 2727 playlistHeader.setAttribute('tabindex', '0'); 2728 } 2729 } 2730 $(window).on('load', function(){ 2731 resizePlaylist('428bb740-ab88-11f0-a499-f56d58164f6c'); 2732 updatePlaylistHeaderTabindex('428bb740-ab88-11f0-a499-f56d58164f6c'); 2733 }); 2734 $(window).resize(function(){ 2735 resizePlaylist('428bb740-ab88-11f0-a499-f56d58164f6c'); 2736 updatePlaylistHeaderTabindex('428bb740-ab88-11f0-a499-f56d58164f6c'); 2737 }); 2738 2739 if (typeof window.playlistMapping === 'undefined') { 2740 window.playlistMapping = {}; 2741 } 2742 2743 if (typeof window.settingsMapping === 'undefined') { 2744 window.settingsMapping = {}; 2745 } 2746 window.playlistMapping['428bb740-ab88-11f0-a499-f56d58164f6c'] = playlistJson; 2747 window.settingsMapping['428bb740-ab88-11f0-a499-f56d58164f6c'] = settingsJson; 2748 2749 function resizePlaylist(componentId) { 2750 const videoComponent = $('#video-component_' + componentId); 2751 const playlistWrapper = videoComponent.find('.playlist__wrapper'); 2752 const playlistBody = playlistWrapper.find('.playlist-body'); 2753 const isSmallPlaylist = playlistWrapper.hasClass('playlist-sm'); 2754 const isLargeWindow = $(window).width() >= 1024; 2755 const isOneColWithPlaylist = videoComponent.hasClass('column-12'); 2756 if (isOneColWithPlaylist) { 2757 if(isLargeWindow) { 2758 const mainVideoHeight = videoComponent.find('.video-container').outerHeight() + 2759 videoComponent.find('.video-info').outerHeight() + 2760 (videoComponent.find('.video-cta-container').outerHeight(true) || 0); 2761 const playlistHeaderHeight = $('#playlist-header_' + componentId).outerHeight(); 2762 2763 playlistWrapper.css('height', mainVideoHeight + 'px'); 2764 playlistBody.css('max-height', (mainVideoHeight - playlistHeaderHeight) + 'px'); 2765 } 2766 else { 2767 playlistWrapper.css('height', 'auto'); 2768 playlistBody.css('max-height', '400px'); 2769 } 2770 } 2771 if(isSmallPlaylist){ 2772 const playlistItemImgWrapper = playlistWrapper.find('.playlist-item-img-wrapper'); 2773 const playlistItemInfo = playlistWrapper.find('.playlist-item-info'); 2774 if(!isLargeWindow) { 2775 $(playlistItemImgWrapper).removeClass('span6'); 2776 $(playlistItemInfo).removeClass('span6'); 2777 $(playlistItemImgWrapper).addClass('span4'); 2778 $(playlistItemInfo).addClass('span8'); 2779 } 2780 else { 2781 $(playlistItemImgWrapper).removeClass('span4'); 2782 $(playlistItemInfo).removeClass('span8'); 2783 $(playlistItemImgWrapper).addClass('span6'); 2784 $(playlistItemInfo).addClass('span6'); 2785 } 2786 } 2787 2788 } 2789 2790 function selectPlaylistItem(componentId, index, videoSource) { 2791 var currentPlaylist = playlistMapping[componentId]; 2792 var currentSettings = settingsMapping[componentId]; 2793 switch(videoSource) { 2794 case 'cove': 2795 loadMMVideo(componentId, index, currentPlaylist, currentSettings); 2796 break; 2797 case 'youtube': 2798 loadYoutubeVideo(componentId, index, currentPlaylist, currentSettings); 2799 break; 2800 default: 2801 loadDefault(componentId, index, currentPlaylist, currentSettings); 2802 break; 2803 } 2804 2805 } 2806 2807 function loadDefault(componentId, index, currentPlaylist, currentSettings) { 2808 var youtubeWrapper = '#youtube-wrapper_' + componentId; 2809 var videoContainer = '#video-container_' + componentId; 2810 var videoComponent = '#video-component_' + componentId; 2811 2812 $(youtubeWrapper).remove(); 2813 $(videoContainer).remove(); 2814 2815 var videoContainerEl = document.createElement('div'); 2816 videoContainerEl.id = 'video-container_' + componentId; 2817 videoContainerEl.className = 'video-container'; 2818 $(videoComponent + ' .video-container__wrapper').prepend(vi
2818deoContainerEl); 2819 2820 var defaultImg = document.createElement('img'); 2821 defaultImg.alt = currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder; 2822 defaultImg.src = currentPlaylist[index].img.url; 2823 $(videoContainerEl).prepend(defaultImg); 2824 2825 currentSettings.showTitle && 2826 $(videoComponent + ' .title').html(currentPlaylist[index].title||currentPlaylist[index].titlePlaceholder); 2827 2828 currentSettings.showContentChannel && 2829 $(videoComponent + ' .channel').html(currentPlaylist[index].channel||currentPlaylist[index].channelPlaceholder); 2830 2831 currentSettings.showDescription && 2832 $(videoComponent + ' .description').html(currentPlaylist[index].description||currentPlaylist[index].descriptionPlaceholder); 2833 2834 $(videoComponent + ' .additional-mm-info').remove(); 2835 } 2836 2837 function showCurrentIndex(index, componentId) { 2838 var itemsCount = $('#playlist-items-count_' + componentId); 2839 var currentItem = itemsCount.children('span'); 2840 currentItem.text(index + '/'); 2841 } 2842 2843 function togglePlaylist(componentId) { 2844 var playlistHeader = $('#playlist-header_' + componentId); 2845 // Do not toggle if the header is disabled 2846 if (playlistHeader.prop('disabled')) return; 2847 var caret = playlistHeader.find('.dropdown-caret'); 2848 // Only toggle if the caret is visible (not just present in DOM) 2849 if (caret.length && caret.is(':visible')) { 2850 var playlistBody = $('#playlist-body_' + componentId); 2851 playlistBody.css('overflow', 'auto'); 2852 playlistBody.slideToggle('slow', function(){ playlistBody.css('overflow','auto') }); 2853 playlistHeader.find('i').toggleClass('fa-caret-up fa-caret-down'); 2854 // Toggle aria-expanded for accessibility 2855 var isExpanded = playlistHeader.attr('aria-expanded') === 'true'; 2856 playlistHeader.attr('aria-expanded', !isExpanded); 2857 } 2858 } 2859 2860</script>
2860 2861 2862 2863</body> 2864</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.