├── .gitlab-ci.yml ├── .nojekyll ├── .vscode └── settings.json ├── README.md ├── assets ├── 2PlayersExample.png ├── NewProject1.PNG ├── NewProject2.PNG ├── NewProject3.PNG ├── NewProject4.PNG ├── NewProject5.PNG ├── code.svg ├── customUIfin.png ├── emulator_config.png ├── favicon.ico ├── help.svg ├── linkedin.svg ├── logo.png ├── style.css ├── thumb_player.png ├── thumbnails_sprite.png ├── tizen_studio_install.png └── tizen_tv_sdk_install.png ├── gitbook ├── book │ └── anker.js ├── fonts │ └── fontawesome │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── gitbook-plugin-copy-code-button │ └── toggle.js ├── gitbook-plugin-fontsettings │ ├── fontsettings.js │ └── website.css ├── gitbook-plugin-highlight │ ├── ebook.css │ └── website.css ├── gitbook-plugin-hints │ └── plugin-hints.css ├── gitbook-plugin-lunr │ ├── lunr.min.js │ └── search-lunr.js ├── gitbook-plugin-search │ ├── lunr.min.js │ ├── search-engine.js │ ├── search.css │ └── search.js ├── gitbook.js ├── images │ ├── apple-touch-icon-precomposed-152.png │ └── favicon.ico ├── style.css └── theme.js ├── index.html ├── package-lock.json ├── ps4.md ├── ps4 ├── api.md ├── getting_started.md ├── integrations.md └── releases.md ├── ps5 ├── api.md ├── css_customizations.md ├── getting_started.md ├── integrations.md ├── licenses.md ├── releases.md └── timed_metadata.md ├── ps5_xbox_tizen_webos.md └── sidebar.md /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: alpine:latest 2 | 3 | pages: 4 | stage: deploy 5 | script: 6 | - echo 'Nothing to do...' 7 | artifacts: 8 | paths: 9 | - public 10 | only: 11 | - master 12 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/.nojekyll -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "Tizen" 4 | ] 5 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | logo of docsify-awesome repository 4 | 5 | # NexPlayer SDK for Tizen, WebOS, Hisense, Xbox and PlayStation 6 | 7 | NexPlayer™ provides a media player for Smart TVs operating on Tizen, WebOS and Hisense and for consoles such as Xbox, PlayStation 4 and PlayStation 5. It includes support for HLS, DASH, and progressive download. 8 | 9 | The default UI is easily customizable to fit the user's personal preferences (e.g. icons, colors, etc). 10 | 11 |
12 |
13 |
VIDEO DELIVERY FORMATS
14 |
15 |
HLS
16 |
DASH
17 |
18 |
AD INSERTION
19 |
20 |
VAST, VPAID, VMAP, Playlist
21 |
Pre-Roll, Mid-Roll, Post-Roll
22 |
Integrated Client-Side Ad Insertion
23 |

IMA SDK for Client-Side Ad Insertion1

24 |

PAL SDK for Client-Side Ad Insertion1

25 |
Server-Side Ad Insertion
26 |

IMA DAI SDK for Server-Side Ad Insertion1

27 |
28 |
METADATA
29 |
30 |
ID3 Tags
31 |
32 |
33 |
34 |
FEATURES
35 |
36 |
Integrated UI
37 |
Multiple audio/video tracks
38 |
ABR and UHD video (4K and 8K)
39 |
Trick Play
40 |
Time-shifting
41 |
DVR Live Streaming
42 |
Picture-in-picture
43 |
Fully Customizable UI
44 |
45 |
46 |
47 |
PLAYBACK
48 |
49 |
VOD
50 |
Live
51 |
52 |
SUBTITLES & CC
53 |
54 |
WebVTT
55 |
SRT
56 |
CEA 608/708
57 |
TTML
58 |
59 |
CONTENT PROTECTION
60 |
61 |
Widevine DRM
62 |
PlayReady DRM
63 |
Custom HTTP headers
64 |
CENC
65 |
66 |
67 |
68 | 69 |
1 These libraries are not supported in Xbox
70 | 71 | ## Platform support 72 | 73 | NexPlayer supports several platforms and models: 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
Platform Minimum model and yearSupported content
Samsung TizenTizen 2.3 (2015) DASH/HLS + PlayReady/Widevine
LG WebOSWebOS 3.0 (2016)DASH/HLS + PlayReady/Widevine
HisenseContact usDASH/HLS + PlayReady/Widevine1
PlayStation 4Original (2013)DASH + PlayReady2, HLS Clear
PlayStation 5Standard/Digital (2020)DASH/HLS + PlayReady
Xbox OneOriginal (2013)DASH/HLS + PlayReady
Xbox Series S/XOriginal (2020)DASH/HLS + PlayReady
119 |
1 Please, note that each Hisense device has its own restrictions regarding the DRM support.
120 |
2 PS4 only supports security levels up to SL 2000
121 | -------------------------------------------------------------------------------- /assets/2PlayersExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/2PlayersExample.png -------------------------------------------------------------------------------- /assets/NewProject1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/NewProject1.PNG -------------------------------------------------------------------------------- /assets/NewProject2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/NewProject2.PNG -------------------------------------------------------------------------------- /assets/NewProject3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/NewProject3.PNG -------------------------------------------------------------------------------- /assets/NewProject4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/NewProject4.PNG -------------------------------------------------------------------------------- /assets/NewProject5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/NewProject5.PNG -------------------------------------------------------------------------------- /assets/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/customUIfin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/customUIfin.png -------------------------------------------------------------------------------- /assets/emulator_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/emulator_config.png -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/favicon.ico -------------------------------------------------------------------------------- /assets/help.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/linkedin.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/logo.png -------------------------------------------------------------------------------- /assets/style.css: -------------------------------------------------------------------------------- 1 | article, 2 | aside, 3 | details, 4 | figcaption, 5 | figure, 6 | footer, 7 | header, 8 | hgroup, 9 | main, 10 | nav, 11 | section, 12 | summary { 13 | display: block 14 | } 15 | .app-sub-sidebar li::before { 16 | content: '' !important; 17 | } 18 | audio, 19 | canvas, 20 | video { 21 | display: inline-block 22 | } 23 | 24 | audio:not([controls]) { 25 | display: none; 26 | height: 0 27 | } 28 | 29 | [hidden] { 30 | display: none 31 | } 32 | 33 | html { 34 | font-family: sans-serif; 35 | -webkit-text-size-adjust: 100%; 36 | -ms-text-size-adjust: 100% 37 | } 38 | 39 | body { 40 | margin: 0 41 | } 42 | 43 | a:focus { 44 | outline: thin dotted 45 | } 46 | 47 | a:active, 48 | a:hover { 49 | outline: 0 50 | } 51 | 52 | h1 { 53 | font-size: 2em; 54 | margin: .67em 0 55 | } 56 | 57 | abbr[title] { 58 | border-bottom: 1px dotted 59 | } 60 | 61 | b, 62 | strong { 63 | font-weight: 700 64 | } 65 | 66 | dfn { 67 | font-style: italic 68 | } 69 | 70 | hr { 71 | -moz-box-sizing: content-box; 72 | box-sizing: content-box; 73 | height: 0 74 | } 75 | 76 | mark { 77 | background: #ff0; 78 | color: #000 79 | } 80 | 81 | code, 82 | kbd, 83 | pre, 84 | samp { 85 | font-family: monospace, serif; 86 | font-size: 1em 87 | } 88 | 89 | pre { 90 | white-space: pre-wrap 91 | } 92 | 93 | q { 94 | quotes: "\201C""\201D""\2018""\2019" 95 | } 96 | 97 | small { 98 | font-size: 80% 99 | } 100 | 101 | sub, 102 | sup { 103 | font-size: 75%; 104 | line-height: 0; 105 | position: relative; 106 | vertical-align: baseline 107 | } 108 | 109 | sup { 110 | top: -.5em 111 | } 112 | 113 | sub { 114 | bottom: -.25em 115 | } 116 | 117 | img { 118 | border: 0; 119 | margin: 10px; 120 | } 121 | 122 | img.icon { 123 | width:12px; 124 | height:auto; 125 | } 126 | 127 | svg:not(:root) { 128 | overflow: hidden 129 | } 130 | 131 | figure { 132 | margin: 0 133 | } 134 | 135 | fieldset { 136 | border: 1px solid silver; 137 | margin: 0 2px; 138 | padding: .35em .625em .75em 139 | } 140 | 141 | legend { 142 | border: 0; 143 | padding: 0 144 | } 145 | 146 | button, 147 | input, 148 | select, 149 | textarea { 150 | font-family: inherit; 151 | font-size: 100%; 152 | margin: 0 153 | } 154 | 155 | button, 156 | input { 157 | line-height: normal 158 | } 159 | 160 | button, 161 | select { 162 | text-transform: none 163 | } 164 | 165 | button, 166 | html input[type=button], 167 | input[type=reset], 168 | input[type=submit] { 169 | -webkit-appearance: button; 170 | cursor: pointer 171 | } 172 | 173 | button[disabled], 174 | html input[disabled] { 175 | cursor: default 176 | } 177 | 178 | input[type=checkbox], 179 | input[type=radio] { 180 | box-sizing: border-box; 181 | padding: 0 182 | } 183 | 184 | input[type=search] { 185 | -webkit-appearance: textfield; 186 | -moz-box-sizing: content-box; 187 | -webkit-box-sizing: content-box; 188 | box-sizing: content-box 189 | } 190 | 191 | input[type=search]::-webkit-search-cancel-button, 192 | input[type=search]::-webkit-search-decoration { 193 | -webkit-appearance: none 194 | } 195 | 196 | button::-moz-focus-inner, 197 | input::-moz-focus-inner { 198 | border: 0; 199 | padding: 0 200 | } 201 | 202 | textarea { 203 | overflow: auto; 204 | vertical-align: top 205 | } 206 | 207 | table { 208 | border-collapse: collapse; 209 | border-spacing: 0 210 | } 211 | 212 | .link-inherit { 213 | color: inherit 214 | } 215 | 216 | .link-inherit:focus, 217 | .link-inherit:hover { 218 | color: inherit 219 | } 220 | 221 | .hidden { 222 | display: none 223 | } 224 | 225 | .alert { 226 | padding: 5px; 227 | margin-bottom: 20px; 228 | color: #444; 229 | background: #eee; 230 | border-bottom: 5px solid #ddd; 231 | display:block; 232 | } 233 | 234 | .alert-success { 235 | background: #dff0d8; 236 | border-color: #d6e9c6; 237 | color: #3c763d 238 | } 239 | 240 | .alert-info { 241 | background: #d9edf7; 242 | border-color: #bce8f1; 243 | color: #31708f 244 | } 245 | 246 | .alert-danger { 247 | background: #f2dede; 248 | border-color: #ebccd1; 249 | color: #a94442 250 | } 251 | 252 | .alert-warning { 253 | background: #fcf8e3; 254 | border-color: #faebcc; 255 | color: #8a6d3b 256 | } 257 | 258 | .hints-icon { 259 | display: table-cell; 260 | padding-right: 15px; 261 | padding-left: 5px; 262 | } 263 | .hints-container { 264 | display: table-cell; 265 | } 266 | 267 | td::before{ 268 | content:' ' !important; 269 | position:absolute; 270 | } 271 | .hideText{ 272 | color: #ffffff; 273 | position: absolute; 274 | top: -100rem; 275 | 276 | } 277 | .blocks{ 278 | border: solid 0.5px #dbcfcf; 279 | } 280 | .titleBlocks{ 281 | color: #ffffff !important; 282 | background-color: #C80000; 283 | padding: 3%; 284 | margin-top: 0%; 285 | text-align: center; 286 | } 287 | .list{ 288 | margin-top: -1rem !important; 289 | margin-left: -1rem; 290 | list-style-type: none; 291 | } 292 | .listsContainer{ 293 | display: grid; 294 | grid-template-columns: 33% 33% 33%; 295 | grid-template-rows: 33% 33% 37%; 296 | column-gap: 1rem; 297 | row-gap: 1rem; 298 | 299 | } 300 | .listsContainer div:nth-child(3) { 301 | grid-column: 2; 302 | grid-row: 3 / 1; 303 | } 304 | .titles{ 305 | color: #ffffff; 306 | width: 250px; 307 | } 308 | .markdown-section h4 { 309 | margin: 0px 0 30px 0; 310 | } 311 | .markdown-section th { 312 | color:white; 313 | } 314 | .markdown-section thead { 315 | background: #C80000; 316 | } 317 | /*! normalize.css v2.1.0 | MIT License | git.io/normalize */ 318 | article, 319 | aside, 320 | details, 321 | figcaption, 322 | figure, 323 | footer, 324 | header, 325 | hgroup, 326 | main, 327 | nav, 328 | section, 329 | summary { 330 | display: block 331 | } 332 | 333 | audio, 334 | canvas, 335 | video { 336 | display: inline-block 337 | } 338 | 339 | audio:not([controls]) { 340 | display: none; 341 | height: 0 342 | } 343 | 344 | [hidden] { 345 | display: none 346 | } 347 | 348 | html { 349 | font-family: sans-serif; 350 | -webkit-text-size-adjust: 100%; 351 | -ms-text-size-adjust: 100% 352 | } 353 | 354 | body { 355 | margin: 0 356 | } 357 | 358 | a:focus { 359 | outline: thin dotted 360 | } 361 | 362 | a:active, 363 | a:hover { 364 | outline: 0 365 | } 366 | 367 | h1 { 368 | font-size: 2em; 369 | margin: .67em 0 370 | } 371 | 372 | abbr[title] { 373 | border-bottom: 1px dotted 374 | } 375 | 376 | b, 377 | strong { 378 | font-weight: 700 379 | } 380 | 381 | dfn { 382 | font-style: italic 383 | } 384 | 385 | hr { 386 | -moz-box-sizing: content-box; 387 | box-sizing: content-box; 388 | height: 0 389 | } 390 | 391 | mark { 392 | background: #ff0; 393 | color: #000 394 | } 395 | 396 | code, 397 | kbd, 398 | pre, 399 | samp { 400 | font-family: monospace, serif; 401 | font-size: 1em 402 | } 403 | 404 | pre { 405 | white-space: pre-wrap 406 | } 407 | 408 | q { 409 | quotes: "\201C""\201D""\2018""\2019" 410 | } 411 | 412 | small { 413 | font-size: 80% 414 | } 415 | 416 | sub, 417 | sup { 418 | font-size: 75%; 419 | line-height: 0; 420 | position: relative; 421 | vertical-align: baseline 422 | } 423 | 424 | sup { 425 | top: -.5em 426 | } 427 | 428 | sub { 429 | bottom: -.25em 430 | } 431 | 432 | img { 433 | border: 0; 434 | margin: 10px; 435 | } 436 | 437 | svg:not(:root) { 438 | overflow: hidden 439 | } 440 | 441 | figure { 442 | margin: 0 443 | } 444 | 445 | fieldset { 446 | border: 1px solid silver; 447 | margin: 0 2px; 448 | padding: .35em .625em .75em 449 | } 450 | 451 | legend { 452 | border: 0; 453 | padding: 0 454 | } 455 | 456 | button, 457 | input, 458 | select, 459 | textarea { 460 | font-family: inherit; 461 | font-size: 100%; 462 | margin: 0 463 | } 464 | 465 | button, 466 | input { 467 | line-height: normal 468 | } 469 | 470 | button, 471 | select { 472 | text-transform: none 473 | } 474 | 475 | button, 476 | html input[type=button], 477 | input[type=reset], 478 | input[type=submit] { 479 | -webkit-appearance: button; 480 | cursor: pointer 481 | } 482 | 483 | button[disabled], 484 | html input[disabled] { 485 | cursor: default 486 | } 487 | 488 | input[type=checkbox], 489 | input[type=radio] { 490 | box-sizing: border-box; 491 | padding: 0 492 | } 493 | 494 | input[type=search] { 495 | -webkit-appearance: textfield; 496 | -moz-box-sizing: content-box; 497 | -webkit-box-sizing: content-box; 498 | box-sizing: content-box 499 | } 500 | 501 | input[type=search]::-webkit-search-cancel-button, 502 | input[type=search]::-webkit-search-decoration { 503 | -webkit-appearance: none 504 | } 505 | 506 | button::-moz-focus-inner, 507 | input::-moz-focus-inner { 508 | border: 0; 509 | padding: 0 510 | } 511 | 512 | textarea { 513 | overflow: auto; 514 | vertical-align: top 515 | } 516 | 517 | table { 518 | border-collapse: collapse; 519 | border-spacing: 0; 520 | } 521 | 522 | .link-inherit { 523 | color: inherit 524 | } 525 | 526 | .link-inherit:focus, 527 | .link-inherit:hover { 528 | color: inherit 529 | } 530 | 531 | .hidden { 532 | display: none 533 | } 534 | 535 | .alert { 536 | padding: 5px; 537 | margin-bottom: 20px; 538 | color: #444; 539 | background: #eee; 540 | border-bottom: 5px solid #ddd; 541 | display:block; 542 | } 543 | 544 | .alert-success { 545 | background: #dff0d8; 546 | border-color: #d6e9c6; 547 | color: #3c763d 548 | } 549 | 550 | .alert-info { 551 | background: #d9edf7; 552 | border-color: #bce8f1; 553 | color: #31708f 554 | } 555 | 556 | .alert-danger { 557 | background: #f2dede; 558 | border-color: #ebccd1; 559 | color: #a94442 560 | } 561 | 562 | .alert-warning { 563 | background: #fcf8e3; 564 | border-color: #faebcc; 565 | color: #8a6d3b 566 | } 567 | 568 | .hints-icon { 569 | display: table-cell; 570 | padding-right: 15px; 571 | padding-left: 5px; 572 | } 573 | .hints-container { 574 | display: table-cell; 575 | } 576 | 577 | .app-sub-sidebar li::before { 578 | content: '' !important; 579 | } 580 | 581 | td::before{ 582 | content:' ' !important; 583 | position:absolute; 584 | } 585 | .hideText{ 586 | color: #ffffff; 587 | position: absolute; 588 | top: -100rem; 589 | 590 | } 591 | .blocks{ 592 | border: solid 0.5px #dbcfcf; 593 | } 594 | .titleBlocks{ 595 | color: #ffffff !important; 596 | background-color: #C80000; 597 | padding: 3%; 598 | margin-top: 0%; 599 | text-align: center; 600 | } 601 | .list{ 602 | margin-top: -1rem !important; 603 | margin-left: -1rem; 604 | list-style-type: none; 605 | } 606 | .listsContainer{ 607 | display: grid; 608 | grid-template-columns: 33% 33% 33%; 609 | grid-template-rows: 33% 33% 37%; 610 | column-gap: 1rem; 611 | row-gap: 1rem; 612 | 613 | } 614 | .listsContainer div:nth-child(3) { 615 | grid-column: 2; 616 | grid-row: 4 / 1; 617 | } 618 | 619 | .titles{ 620 | color: #ffffff; 621 | width: 450px; 622 | } 623 | 624 | .abstractTable { 625 | display: grid; 626 | grid-template-columns: 1fr 1fr 1fr; 627 | align-items: stretch; 628 | } 629 | 630 | .gridColumn { 631 | display: flex; 632 | flex-direction: column; 633 | justify-content: space-between; 634 | } 635 | 636 | .gridColumn .contentCell:last-of-type { 637 | border-bottom: solid 1px #ddd; 638 | } 639 | 640 | .gridColumn:last-of-type .contentCell { 641 | border-right: solid 1px #ddd; 642 | } 643 | 644 | .titleCell { 645 | background-color: rgb(200, 0, 0); 646 | border: 1px solid #ddd; 647 | border-right: none; 648 | color: #ffffff; 649 | font-weight: bold; 650 | padding: 6px 13px; 651 | text-align: center; 652 | } 653 | 654 | .contentCell { 655 | border-left: solid 1px #ddd; 656 | display: flex; 657 | flex-direction: column; 658 | height: 100%; 659 | justify-content: space-between; 660 | } 661 | 662 | .contentCell div { 663 | border-bottom: solid 1px #ddd; 664 | display: flex; 665 | flex-direction: column; 666 | height: inherit; 667 | justify-content: center; 668 | padding: 5px 10px; 669 | }.contentCell div:last-of-type { 670 | border-bottom: none; 671 | } 672 | 673 | .contentCell div:nth-child(2n) { 674 | background-color: #f8f8f8; 675 | } -------------------------------------------------------------------------------- /assets/thumb_player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/thumb_player.png -------------------------------------------------------------------------------- /assets/thumbnails_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/thumbnails_sprite.png -------------------------------------------------------------------------------- /assets/tizen_studio_install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/tizen_studio_install.png -------------------------------------------------------------------------------- /assets/tizen_tv_sdk_install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/assets/tizen_tv_sdk_install.png -------------------------------------------------------------------------------- /gitbook/book/anker.js: -------------------------------------------------------------------------------- 1 | require(["gitbook"], function(gitbook) { 2 | gitbook.events.bind("page.change", function() { 3 | if (location.hash) { 4 | document.location = location.hash; 5 | } 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/gitbook/fonts/fontawesome/FontAwesome.otf -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/gitbook/fonts/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/gitbook/fonts/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/gitbook/fonts/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /gitbook/fonts/fontawesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-copy-code-button/toggle.js: -------------------------------------------------------------------------------- 1 | require(["gitbook", "jQuery"], function(gitbook, $) { 2 | function selectElementText(el){ 3 | var range = document.createRange(); 4 | range.selectNodeContents(el); 5 | var selection = window.getSelection(); 6 | selection.removeAllRanges(); 7 | selection.addRange(range); 8 | } 9 | 10 | function getSelectedText() { 11 | var t = ''; 12 | if (window.getSelection) { 13 | t = window.getSelection(); 14 | } else if (document.getSelection) { 15 | t = document.getSelection(); 16 | } else if (document.selection) { 17 | t = document.selection.createRange().text; 18 | } 19 | return t; 20 | } 21 | 22 | function copyToClipboard(text) { 23 | if (window.clipboardData && window.clipboardData.setData) { 24 | // IE specific code path to prevent textarea being shown while dialog is visible. 25 | return clipboardData.setData("Text", text); 26 | 27 | } else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { 28 | var textarea = document.createElement("textarea"); 29 | textarea.textContent = text; 30 | textarea.style.position = "fixed"; // Prevent scrolling to bottom of page in MS Edge. 31 | document.body.appendChild(textarea); 32 | textarea.select(); 33 | try { 34 | return document.execCommand("copy"); // Security exception may be thrown by some browsers. 35 | } catch (ex) { 36 | console.warn("Copy to clipboard failed.", ex); 37 | return false; 38 | } finally { 39 | document.body.removeChild(textarea); 40 | } 41 | } 42 | } 43 | 44 | function expand(chapter) { 45 | chapter.show(); 46 | if (chapter.parent().attr('class') != 'summary' 47 | && chapter.parent().attr('class') != 'book-summary' 48 | && chapter.length != 0 49 | ) { 50 | expand(chapter.parent()); 51 | } 52 | } 53 | 54 | gitbook.events.bind("page.change", function() { 55 | $("pre").each(function(){ 56 | $(this).css("position", "relative"); 57 | 58 | var $copyCodeButton = $(""); 59 | $copyCodeButton.css({"position": "absolute", "top": "5px", "right": "5px", "padding": "3px", "background-color":"#313E4E", "color":"white", "border-radius": "5px" , "-moz-border-radius": "5px", "-webkit-border-radius": "5px", "border": "2px solid #CCCCCC"}); 60 | $copyCodeButton.click(function(){ 61 | var $codeContainer = $(this).siblings("code"); 62 | if($codeContainer) { 63 | selectElementText($codeContainer.get(0)); 64 | var selectedText = getSelectedText(); 65 | 66 | var buttonNewText = ""; 67 | if(copyToClipboard(selectedText) == true){ 68 | buttonNewText = "Copied"; 69 | selectElementText($codeContainer.get(0)); 70 | } else { 71 | buttonNewText = "Unable to copy"; 72 | selectElementText($codeContainer.get(0)); 73 | } 74 | 75 | $(this).text(buttonNewText); 76 | var that = this; 77 | setTimeout(function(){ 78 | $(that).text("Copy"); 79 | }, 2000); 80 | } 81 | }); 82 | 83 | $(this).append($copyCodeButton); 84 | }); 85 | }); 86 | }); 87 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-fontsettings/fontsettings.js: -------------------------------------------------------------------------------- 1 | require(['gitbook', 'jquery'], function(gitbook, $) { 2 | // Configuration 3 | var MAX_SIZE = 4, 4 | MIN_SIZE = 0, 5 | BUTTON_ID; 6 | 7 | // Current fontsettings state 8 | var fontState; 9 | 10 | // Default themes 11 | var THEMES = [ 12 | { 13 | config: 'white', 14 | text: 'White', 15 | id: 0 16 | }, 17 | { 18 | config: 'sepia', 19 | text: 'Sepia', 20 | id: 1 21 | }, 22 | { 23 | config: 'night', 24 | text: 'Night', 25 | id: 2 26 | } 27 | ]; 28 | 29 | // Default font families 30 | var FAMILIES = [ 31 | { 32 | config: 'serif', 33 | text: 'Serif', 34 | id: 0 35 | }, 36 | { 37 | config: 'sans', 38 | text: 'Sans', 39 | id: 1 40 | } 41 | ]; 42 | 43 | // Return configured themes 44 | function getThemes() { 45 | return THEMES; 46 | } 47 | 48 | // Modify configured themes 49 | function setThemes(themes) { 50 | THEMES = themes; 51 | updateButtons(); 52 | } 53 | 54 | // Return configured font families 55 | function getFamilies() { 56 | return FAMILIES; 57 | } 58 | 59 | // Modify configured font families 60 | function setFamilies(families) { 61 | FAMILIES = families; 62 | updateButtons(); 63 | } 64 | 65 | // Save current font settings 66 | function saveFontSettings() { 67 | gitbook.storage.set('fontState', fontState); 68 | update(); 69 | } 70 | 71 | // Increase font size 72 | function enlargeFontSize(e) { 73 | e.preventDefault(); 74 | if (fontState.size >= MAX_SIZE) return; 75 | 76 | fontState.size++; 77 | saveFontSettings(); 78 | } 79 | 80 | // Decrease font size 81 | function reduceFontSize(e) { 82 | e.preventDefault(); 83 | if (fontState.size <= MIN_SIZE) return; 84 | 85 | fontState.size--; 86 | saveFontSettings(); 87 | } 88 | 89 | // Change font family 90 | function changeFontFamily(configName, e) { 91 | if (e && e instanceof Event) { 92 | e.preventDefault(); 93 | } 94 | 95 | var familyId = getFontFamilyId(configName); 96 | fontState.family = familyId; 97 | saveFontSettings(); 98 | } 99 | 100 | // Change type of color theme 101 | function changeColorTheme(configName, e) { 102 | if (e && e instanceof Event) { 103 | e.preventDefault(); 104 | } 105 | 106 | var $book = gitbook.state.$book; 107 | 108 | // Remove currently applied color theme 109 | if (fontState.theme !== 0) 110 | $book.removeClass('color-theme-'+fontState.theme); 111 | 112 | // Set new color theme 113 | var themeId = getThemeId(configName); 114 | fontState.theme = themeId; 115 | if (fontState.theme !== 0) 116 | $book.addClass('color-theme-'+fontState.theme); 117 | 118 | saveFontSettings(); 119 | } 120 | 121 | // Return the correct id for a font-family config key 122 | // Default to first font-family 123 | function getFontFamilyId(configName) { 124 | // Search for plugin configured font family 125 | var configFamily = $.grep(FAMILIES, function(family) { 126 | return family.config == configName; 127 | })[0]; 128 | // Fallback to default font family 129 | return (!!configFamily)? configFamily.id : 0; 130 | } 131 | 132 | // Return the correct id for a theme config key 133 | // Default to first theme 134 | function getThemeId(configName) { 135 | // Search for plugin configured theme 136 | var configTheme = $.grep(THEMES, function(theme) { 137 | return theme.config == configName; 138 | })[0]; 139 | // Fallback to default theme 140 | return (!!configTheme)? configTheme.id : 0; 141 | } 142 | 143 | function update() { 144 | var $book = gitbook.state.$book; 145 | 146 | $('.font-settings .font-family-list li').removeClass('active'); 147 | $('.font-settings .font-family-list li:nth-child('+(fontState.family+1)+')').addClass('active'); 148 | 149 | $book[0].className = $book[0].className.replace(/\bfont-\S+/g, ''); 150 | $book.addClass('font-size-'+fontState.size); 151 | $book.addClass('font-family-'+fontState.family); 152 | 153 | if(fontState.theme !== 0) { 154 | $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, ''); 155 | $book.addClass('color-theme-'+fontState.theme); 156 | } 157 | } 158 | 159 | function init(config) { 160 | // Search for plugin configured font family 161 | var configFamily = getFontFamilyId(config.family), 162 | configTheme = getThemeId(config.theme); 163 | 164 | // Instantiate font state object 165 | fontState = gitbook.storage.get('fontState', { 166 | size: config.size || 2, 167 | family: configFamily, 168 | theme: configTheme 169 | }); 170 | 171 | update(); 172 | } 173 | 174 | function updateButtons() { 175 | // Remove existing fontsettings buttons 176 | if (!!BUTTON_ID) { 177 | gitbook.toolbar.removeButton(BUTTON_ID); 178 | } 179 | 180 | // Create buttons in toolbar 181 | BUTTON_ID = gitbook.toolbar.createButton({ 182 | icon: 'fa fa-font', 183 | label: 'Font Settings', 184 | className: 'font-settings', 185 | dropdown: [ 186 | [ 187 | { 188 | text: 'A', 189 | className: 'font-reduce', 190 | onClick: reduceFontSize 191 | }, 192 | { 193 | text: 'A', 194 | className: 'font-enlarge', 195 | onClick: enlargeFontSize 196 | } 197 | ], 198 | $.map(FAMILIES, function(family) { 199 | family.onClick = function(e) { 200 | return changeFontFamily(family.config, e); 201 | }; 202 | 203 | return family; 204 | }), 205 | $.map(THEMES, function(theme) { 206 | theme.onClick = function(e) { 207 | return changeColorTheme(theme.config, e); 208 | }; 209 | 210 | return theme; 211 | }) 212 | ] 213 | }); 214 | } 215 | 216 | // Init configuration at start 217 | gitbook.events.bind('start', function(e, config) { 218 | var opts = config.fontsettings; 219 | 220 | // Generate buttons at start 221 | updateButtons(); 222 | 223 | // Init current settings 224 | init(opts); 225 | }); 226 | 227 | // Expose API 228 | gitbook.fontsettings = { 229 | enlargeFontSize: enlargeFontSize, 230 | reduceFontSize: reduceFontSize, 231 | setTheme: changeColorTheme, 232 | setFamily: changeFontFamily, 233 | getThemes: getThemes, 234 | setThemes: setThemes, 235 | getFamilies: getFamilies, 236 | setFamilies: setFamilies 237 | }; 238 | }); 239 | 240 | 241 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-fontsettings/website.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Theme 1 3 | */ 4 | .color-theme-1 .dropdown-menu { 5 | background-color: #111111; 6 | border-color: #7e888b; 7 | } 8 | .color-theme-1 .dropdown-menu .dropdown-caret .caret-inner { 9 | border-bottom: 9px solid #111111; 10 | } 11 | .color-theme-1 .dropdown-menu .buttons { 12 | border-color: #7e888b; 13 | } 14 | .color-theme-1 .dropdown-menu .button { 15 | color: #afa790; 16 | } 17 | .color-theme-1 .dropdown-menu .button:hover { 18 | color: #73553c; 19 | } 20 | /* 21 | * Theme 2 22 | */ 23 | .color-theme-2 .dropdown-menu { 24 | background-color: #2d3143; 25 | border-color: #272a3a; 26 | } 27 | .color-theme-2 .dropdown-menu .dropdown-caret .caret-inner { 28 | border-bottom: 9px solid #2d3143; 29 | } 30 | .color-theme-2 .dropdown-menu .buttons { 31 | border-color: #272a3a; 32 | } 33 | .color-theme-2 .dropdown-menu .button { 34 | color: #62677f; 35 | } 36 | .color-theme-2 .dropdown-menu .button:hover { 37 | color: #f4f4f5; 38 | } 39 | .book .book-header .font-settings .font-enlarge { 40 | line-height: 30px; 41 | font-size: 1.4em; 42 | } 43 | .book .book-header .font-settings .font-reduce { 44 | line-height: 30px; 45 | font-size: 1em; 46 | } 47 | .book.color-theme-1 .book-body { 48 | color: #704214; 49 | background: #f3eacb; 50 | } 51 | .book.color-theme-1 .book-body .page-wrapper .page-inner section { 52 | background: #f3eacb; 53 | } 54 | .book.color-theme-2 .book-body { 55 | color: #bdcadb; 56 | background: #1c1f2b; 57 | } 58 | .book.color-theme-2 .book-body .page-wrapper .page-inner section { 59 | background: #1c1f2b; 60 | } 61 | .book.font-size-0 .book-body .page-inner section { 62 | font-size: 1.2rem; 63 | } 64 | .book.font-size-1 .book-body .page-inner section { 65 | font-size: 1.4rem; 66 | } 67 | .book.font-size-2 .book-body .page-inner section { 68 | font-size: 1.6rem; 69 | } 70 | .book.font-size-3 .book-body .page-inner section { 71 | font-size: 2.2rem; 72 | } 73 | .book.font-size-4 .book-body .page-inner section { 74 | font-size: 4rem; 75 | } 76 | .book.font-family-0 { 77 | font-family: Georgia, serif; 78 | } 79 | .book.font-family-1 { 80 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 81 | } 82 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal { 83 | color: #704214; 84 | } 85 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a { 86 | color: inherit; 87 | } 88 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, 89 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2, 90 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3, 91 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4, 92 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5, 93 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { 94 | color: inherit; 95 | } 96 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, 97 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 { 98 | border-color: inherit; 99 | } 100 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { 101 | color: inherit; 102 | } 103 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr { 104 | background-color: inherit; 105 | } 106 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote { 107 | border-color: inherit; 108 | } 109 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre, 110 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code { 111 | background: #fdf6e3; 112 | color: #657b83; 113 | border-color: #f8df9c; 114 | } 115 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight { 116 | background-color: inherit; 117 | } 118 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th, 119 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td { 120 | border-color: #f5d06c; 121 | } 122 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr { 123 | color: inherit; 124 | background-color: #fdf6e3; 125 | border-color: #444444; 126 | } 127 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { 128 | background-color: #fbeecb; 129 | } 130 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal { 131 | color: #bdcadb; 132 | } 133 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a { 134 | color: #3eb1d0; 135 | } 136 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, 137 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2, 138 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3, 139 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4, 140 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5, 141 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { 142 | color: #fffffa; 143 | } 144 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, 145 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 { 146 | border-color: #373b4e; 147 | } 148 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { 149 | color: #373b4e; 150 | } 151 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr { 152 | background-color: #373b4e; 153 | } 154 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote { 155 | border-color: #373b4e; 156 | } 157 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre, 158 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code { 159 | color: #9dbed8; 160 | background: #2d3143; 161 | border-color: #2d3143; 162 | } 163 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight { 164 | background-color: #282a39; 165 | } 166 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th, 167 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td { 168 | border-color: #3b3f54; 169 | } 170 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr { 171 | color: #b6c2d2; 172 | background-color: #2d3143; 173 | border-color: #3b3f54; 174 | } 175 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { 176 | background-color: #35394b; 177 | } 178 | .book.color-theme-1 .book-header { 179 | color: #afa790; 180 | background: transparent; 181 | } 182 | .book.color-theme-1 .book-header .btn { 183 | color: #afa790; 184 | } 185 | .book.color-theme-1 .book-header .btn:hover { 186 | color: #73553c; 187 | background: none; 188 | } 189 | .book.color-theme-1 .book-header h1 { 190 | color: #704214; 191 | } 192 | .book.color-theme-2 .book-header { 193 | color: #7e888b; 194 | background: transparent; 195 | } 196 | .book.color-theme-2 .book-header .btn { 197 | color: #3b3f54; 198 | } 199 | .book.color-theme-2 .book-header .btn:hover { 200 | color: #fffff5; 201 | background: none; 202 | } 203 | .book.color-theme-2 .book-header h1 { 204 | color: #bdcadb; 205 | } 206 | .book.color-theme-1 .book-body .navigation { 207 | color: #afa790; 208 | } 209 | .book.color-theme-1 .book-body .navigation:hover { 210 | color: #73553c; 211 | } 212 | .book.color-theme-2 .book-body .navigation { 213 | color: #383f52; 214 | } 215 | .book.color-theme-2 .book-body .navigation:hover { 216 | color: #fffff5; 217 | } 218 | /* 219 | * Theme 1 220 | */ 221 | .book.color-theme-1 .book-summary { 222 | color: #afa790; 223 | background: #111111; 224 | border-right: 1px solid rgba(0, 0, 0, 0.07); 225 | } 226 | .book.color-theme-1 .book-summary .book-search { 227 | background: transparent; 228 | } 229 | .book.color-theme-1 .book-summary .book-search input, 230 | .book.color-theme-1 .book-summary .book-search input:focus { 231 | border: 1px solid transparent; 232 | } 233 | .book.color-theme-1 .book-summary ul.summary li.divider { 234 | background: #7e888b; 235 | box-shadow: none; 236 | } 237 | .book.color-theme-1 .book-summary ul.summary li i.fa-check { 238 | color: #33cc33; 239 | } 240 | .book.color-theme-1 .book-summary ul.summary li.done > a { 241 | color: #877f6a; 242 | } 243 | .book.color-theme-1 .book-summary ul.summary li a, 244 | .book.color-theme-1 .book-summary ul.summary li span { 245 | color: #877f6a; 246 | background: transparent; 247 | font-weight: normal; 248 | } 249 | .book.color-theme-1 .book-summary ul.summary li.active > a, 250 | .book.color-theme-1 .book-summary ul.summary li a:hover { 251 | color: #704214; 252 | background: transparent; 253 | font-weight: normal; 254 | } 255 | /* 256 | * Theme 2 257 | */ 258 | .book.color-theme-2 .book-summary { 259 | color: #bcc1d2; 260 | background: #2d3143; 261 | border-right: none; 262 | } 263 | .book.color-theme-2 .book-summary .book-search { 264 | background: transparent; 265 | } 266 | .book.color-theme-2 .book-summary .book-search input, 267 | .book.color-theme-2 .book-summary .book-search input:focus { 268 | border: 1px solid transparent; 269 | } 270 | .book.color-theme-2 .book-summary ul.summary li.divider { 271 | background: #272a3a; 272 | box-shadow: none; 273 | } 274 | .book.color-theme-2 .book-summary ul.summary li i.fa-check { 275 | color: #33cc33; 276 | } 277 | .book.color-theme-2 .book-summary ul.summary li.done > a { 278 | color: #62687f; 279 | } 280 | .book.color-theme-2 .book-summary ul.summary li a, 281 | .book.color-theme-2 .book-summary ul.summary li span { 282 | color: #c1c6d7; 283 | background: transparent; 284 | font-weight: 600; 285 | } 286 | .book.color-theme-2 .book-summary ul.summary li.active > a, 287 | .book.color-theme-2 .book-summary ul.summary li a:hover { 288 | color: #f4f4f5; 289 | background: #252737; 290 | font-weight: 600; 291 | } 292 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-highlight/ebook.css: -------------------------------------------------------------------------------- 1 | pre, 2 | code { 3 | /* http://jmblog.github.io/color-themes-for-highlightjs */ 4 | /* Tomorrow Comment */ 5 | /* Tomorrow Red */ 6 | /* Tomorrow Orange */ 7 | /* Tomorrow Yellow */ 8 | /* Tomorrow Green */ 9 | /* Tomorrow Aqua */ 10 | /* Tomorrow Blue */ 11 | /* Tomorrow Purple */ 12 | } 13 | pre .hljs-comment, 14 | code .hljs-comment, 15 | pre .hljs-title, 16 | code .hljs-title { 17 | color: #8e908c; 18 | } 19 | pre .hljs-variable, 20 | code .hljs-variable, 21 | pre .hljs-attribute, 22 | code .hljs-attribute, 23 | pre .hljs-tag, 24 | code .hljs-tag, 25 | pre .hljs-regexp, 26 | code .hljs-regexp, 27 | pre .hljs-deletion, 28 | code .hljs-deletion, 29 | pre .ruby .hljs-constant, 30 | code .ruby .hljs-constant, 31 | pre .xml .hljs-tag .hljs-title, 32 | code .xml .hljs-tag .hljs-title, 33 | pre .xml .hljs-pi, 34 | code .xml .hljs-pi, 35 | pre .xml .hljs-doctype, 36 | code .xml .hljs-doctype, 37 | pre .html .hljs-doctype, 38 | code .html .hljs-doctype, 39 | pre .css .hljs-id, 40 | code .css .hljs-id, 41 | pre .css .hljs-class, 42 | code .css .hljs-class, 43 | pre .css .hljs-pseudo, 44 | code .css .hljs-pseudo { 45 | color: #c82829; 46 | } 47 | pre .hljs-number, 48 | code .hljs-number, 49 | pre .hljs-preprocessor, 50 | code .hljs-preprocessor, 51 | pre .hljs-pragma, 52 | code .hljs-pragma, 53 | pre .hljs-built_in, 54 | code .hljs-built_in, 55 | pre .hljs-literal, 56 | code .hljs-literal, 57 | pre .hljs-params, 58 | code .hljs-params, 59 | pre .hljs-constant, 60 | code .hljs-constant { 61 | color: #f5871f; 62 | } 63 | pre .ruby .hljs-class .hljs-title, 64 | code .ruby .hljs-class .hljs-title, 65 | pre .css .hljs-rules .hljs-attribute, 66 | code .css .hljs-rules .hljs-attribute { 67 | color: #eab700; 68 | } 69 | pre .hljs-string, 70 | code .hljs-string, 71 | pre .hljs-value, 72 | code .hljs-value, 73 | pre .hljs-inheritance, 74 | code .hljs-inheritance, 75 | pre .hljs-header, 76 | code .hljs-header, 77 | pre .hljs-addition, 78 | code .hljs-addition, 79 | pre .ruby .hljs-symbol, 80 | code .ruby .hljs-symbol, 81 | pre .xml .hljs-cdata, 82 | code .xml .hljs-cdata { 83 | color: #718c00; 84 | } 85 | pre .css .hljs-hexcolor, 86 | code .css .hljs-hexcolor { 87 | color: #3e999f; 88 | } 89 | pre .hljs-function, 90 | code .hljs-function, 91 | pre .python .hljs-decorator, 92 | code .python .hljs-decorator, 93 | pre .python .hljs-title, 94 | code .python .hljs-title, 95 | pre .ruby .hljs-function .hljs-title, 96 | code .ruby .hljs-function .hljs-title, 97 | pre .ruby .hljs-title .hljs-keyword, 98 | code .ruby .hljs-title .hljs-keyword, 99 | pre .perl .hljs-sub, 100 | code .perl .hljs-sub, 101 | pre .javascript .hljs-title, 102 | code .javascript .hljs-title, 103 | pre .coffeescript .hljs-title, 104 | code .coffeescript .hljs-title { 105 | color: #4271ae; 106 | } 107 | pre .hljs-keyword, 108 | code .hljs-keyword, 109 | pre .javascript .hljs-function, 110 | code .javascript .hljs-function { 111 | color: #8959a8; 112 | } 113 | pre .hljs, 114 | code .hljs { 115 | display: block; 116 | background: white; 117 | color: #4d4d4c; 118 | padding: 0.5em; 119 | } 120 | pre .coffeescript .javascript, 121 | code .coffeescript .javascript, 122 | pre .javascript .xml, 123 | code .javascript .xml, 124 | pre .tex .hljs-formula, 125 | code .tex .hljs-formula, 126 | pre .xml .javascript, 127 | code .xml .javascript, 128 | pre .xml .vbscript, 129 | code .xml .vbscript, 130 | pre .xml .css, 131 | code .xml .css, 132 | pre .xml .hljs-cdata, 133 | code .xml .hljs-cdata { 134 | opacity: 0.5; 135 | } 136 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-hints/plugin-hints.css: -------------------------------------------------------------------------------- 1 | .hints-icon { 2 | display: table-cell; 3 | padding-right: 15px; 4 | padding-left: 5px; 5 | } 6 | 7 | .hints-container { 8 | display: table-cell; 9 | } 10 | -------------------------------------------------------------------------------- /gitbook/gitbook-plugin-lunr/lunr.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.12 3 | * Copyright (C) 2015 Oliver Nightingale 4 | * MIT Licensed 5 | * @license 6 | */ 7 | !function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.5.12",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(t){return arguments.length&&null!=t&&void 0!=t?Array.isArray(t)?t.map(function(t){return t.toLowerCase()}):t.toString().trim().toLowerCase().split(/[\s\-]+/):[]},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;no;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n element for each result 48 | res.results.forEach(function(res) { 49 | var $li = $('
  • ', { 50 | 'class': 'search-results-item' 51 | }); 52 | 53 | var $title = $('

    '); 54 | 55 | var $link = $('', { 56 | 'href': gitbook.state.basePath + '/' + res.url, 57 | 'text': res.title 58 | }); 59 | 60 | var content = res.body.trim(); 61 | if (content.length > MAX_DESCRIPTION_SIZE) { 62 | content = content.slice(0, MAX_DESCRIPTION_SIZE).trim()+'...'; 63 | } 64 | var $content = $('

    ').html(content); 65 | 66 | $link.appendTo($title); 67 | $title.appendTo($li); 68 | $content.appendTo($li); 69 | $li.appendTo($searchList); 70 | }); 71 | } 72 | 73 | function launchSearch(q) { 74 | // Add class for loading 75 | $body.addClass('with-search'); 76 | $body.addClass('search-loading'); 77 | 78 | // Launch search query 79 | throttle(gitbook.search.query(q, 0, MAX_RESULTS) 80 | .then(function(results) { 81 | displayResults(results); 82 | }) 83 | .always(function() { 84 | $body.removeClass('search-loading'); 85 | }), 1000); 86 | } 87 | 88 | function closeSearch() { 89 | $body.removeClass('with-search'); 90 | $bookSearchResults.removeClass('open'); 91 | } 92 | 93 | function launchSearchFromQueryString() { 94 | var q = getParameterByName('q'); 95 | if (q && q.length > 0) { 96 | // Update search input 97 | $searchInput.val(q); 98 | 99 | // Launch search 100 | launchSearch(q); 101 | } 102 | } 103 | 104 | function bindSearch() { 105 | // Bind DOM 106 | $searchInput = $('#book-search-input input'); 107 | $bookSearchResults = $('#book-search-results'); 108 | $searchList = $bookSearchResults.find('.search-results-list'); 109 | $searchTitle = $bookSearchResults.find('.search-results-title'); 110 | $searchResultsCount = $searchTitle.find('.search-results-count'); 111 | $searchQuery = $searchTitle.find('.search-query'); 112 | 113 | // Launch query based on input content 114 | function handleUpdate() { 115 | var q = $searchInput.val(); 116 | 117 | if (q.length == 0) { 118 | closeSearch(); 119 | } 120 | else { 121 | launchSearch(q); 122 | } 123 | } 124 | 125 | // Detect true content change in search input 126 | // Workaround for IE < 9 127 | var propertyChangeUnbound = false; 128 | $searchInput.on('propertychange', function(e) { 129 | if (e.originalEvent.propertyName == 'value') { 130 | handleUpdate(); 131 | } 132 | }); 133 | 134 | // HTML5 (IE9 & others) 135 | $searchInput.on('input', function(e) { 136 | // Unbind propertychange event for IE9+ 137 | if (!propertyChangeUnbound) { 138 | $(this).unbind('propertychange'); 139 | propertyChangeUnbound = true; 140 | } 141 | 142 | handleUpdate(); 143 | }); 144 | 145 | // Push to history on blur 146 | $searchInput.on('blur', function(e) { 147 | // Update history state 148 | if (usePushState) { 149 | var uri = updateQueryString('q', $(this).val()); 150 | history.pushState({ path: uri }, null, uri); 151 | } 152 | }); 153 | } 154 | 155 | gitbook.events.on('page.change', function() { 156 | bindSearch(); 157 | closeSearch(); 158 | 159 | // Launch search based on query parameter 160 | if (gitbook.search.isInitialized()) { 161 | launchSearchFromQueryString(); 162 | } 163 | }); 164 | 165 | gitbook.events.on('search.ready', function() { 166 | bindSearch(); 167 | 168 | // Launch search from query param at start 169 | launchSearchFromQueryString(); 170 | }); 171 | 172 | function getParameterByName(name) { 173 | var url = window.location.href; 174 | name = name.replace(/[\[\]]/g, '\\$&'); 175 | var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'), 176 | results = regex.exec(url); 177 | if (!results) return null; 178 | if (!results[2]) return ''; 179 | return decodeURIComponent(results[2].replace(/\+/g, ' ')); 180 | } 181 | 182 | function updateQueryString(key, value) { 183 | value = encodeURIComponent(value); 184 | 185 | var url = window.location.href; 186 | var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'), 187 | hash; 188 | 189 | if (re.test(url)) { 190 | if (typeof value !== 'undefined' && value !== null) 191 | return url.replace(re, '$1' + key + '=' + value + '$2$3'); 192 | else { 193 | hash = url.split('#'); 194 | url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, ''); 195 | if (typeof hash[1] !== 'undefined' && hash[1] !== null) 196 | url += '#' + hash[1]; 197 | return url; 198 | } 199 | } 200 | else { 201 | if (typeof value !== 'undefined' && value !== null) { 202 | var separator = url.indexOf('?') !== -1 ? '&' : '?'; 203 | hash = url.split('#'); 204 | url = hash[0] + separator + key + '=' + value; 205 | if (typeof hash[1] !== 'undefined' && hash[1] !== null) 206 | url += '#' + hash[1]; 207 | return url; 208 | } 209 | else 210 | return url; 211 | } 212 | } 213 | }); 214 | -------------------------------------------------------------------------------- /gitbook/images/apple-touch-icon-precomposed-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/gitbook/images/apple-touch-icon-precomposed-152.png -------------------------------------------------------------------------------- /gitbook/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexPlayer/TizenWebOS/7a61f883c89888bc7e9eb08d2ec15b22b983d973/gitbook/images/favicon.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 38 | 39 |

    Please wait ...
    40 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /ps4.md: -------------------------------------------------------------------------------- 1 |
    2 | 3 | # PlayStation 4 Documentation 4 | 5 | 6 | This section explains how to integrate NexPlayer for PS4 into your project. 7 | 8 | - [Getting Started](/ps4/getting_started.md) 9 | - [NexPlayer API](/ps4/api.md) 10 | - [Integrations](/ps4/integrations.md) 11 | - [Releases Notes](/ps4/releases.md) -------------------------------------------------------------------------------- /ps4/api.md: -------------------------------------------------------------------------------- 1 | # NexPlayer API 2 | 3 | **Nexplayer methods** 4 | 5 | - [Setup(configObj)](#ps4setup) 6 | - [UnMount(div)](#unmount) 7 | - [PlayerEvents(event,callback)](#playerevents) 8 | - [AdsEvents(event,callback)](#adsevents) 9 | 10 | **Player methods** 11 | 12 | - [init(NexPlayerConfig)](#init) 13 | - [play()](#play) 14 | - [pause()](#pause) 15 | - [seek(value)](#seek) 16 | - [Environment](#environment) 17 | - [DefaultConfig](#defaultconfig) 18 | - [destroy()](#destroy) 19 | 20 | **Getters** 21 | 22 | - [getAudioStreams()](#getaudiostreams) ⇒ [Array\](#audiostream) 23 | - [getCurrentAudioTrack()](#getcurrentaudiotrack) ⇒ [AudioTrack](#audiotrack) 24 | - [getCurrentSubtitle()](#getcurrentsubtitle) ⇒ number 25 | - [getCurrentTime()](#getcurrenttime) ⇒ number 26 | - [getCurrentTrack()](#getcurrenttrack) ⇒ [Track](#track-object) 27 | - [getDuration()](#getduration) ⇒ number 28 | - [getQualityLevels()](#getqualitylevels) ⇒ Array 29 | - [getSubtitles()](#getsubtitles) ⇒ Array 30 | - [getThumbnailAt()](#getthumbnailat) ⇒ Promise 31 | - [getThumbnails()](#getthumbnails) ⇒ [Array\](#frame) 32 | - [getTracks()](#gettracks) ⇒ [Array\](#track) 33 | - [getURL()](#geturl) ⇒ string 34 | - [getVersion()](#getversion) ⇒ string 35 | - [getPlayerDiv()](#getplayerdiv) ⇒ string 36 | - [getPlayerContainerDiv()](#getplayercontainerdiv) ⇒ string 37 | - [getAdInstance()](#getadinstance) ⇒ string 38 | - [getVolume()](#getvolume) ⇒ number 39 | - [getMute()](#getmute) ⇒ boolean 40 | - [getLogger()](#getlogger) ⇒ Logger 41 | - [isCurrentAssetAd()](#iscurrentassetad) ⇒ boolean 42 | - [isCurrentAssetMuted()](#iscurrentassetmuted) ⇒ boolean 43 | - [isSeeking()](#isseeking) ⇒ boolean 44 | 45 | **Setters** 46 | 47 | - [setAudio(streamID)](#setaudio) 48 | - [setCurrentTrack(trackID)](#setcurrenttrack) 49 | - [setCurrentSubtitle(subID)](#setsubtitle) 50 | - [setVolume(number)](#setvolume) 51 | - [setMute(boolean)](#setmute) 52 | - [setLogger(logger)](#setlogger) 53 | 54 | **Global Typedefs** 55 | 56 | - [AudioStream](#AudioStream) : object 57 | - [NexPlayerDRMOptions](#nexplayerdrmoptions) : object 58 | - [DRMCustomData](#drmcustomdata) : object 59 | - [Captions](#captions) : object 60 | - [Thumbnails](#thumbnails) : object 61 | - [ICaptionsDisplayer](#icaptionsdisplayer) : object 62 | 63 | **Ads methods** 64 | 65 | - [play()](#adplay) 66 | - [pause()](#adpause) 67 | - [registerPlugin(ads)](#registerplugin) 68 | - [isAdPlaying()](#isAdPlaying) 69 | - [skip()](#skip) 70 | - [checkInitialAds()](#checkinitialads) 71 | - [getAdType()](#getadtype) ⇒ string 72 | - [getAdTitle()](#getadtitle) ⇒ string 73 | - [getAdDuration()](#getadduration) ⇒ number 74 | - [getAdRemainingTime()](#getadremainingtime) ⇒ number 75 | - [getMute()](#getadmute) ⇒ boolean 76 | - [getVolume()](#getadvolume) ⇒ number 77 | - [getAdBreaks()](#getadbreaks) ⇒ Object 78 | - [setMute(state)](#setadmute) 79 | - [setVolume(value)](#setadvolume) 80 | 81 | 82 | ### Nexplayer methods 83 | 84 | #### nexplayer.Setup(configObj) 85 | 86 | Creates and initializes the player. 87 | 88 | **Type**: instance method of `Player` 89 | 90 | **Parameters**: configObj is an object which values could be: 91 | 92 | | Param | Type | Description | 93 | | --- | --- | --- | 94 | | key | string | NexPlayer key to validate the playback. | 95 | | div | HTMLDivElement | The div container of the player. | 96 | | src | string | URL of the video to be played. | 97 | | drm | NexPlayerDRMOptions | Contains an object of DRM information. By default it's set to null. | 98 | | adsParamsToEncode | Array | Array of strings specifying the parameters in the ad URL to be encoded. | 99 | | adURL | string | Contains an object of DRM information. By default it's set to null. | 100 | | autoplay | boolean | Determines if the video must start playing or paused. True by default. | 101 | | callbacksForPlayer | Function | Used for retrieving the NexPlayer instance and video element. This is necessary for getting the instance and use the NexPlayer API. | 102 | | captionDisplayer | ICaptionsDisplayer | Used to provide a custom CaptionDisplayer. This allows to implement the internal logic for the captions. | 103 | | debug | boolean | Determines if log information is showed. By default is set to true. | 104 | | externalSubtitles | Captions | Used to provide subtitle files as external subtitles. | 105 | | mutedAtStart | boolean | Determines if the video will start playing muted or not. False by default. | 106 | | resumePosition | number | Determines the position where the video will start playing. | 107 | | thumbnails | Thumbnails | Thumbnails to be shown. Static and dynamic thumbnails are supported. | 108 | | trailer | boolean | Determines if a stream should be considered a trailer. | 109 | | useNewRelicTracker | boolean | Determines if the New Relic tracker will be used. | 110 | | vast | string | Advertisement URL that is going to be played. VAST, VPAID, VMAP are supported. | 111 | 112 | #### nexplayer.UnMount(div) 113 | 114 | Unmounts the player and its dependencies. 115 | 116 | **Parameters**: 117 | 118 | | Param | Type | Description | 119 | | ----- | ------------------- | ------------------ | 120 | | div | HTMLElement | Player tag | 121 | 122 | 123 | #### nexplayer.PlayerEvents(event, callback) 124 | 125 | Listens for player events. 126 | 127 | **Parameters**: 128 | 129 | | Param | Type | Description | 130 | | ----- | ------------------- | ------------------ | 131 | | event | string | Event name | 132 | | callback | function | Callback function | 133 | 134 | 135 | #### nexplayer.AdsEvents(event, callback) 136 | 137 | Listens for ads events. 138 | 139 | **Parameters**: 140 | 141 | | Param | Type | Description | 142 | | ----- | ------------------- | ------------------ | 143 | | event | string | Event name | 144 | | callback | function | Callback function | 145 | 146 | ### Player methods 147 | 148 | 149 | 150 | #### player.init(NexPlayerConfig) 151 | 152 | Initializes the player with the config Object given. 153 | 154 | 155 | 156 | #### player.play() 157 | 158 | Plays the video when it is paused. 159 | 160 | 161 | 162 | #### player.pause() 163 | 164 | Pauses the video when it is playing. 165 | 166 | 167 | 168 | #### player.seek(value) 169 | 170 | Seeks the video to the value given. 171 | 172 | 173 | 174 | #### player.Environment() 175 | 176 | Returns which browser, platform and device type are set. 177 | 178 | 179 | 180 | #### player.DefaultConfig() 181 | 182 | Sends the default configuration in case the parameters are not specified in the init. 183 | 184 | 185 | 186 | #### player.destroy() 187 | 188 | Destroys the player 189 | 190 | ### Getters 191 | 192 | 193 | 194 | #### player.getAudioStreams() ⇒ Array.< AudioStream > 195 | 196 | Gets the available audio streams. 197 | 198 | **Returns**: An Array - which contains the available audio streams. 199 | 200 | 201 | 202 | #### player.getCurrentAudioTrack() ⇒ AudioTrack 203 | 204 | Gets the audio track currently in use. 205 | 206 | **Returns**: AudioTrack - The current audio track. 207 | 208 | 209 | 210 | #### player.getCurrentSubtitle() 211 | 212 | Gets the current subtitle info. 213 | 214 | **Returns**: Current Subtitle - the current subtitle track (undefined if no subtitles are activated). 215 | 216 | 217 | 218 | #### player.getCurrentTime() ⇒ number 219 | 220 | Returns the currentTime taking into account isUTC (if isUTC is true, getCurrentTime's returned value will be different from the time of the video element). 221 | 222 | **Returns**: number - the current time of the video. 223 | 224 | 225 | 226 | #### player.getCurrentTrack() ⇒ Track 227 | 228 | Gets the current track information. 229 | 230 | **Returns**: Track - the current track. 231 | 232 | 233 | 234 | #### player.getDuration() ⇒ number 235 | 236 | Returns the duration taking into account isUTC (if isUTC is true, getDuration's returned value will be different from the duration of the video element). 237 | 238 | **Returns**: number - the duration of the video. 239 | 240 | 241 | 242 | #### player.getQualityLevels() ⇒ Array 243 | 244 | Gets the video quality levels array. 245 | 246 | **Returns**: Array - quality levels array info 247 | 248 | 249 | 250 | #### player.getSubtitles() 251 | 252 | Gets all the avaliable subtitle tracks info. 253 | 254 | **Returns**: Array of subtitles - the subtitle tracks of the video. 255 | 256 | 257 | 258 | #### player.getThumbnailAt() ⇒ Promise 259 | 260 | Returns a thumbnail loading promise in a specific time. 261 | 262 | **Returns**: Promise - Thumbnail loading promise in a specific time. 263 | 264 | 265 | 266 | #### player.getThumbnails() ⇒ Array < Frame > 267 | 268 | Returns the loaded thumbnails. 269 | 270 | **Returns**: Array < Frame > - The loaded thumbnails. 271 | 272 | 273 | 274 | #### player.getTracks() ⇒ Array.< Track > 275 | 276 | Gets all of the videos avaliable tracks (different qualities). 277 | 278 | **Returns**:: Array.< Track > - all the tracks available. 279 | 280 | 281 | 282 | #### player.getURL() 283 | 284 | Returns the current video URL. 285 | 286 | **Returns**: String 287 | 288 | 289 | 290 | #### player.getVersion() 291 | 292 | Returns the current version of the player. 293 | 294 | **Returns**: String 295 | 296 | 297 | 298 | #### player.getPlayerDiv() 299 | 300 | Returns the video container. 301 | 302 | **Returns**: HTMLDivElement 303 | 304 | 305 | 306 | #### player.getPlayerContainerDiv() 307 | 308 | Returns the player container. 309 | 310 | **Returns**: HTMLDivElement 311 | 312 | 313 | 314 | #### player.getAdInstance() 315 | 316 | Returns the AdInstance Object. 317 | 318 | **Returns**: Object 319 | 320 | 321 | 322 | #### player.getVolume() 323 | 324 | Returns the current volume of the Player. 325 | 326 | **Returns**: number 327 | 328 | 329 | 330 | #### player.getMute() 331 | 332 | Returns true if the video is muted and false if not. 333 | 334 | **Returns**: boolean 335 | 336 | 337 | 338 | #### player.getLogger() 339 | 340 | Returns the logger of the Player. 341 | 342 | **Returns**: Object 343 | 344 | 345 | 346 | #### player.isCurrentAssetAd() 347 | 348 | Returns a boolean, true if the current playing asset is an ad, false if not. 349 | 350 | 351 | 352 | #### player.isCurrentAssetMuted() 353 | 354 | Returns a boolean, true if the current playing asset is muted, false if not. 355 | 356 | 357 | 358 | #### player.isSeeking() 359 | 360 | Returns a boolean, true if the player is seeking and false if not. 361 | 362 | ### Setters 363 | 364 | 365 | 366 | #### player.setAudio(streamID) 367 | 368 | Sets the current audio stream. 369 | 370 | | Param | Type | Description | 371 | | --- | --- | --- | 372 | | streamID | number | ID of the audio stream to be used. | 373 | 374 | 375 | 376 | #### player.setCurrentTrack(trackID) 377 | 378 | Sets the current track. 379 | 380 | | Param | Type | Description | 381 | | --- | --- | --- | 382 | | trackID | number | ID of the track to be used. | 383 | 384 | 385 | 386 | #### player.setCurrentSubtitle(subID) 387 | 388 | Sets the current subtitle. 389 | 390 | | Param | Type | Description | 391 | | --- | --- | --- | 392 | | subID | number | ID of the subtitle to be used. | 393 | 394 | 395 | 396 | #### player.setVolume(value) 397 | 398 | Set the volume of the video. 399 | 400 | | Param | Type | Description | 401 | | --- | --- | --- | 402 | | value | number | The volume level to be used. | 403 | 404 | 405 | 406 | #### player.setMute(boolean) 407 | 408 | Set mute or unmute to the video. 409 | 410 | | Param | Type | Description | 411 | | --- | --- | --- | 412 | | boolean | boolean | If the video will be mute or unmute. | 413 | 414 | 415 | 416 | #### player.setLogger(logger) 417 | 418 | Set logger to the video. 419 | 420 | | Param | Type | Description | 421 | | --- | --- | --- | 422 | | logger | Object | The logger to be used. | 423 | 424 | 425 | ### Global typedefs 426 | 427 | ## Global typedefs 428 | 429 | #### AudioStream : Object 430 | 431 | **Properties**: 432 | 433 | | Name | Type | Description | 434 | | --- | --- | --- | 435 | | id | number | id of the stream. | 436 | | language | string | language of the stream. | 437 | | name | string | name of the stream. | 438 | 439 | 440 | 441 | #### Player.NexPlayerDRMOptions : Object 442 | 443 | **Properties**: 444 | 445 | | Name | Type | Description | 446 | | ------- | ------------------- | ---------------------------- | 447 | | keySystem | string | DRM's keySystem type. I.E.: "com.widevine.alpha" | 448 | | license | string | DRM's license. | 449 | | customData | DRMCustomData | Used to indicate the custom headers necessary to request the license. Optional. | 450 | 451 | 452 | 453 | #### Player.DRMCustomData : Object 454 | 455 | **Properties**: 456 | 457 | | Name | Type | Description | 458 | | ------- | ------------------- | ---------------------------- | 459 | | fieldName | string | Header's name .| 460 | | value | string | Value used in the DRM's request. | 461 | 462 | 463 | 464 | #### Player.Captions : Object 465 | 466 | **Properties**: 467 | 468 | | Name | Type | Description | 469 | | ------- | ------------------- | ---------------------------- | 470 | | src | string | Caption's URL. | 471 | | language | string | Language of the captions. Use to identificate them. | 472 | 473 | 474 | 475 | #### Player.Thumbnails : Object 476 | 477 | **Properties**: 478 | 479 | | Name | Type | Description | 480 | | ------- | ------------------- | ---------------------------- | 481 | | canvas | HTMLCanvasElement | Canvas used to display the thumbnails. | 482 | | urlVtt | string | VTT's URL. | 483 | | urlImg | string | Image to extract thumbnails from. | 484 | | chunkLimit | number | Number of thumbnails' chunks available at the same time. | 485 | | chunkTotal | number | Number of thumbanils' chunks in total. | 486 | 487 | 488 | 489 | #### Player.ICaptionsDisplayer : Class 490 | 491 | **Properties**: 492 | 493 | | Name | Type | Description | 494 | | ------- | ------------------- | ---------------------------- | 495 | | _videoContainer | HTMLElement | Canvas used to display the thumbnails. | 496 | | _captionsContainer | HTMLElement | VTT's URL. | 497 | 498 | **Functions**: 499 | 500 | | Name | Params | Returns | Description | 501 | | ------- | ------------------- | ------- | ---------------------------- | 502 | | init | cues: Array | void | Initializes the Caption Displayer. | 503 | | destroy | None | void | Destroy the Caption Displayer. | 504 | | reset | None | void | Resets the Caption Displayer. | 505 | | setTextVisibility | visible: boolean | void | Shows/hides the captions. | 506 | | updateCue | time: number | void | Called to update the current cues to display. | 507 | | displayCuesCC | cuesCC:Map | void | Displays the CC cues passed. Object properties: "text", "position", and "rgba". | 508 | 509 | ### Ads methods 510 | 511 | 512 | 513 | #### nexplayer.AdInstance().play() 514 | 515 | Play the ad when it is paused. 516 | 517 | 518 | 519 | #### nexplayer.AdInstance().pause() 520 | 521 | Pause the ad when it is playing. 522 | 523 | 524 | 525 | #### nexplayer.AdInstance().registerPlugin(ads) 526 | 527 | Ads is an Object that implements IAds interface, The users can pass their own implementation in case they want to use another advertisement library or a custom one. 528 | 529 | 530 | 531 | #### nexplayer.AdInstance().isAdPlaying() 532 | 533 | Return a boolean, true if the ad is playing and false if not. 534 | 535 | 536 | 537 | #### nexplayer.AdInstance().skip() 538 | 539 | Skip the current ad if possible. 540 | 541 | 542 | 543 | #### nexplayer.AdInstance().checkInitialAds() 544 | 545 | Check whether there ads 546 | 547 | 548 | 549 | #### nexplayer.AdInstance().getAdType() ⇒ string 550 | 551 | Get the current Ad type. 552 | 553 | **Returns**: String - The current ad type. 554 | 555 | 556 | 557 | #### nexplayer.AdInstance().getAdTitle() ⇒ string 558 | 559 | Get the Ad title. 560 | 561 | **Returns**: String - The current ad title. 562 | 563 | 564 | 565 | #### nexplayer.AdInstance().getAdDuration() ⇒ number 566 | 567 | Get the Ad duration. 568 | 569 | **Returns**: number - The current ad duration. 570 | 571 | 572 | 573 | #### nexplayer.AdInstance().getAdRemainingTime() ⇒ number 574 | 575 | Get the Ad remaining time. 576 | 577 | **Returns**: number - The ad remaining time. 578 | 579 | 580 | 581 | #### nexplayer.AdInstance().getMute() ⇒ boolean 582 | 583 | Get the true if the video is muted or false if not. 584 | 585 | **Returns**: boolean - True if the video is muted or false if not. 586 | 587 | 588 | 589 | #### nexplayer.AdInstance().getVolume() ⇒ number 590 | 591 | Get the Ad volume. 592 | 593 | **Returns**: number - The ad volume. 594 | 595 | 596 | 597 | #### nexplayer.AdInstance().getAdBreaks() ⇒ Object 598 | 599 | Returns the break points when ads will trigger 600 | 601 | **Returns**: Object - The break points when ads will trigger 602 | 603 | 604 | 605 | #### nexplayer.AdInstance().setMute(state) 606 | 607 | Mutes or unmutes the ad. 608 | 609 | | Param | Type | Description | 610 | | --- | --- | --- | 611 | | state | boolean | If the ad will be mute or unmute. | 612 | 613 | 614 | 615 | #### nexplayer.AdInstance().setVolume(value) 616 | 617 | Set the volume of the ad. 618 | 619 | | Param | Type | Description | 620 | | --- | --- | --- | 621 | | value | number | The volume level to be used. | 622 | 623 | ## Advanced usage 624 | 625 | ### Events 626 | 627 |

    Please note that if you want to listen to events that happen at the start of the player initialization (e.g. "playercreated" or "adpodsinfo" event when ads are provided), the listeners must be added before calling the initialization method of the player. Example:
    628 |

    629 | 630 | ```js 631 | var player = new nexplayer.NexPlayer(); 632 | 633 | // Adds a listener for the playing event 634 | nexplayer.PlayerEvents("playing", function(e) { 635 | console.log("playing", e); 636 | }); 637 | 638 | // Adds a listener for the aderror event 639 | nexplayer.AdsEvents("aderror", function(e) { 640 | console.log("aderror", e); 641 | }); 642 | 643 | player.init({ 644 | key: 'ENTER YOUR LICENSE KEY HERE', 645 | div: document.getElementById("player"), 646 | src: 'https://livesim.dashif.org/dash/vod/testpic_2s/multi_subs.mpd', 647 | autoplay: true, 648 | }); 649 | ``` 650 | 651 | #### Player Events 652 | 653 | We have events to handle some different kind of player events. List of player events available: 654 | 655 | * **statechanged**: Event is fired when the state of player is changed, contains in the detail attribute the different states of the player (Ready, Buffering, Playing, Paused, Ended) 656 | * **playercreating**: Event lauched when the player is being created. 657 | * **playercreated**: Event launched when the player has been created. 658 | * **playerdestroyed**: Event launched when the player has been destroyed. 659 | * **play**: Event launched when play is requested. 660 | * **playing**: Event launched when the player is played. 661 | * **pause**: Event launched when pause is requested. 662 | * **paused**: Event launched when the player is paused. 663 | * **seeking**: Returns a boolean. True when is seeking, false otherwise. 664 | * **seeked**: Event launched when the stream has been seeked. 665 | * **stalled**: Event launched when the stream has been stalled. 666 | * **hovering**: Event launched when the cursor hovers over the seekbar. 667 | * **durationchange**: Event launched when video duration is changed. 668 | * **timeupdate**: Event launched when the video element duration changes. 669 | * **loadstart**: Event launched when the player starts loading. 670 | * **loadeddata**: Event launched when the manifest is loaded. 671 | * **canplay**: Event lauched when the player is ready to play. 672 | * **buffering**: Event lauched when the player is buffering. 673 | * **videofirstquartile**: Event is fired when the 25% of the video’s duration has been reached. 674 | * **videomidpoint**: Event is fired when the 50% of the video’s duration has been reached. 675 | * **videothirdquartile**: Event is fired when the 75% of the video’s duration has been reached. 676 | * **videoProgressTime**: Event is fired when the (5%, 15%, 25%, 50%, 75%, 85%, 95%) of the video's duration has been reached, it returns a string with the percentage in the detail.progressTime, property of the event's payload. 677 | * **ended**: Event launched when the stream has been finished. 678 | * **newsubtitlesdataloaded**: Event launched when new captions are loaded. 679 | * **ccnewdata**: Event launched when new cues of the closed captions are received. 680 | * **thumbnaildata**: Event launched when a thumbnail data is received. 681 | * **thumbnailloaded**: Event launched when a thumbnail is loaded to the thumbnail array. 682 | * **thumbnailreply**: Event launched when a thumbnail is provided to the canvas. 683 | 684 | Example on how to listen for a player event: 685 | 686 | ```js 687 | nexplayer.PlayerEvents("playing", function(e) { 688 | console.log("playing", e); 689 | }); 690 | ``` 691 | 692 | #### Ads Events 693 | 694 | We have events to handle some different kind of ads events. List of ad events available: 695 | 696 | * **adlibrarycreating**: Creates a library with all ads when the player is started. 697 | * **adlibrarycreated**: Event launched when the ads library is created. 698 | * **adlibrarydestroyed**: Destroys the library with all ads when the player is started. 699 | * **adpodsinfo**: Contains all ad pods information. 700 | * **adblockstarted**: Contains the number of ads in the block in the detail attribute. 701 | * **adblockend**: Event launched when an ad block (some ads in the same timestamp) ends. 702 | * **adstarted**: Event launched when when the ad has started, contains the ad position in the block in the detail attribute. 703 | * **adtagstartloading**: Event launched when the ad starts. 704 | * **adloaded**: Event launched when the ad has been loaded. 705 | * **adcomplete**: Event launched when the ad has ended. 706 | * **addestroyed**: Event launched when the ad has been destroyed after ended. 707 | * **adpaused**: Event launched when an ad is paused. 708 | * **adresumed**: Event launched when an ad is resumed. 709 | * **adskipped**: Event launched when an ad is skipped. 710 | * **adfirstquartile**: Event is fired when the 25% of the ad’s duration has been reached. 711 | * **admidpoint**: Event is fired when the 50% of the ad’s duration has been reached. 712 | * **adthirdquartile**: Event is fired when the 75% of the ad’s duration has been reached. 713 | * **adimpression**: Event launched when ad impression is sent to the server. 714 | * **aderror**: Event launched when there is an error loading the ad. 715 | * **adpodcompleted**: Event launched when an ad block has been completed. 716 | 717 | ```js 718 | nexplayer.AdsEvents("aderror", function(e) { 719 | console.log("aderror", e); 720 | }); 721 | ``` 722 | -------------------------------------------------------------------------------- /ps4/getting_started.md: -------------------------------------------------------------------------------- 1 | 2 | # Getting Started 3 | 4 | > :warning: Since the version 1.2.6 it is mandatory to use a WebMAF version higger or equal than 2.6.0. 5 | 6 | ### Sample Integration 7 | 8 | Integrating NexPlayer into an HTML5 file: 9 | 10 | ```html 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | NexPlayer 21 | 22 | 23 | 31 | 32 | 33 |
    34 | 35 | 36 | 37 | 47 | 48 | 49 | ``` 50 | 51 |

    Please note that replacing the license key is mandatory. License key should have been already sent to your inbox or you can request one from support.madrid@nexplayer.com.

    52 |
    53 | 54 |

    As for PS5, in order to be able to use NexPlayer's SDK for PS4, a JSON file is needed. This JSON file must be hosted in the root of the domain where the application is hosted. For example, if the app is hosted in https://example.com/app the JSON file must be accessible from the path https://example.com/userAppId.json. 55 | 56 | Please, contact NexPlayer's support (supportmadrid@nexplayer.com) to request this file.

    57 |
    58 | 59 | ### Step-by-Step Integration Guide 60 | 61 | To integrate NexPlayer™ into your project you must complete the following steps: 62 | 63 | - The NexPlayer™ JavaScript library should be included in the HTML file: 64 | 65 | ```html 66 | 67 | ``` 68 | 69 |

    Please note that the use of https to call our library is mandatory.
    70 |

    71 | 72 | - A div that will contain the video and the UI has to be declared: 73 | ```html 74 | 75 | ... 76 |
    77 | ... 78 | 79 | ``` 80 | - The player should be initialized by entering the previous div to the init method: 81 | ```js 82 | var player = new nexplayer.NexPlayer(); 83 | player.init({ 84 | key: 'ENTER YOUR LICENSE KEY HERE', 85 | div: document.getElementById("player"), 86 | src: 'https://livesim.dashif.org/dash/vod/testpic_2s/multi_subs.mpd', 87 | autoplay: true, 88 | }); 89 | ``` 90 | 91 | ## NexPlayer Configuration 92 | 93 | There are a substantial number of customizable options for NexPlayer™ including: the name and subtitle format of the video, a logo for the company, the DRM information, a VAST link, and the thumbnail preview... 94 | 95 | ```js 96 | key: 'License key to validate the playback', // Mandatory 97 | div: document.getElementById('player'), // Mandatory 98 | src: 'URL video', // Mandatory 99 | adsParamsToEncode: Array, // Optional, used to encode adURL parameters 100 | autoplay: true, // Optional 101 | callbacksForPlayer: callback, // Optional callback called with the player instances 102 | debug: true, // Optional 103 | drm: [{ 104 | keySystem: 'DRM Type (eg. com.widevine.alpha)', license: 'URI for the DRM Key', 105 | customData: [{fieldName: 'Header Field Name', value: 'Header Field Value'}], 106 | NexCallback: OptionalDRMCallbackForFairPlay 107 | }], // Optional DRM information 108 | thumbnails: { 109 | canvas: HTMLCanvasElement; // Optional 110 | urlVtt: "VTT URL"; // Optional 111 | urlImg: "string"; // Optional 112 | chunkLimit: number; // Optional 113 | chunkTotal: number; // Optional 114 | }, // Optional 115 | externalSubtitles: { 116 | src: "URL for the subtitles file", 117 | language: "Subtitle language", 118 | }, // Optional 119 | mutedAtStart: true, // Optional 120 | resumePosition: number, // Optional, used for starting the video from the given position in seconds. 121 | trailer: boolean,// Optional, by default is set to false. Set to true when a stream should be considered a trailer. 122 | useNewRelicTracker: boolean, 123 | // You need the tracker library in order to be able to use the tracker. Ask NexPlayer team for it. 124 | vast: 'URL with a VAST/VPAID/VMAP advertisement', // Optional 125 | adURL: string, // Optional 126 | captionDisplayer: ICaptionsDisplayer, // Optional 127 | ``` 128 | -------------------------------------------------------------------------------- /ps4/integrations.md: -------------------------------------------------------------------------------- 1 | # Integrations  2 | 3 | ## New Relic 4 | 5 | This document describes the integration of a New Relic tracker and NexPlayer. 6 | 7 | ### Quick start 8 | 9 | The two following scripts must be included before NexPlayer does: 10 | 11 | ```js 12 | 13 | 14 | 15 | 16 | 17 | ``` 18 | 19 | In order to make New Relic work the property 'useNewRelicTracker' must be set to true in the Setup: 20 | 21 | ```js 22 | var player = null; 23 | var video = null; 24 | 25 | // Pass this function to the Setup method as below 26 | var callBackWithPlayers = function (nexplayerInstance, videoElement) { 27 | 28 | // Retrieve the player and video instances 29 | player = nexplayerInstance; 30 | video = videoElement; 31 | }; 32 | 33 | // Create and initialize the player 34 | nexplayer.Setup({ 35 | key: 'YOUR LICENSE KEY', 36 | div: document.getElementById('player'), 37 | callbacksForPlayer: callBackWithPlayers, 38 | src: 'YOUR STREAM URL' 39 | useNewRelicTracker: true, 40 | // ... 41 | }); 42 | ``` 43 | 44 | Adding these two scripts and the property is all it takes for New Relic to work along NexPlayer. Note that the "agent" script is a customer's own file while "newrelic-video-nexplayer.min.js" is provided by our team and must be requested in order to make use of it. No extra steps are needed in order to set the communication between the player and the tracker as that is already managed via the latter script. 45 | 46 | ### Methods 47 | 48 | Custom data to be tracked can be added and removed using the following methods: 49 | - [addTrackerData()](ps5/api.md?id=addtrackerdata) 50 | - [removeTrackerData()](ps5/api.md?id#removetrackerdata) -------------------------------------------------------------------------------- /ps4/releases.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Releases 4 | 5 | Each version of the SDK is hosted in a CDN to allow faster and more efficient developments. Optionally, the library can be downloaded and hosted on a custom server. 6 | 7 | #### Version 1.2.6 8 | 9 | ``` 10 | https://nexplayer.nexplayersdk.com/NexHTML5/1.2.6_20220705/nexplayer.js 11 | ``` 12 | > :warning: Since this version it is mandatory to use a WebMAF version higger or equal than 2.6.0. 13 | 14 | **New features:** 15 | - Implemented videoProgressTime event. 16 | - Now audioStream object includes a name property with a unique name to differentiate the tracks in case they have same language. 17 | 18 | **Bug fixes:** 19 | - Fixed issue when using the property adsParamsToEncode. When a value in the ad URL parameters was duplicated the ad URL was cut off. 20 | 21 | Date: July 5th 2022 22 | 23 | #### Version 1.2.5 24 | 25 | ``` 26 | https://nexplayer.nexplayersdk.com/NexHTML5/1.2.5_20211025/nexplayer.js 27 | ``` 28 | 29 | **Bug fixes:** 30 | - Subtitles tracks were not being notified correctly when they were detected. Now, it is only necessary to listen to "newsubtitlesdataloaded" event to be notified when a new subtitle is loaded. 31 | 32 | Date: October 25th 2021 33 | 34 | #### Version 1.2.4 35 | 36 | **New features:** 37 | - Implemented garbage collection for thumbnails in order to get rid of out of memory errors. Chunks that are out of the thumbnails loading range are removed from the loaded chunks array. 38 | 39 | Date: September 23rd 2021 40 | 41 | #### Version 1.2.3 42 | 43 | **New features:** 44 | - Added property "adsParamsToEncode" that must provide an Array of strings specifying the parameters in the ad URL to be encoded. For example: ["video_url_to_fetch"] 45 | - Added new methods in order to fetch properties status (more info here): 46 | 47 | * **getCurrentContentType()**: string → returns the the type of the current asset (“Ad”, “Main content” or “None”). 48 | * **getCurrentTime()**: number → returns the current time of the video. 49 | * **getPlaybackRate()**: number → returns the playback rate/speed of the video. 50 | * **getProtocol()**: NexProtocol → returns the protocol of the stream used: 51 | * **getVersion()**: string → returns the version of the SDK. 52 | * **isCurrentAssetAd()**: boolean → indicates whether the current asset playing is an ad or not; 53 | * **isCurrentAssetMuted()**: boolean → returns whether the ad or the main content is muted or not. 54 | 55 | - Added a new event, “bufferType”. this new event will be fired when a buffering event occurs and it specifies what type of buffering occurred ("Connection", "Seek", "Initial", "Background"). More info about events here. 56 | 57 | **Bug fixes:** 58 | - Fixed non-resolving promises which lead to out of memory errors when fetching thumbnails 59 | 60 | Date: August 10th 2021 61 | 62 | #### Version 1.2.2 63 | 64 | **Bug fixes:** 65 | - Renamed Frame object "canvas" property to "thumbnail". 66 | - Fixed permanent pending promise when fetching thumbnails that lead to "undefined" resolutions. 67 | 68 | Date: July 30th 2021 69 | 70 | #### Version 1.2.1 71 | 72 | **Bug fixes:** 73 | - Fixed thumbails width and height properties as they were swapped. 74 | 75 | Date: July 29th 2021 76 | 77 | #### Version 1.2.0 78 | 79 | New features: 80 | - Added SSAI support for PS4. It can be used through the property 'ssaiMediaTailor'. 81 | 82 | Property: 83 | * ssaiMediaTailor: 84 | { 85 | baseURL: string, //Base URL for Video and Ads 86 | playbackURL: string, //Video URL to be attached to the baseURL 87 | adsParams: 88 | { 89 | "param1": string, //Ad URL to be attached to the baseURL 90 | } 91 | } 92 | 93 | - Thumbnail enhancements. The method getThumbnailAt(time) now returns a promise instead of a 94 | thumbnail. 95 | 96 | * getThumbnailAt(time) // returns a Promise awaiting the corresponding thumbnail in a specific 97 | time value 98 | 99 | Date: July 23rd 2021 100 | 101 | #### Version 1.1.9 102 | 103 | **New features:** 104 | - Added New Relic support for PS4. It can be used through the property 'useNewRelicTracker'. 105 | A tracker library and agent must be included for this feature to work. Ask NexPlayer team for it. 106 | Custom data methods have also been added: 107 | 108 | Property: 109 | * useNewRelicTracker: boolean, // true when enabling New Relic, false when not 110 | 111 | Methods: 112 | * addTrackerData(key: string, value: any) 113 | * removeTrackerData(key: string, value: any) 114 | - Added milestone management for trailers and scrubbing. 115 | A stream will be considered as a trailer when using the following property in the Setup: 116 | * trailer: boolean, // true when stream should be considered a trailer, false when not 117 | - 60 seconds in event added. When the video current time is at least 60 seconds, this 118 | event gets triggered. This just happens once for each player instance. Usage: 119 | * addEventListener('60secondsin', function) 120 | - Added PS4 SDK protection using an external app ID. 121 | - Thumbnail enhancements. Vtts can now reference another Vtt inside them. 122 | Two new methods for thumbnail retrieval have been added: 123 | * getThumbnails() // returns the current loaded thubmnails 124 | * getThumbnailAt(time) // returns the corresponding thumbnail in a specific time value 125 | 126 | Date: May 25th 2021 127 | 128 | #### Version 1.1.8 129 | 130 | **New features**: 131 | - Setup can be called prior to Unmount in order to reduce the delay when restarting 132 | the player. The configuration provided in the last Setup call is saved and will be 133 | used to initialize the player as soon as Unmount ends. 134 | - CC style has been changed to use text shadows instead of a background colour. 135 | - Increased log interval when waiting for player to unmount and reduced the time until 136 | the player considers failure when destroying itself. 137 | 138 | Date: April 20th 2021 139 | 140 | #### Version 1.1.7 141 | 142 | **New features**: 143 | - UnMount function has changed its return type. Now returns a Promise which is resolved when the player 144 | is the destroyed completely, as well as the method destroy of the player: 145 | 146 | * destroy(): Promise; 147 | * export declare var UnMount: (div: HTMLDivElement) => Promise; 148 | 149 | Check the API for more info. 150 | 151 | **Bug fixes:** 152 | - Seeking becomes broken after we destroy the player while 'seeking' previous content. 153 | - No cc on live streams for PS4. 154 | - Overlapping captions are shown multiple times when using WebVTT subtitles on VOD. 155 | 156 | Date: March 30th 2021 157 | 158 | #### Version 1.1.6 159 | 160 | **New features:** 161 | - New player event "newsubtitlesdataloaded". It is fired when new text track are detected. Currently, embedded CC text track 162 | is detected later so this event can be fired several times. You should use this event for retrieving the current text tracks of the stream. 163 | - Added "stalled" event. It is fired when no more data is buffered and the player can't continue the playback. 164 | 165 | **Bug fixes:** 166 | - Fixed issue regarding the delayed CC on VoD content. 167 | - Embedded CC cea 608/708 working on live streams. 168 | - Text missing when using embedded CC cea 608/708. 169 | - "seeked" event is working again. 170 | - Player's state "playing" is only reported when it is actually playing. 171 | 172 | Date: March 18th 2021 173 | 174 | #### Version 1.1.5 175 | 176 | - Added support for static and chunked thumbnails. Include the following property in Nexplayer's SetUp: 177 | > Static: 178 | thumbnails: 179 | { 180 | canvas: document.getElementById("canvas_id"), 181 | urlVtt: "url_string", 182 | urlImg: "url_string", 183 | } 184 | * canvas: HTML Canvas element where thumbnails will be displayed on. 185 | * urlVtt: Thumbnail VTT URL containing each thumbnail's time interval and coordinates. 186 | * urlImg: Thumbnail sprite URL containing multiple thumbnails stiched together. 187 | > Chunked: 188 | thumbnails: 189 | { 190 | canvas: document.getElementById("canvas_id"), 191 | urlVtt: "url_string", 192 | chunkLimit: 3, 193 | chunkTotal: 30, 194 | } 195 | * canvas: HTML Canvas element where thumbnails will be displayed on. 196 | * urlVtt: Thumbnail VTT URL containing each thumbnail's time interval and image URL. 197 | * chunkLimit (optional): Maximum number of thumbnail chunks to load at a time. Default: 1. 198 | * chunkTotal (optional): Total number of chunks to split the thumbnails' array into. Default: 1. 199 | 200 | **Bug fixes:** 201 | - Improved algorithm that filters the subtitles cues which removes the delay observed 202 | on the subtitles shown. 203 | 204 | Date: March 9th 2021 205 | 206 | #### Version 1.1.4 207 | 208 | **New features:** 209 | - Added property "detail" into the events objects for offering backwards compatibility with the legacy SDK. 210 | 211 | Date: March 4th 2021 212 | 213 | #### Version 1.1.3 214 | 215 | **New features:** 216 | - New events regarding the progression of the video: 217 | - "videofirstquartile": fired when the video reaches the point 25% of the total duration. 218 | - "videomidpoint": fired when the video reaches the point 50% of the total duration. 219 | - "videothirdquartile": fired when the video reaches the point 75% of the total duration. 220 | - All of these events will contain the property "quartileTime" in the property "_data" of the event received: 221 | 222 | ```js 223 | nexplayer.PlayerEvents("videofirstquartile", function (e) { 224 | console.log(" VIDEO FIRST QUARTILE --------------------", e._data.quartileTime); 225 | }); 226 | ``` 227 | 228 | Date: February 26th 2021 229 | 230 | #### Version 1.1.2 231 | 232 | - Official release containing all the features and bug fixes from the previous versions. 233 | 234 | Date: February 23rd 2021 235 | 236 | #### Version 1.1.1 237 | 238 | **Bug fixes:** 239 | - Fixed state issue. 240 | 241 | Date: February 18th 2021 242 | 243 | #### Version 1.1.0 244 | 245 | **Bug fixes:** 246 | - DURATION_CHANGE event is triggered when the duration of the stream 247 | is retrieved. The event will contain the duration of the video. 248 | - getCurrentSubtitle() method now returns a number. It represents the index of the 249 | current activated subtitle, -1 if no subtitle is activated. 250 | - BUFFERING event is triggered when player changes to buffering state. 251 | - videometrics object related error shouldn't be appearing. We can't confirm 252 | as we couldn't reproduce it even once. 253 | 254 | **New features:** 255 | - SEEKING event added. It is triggered when the player starts seeking. 256 | - SEEKED event added. It is triggered when the player finishes seeking. 257 | - isSeeking() method. It returns a boolean indicating if the player 258 | is currently seeking. 259 | - New volume methods are implemented for the player and the adsManager: 260 | setVolume(value:number), getVolume():number, 261 | setMute(mute:boolean) and getMute(): boolean. 262 | 263 | Date: February 17th 2021 264 | 265 | 266 |
    267 |
    268 |
    269 |
    270 |
    271 |
    272 |
    273 |
    274 | 275 | --- 276 | 277 | #### Third Party Licenses 278 | 279 | This is a summary of all third party licenses. NexPlayer licenses will be provided upon purchase. 280 | 281 | ``` 282 | promise-polyfill (https://github.com/taylorhakes/promise-polyfill): 283 | 284 | Copyright (c) 2014 Taylor Hakes 285 | Copyright (c) 2014 Forbes Lindesay 286 | 287 | Permission is hereby granted, free of charge, to any person obtaining a copy 288 | of this software and associated documentation files (the "Software"), to deal 289 | in the Software without restriction, including without limitation the rights 290 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 291 | copies of the Software, and to permit persons to whom the Software is 292 | furnished to do so, subject to the following conditions: 293 | 294 | The above copyright notice and this permission notice shall be included in 295 | all copies or substantial portions of the Software. 296 | 297 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 298 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 299 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 300 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 301 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 302 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 303 | THE SOFTWARE. 304 | 305 | React (https://github.com/facebook/react): 306 | 307 | MIT License 308 | 309 | Copyright (c) 2013-present, Facebook, Inc. 310 | 311 | Permission is hereby granted, free of charge, to any person obtaining a copy 312 | of this software and associated documentation files (the "Software"), to deal 313 | in the Software without restriction, including without limitation the rights 314 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 315 | copies of the Software, and to permit persons to whom the Software is 316 | furnished to do so, subject to the following conditions: 317 | 318 | The above copyright notice and this permission notice shall be included in all 319 | copies or substantial portions of the Software. 320 | 321 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 322 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 323 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 324 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 325 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 326 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 327 | SOFTWARE. 328 | 329 | Redux (https://github.com/reactjs/redux): 330 | 331 | The MIT License (MIT) 332 | 333 | Copyright (c) 2015-present Dan Abramov 334 | 335 | Permission is hereby granted, free of charge, to any person obtaining a copy 336 | of this software and associated documentation files (the "Software"), to deal 337 | in the Software without restriction, including without limitation the rights 338 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 339 | copies of the Software, and to permit persons to whom the Software is 340 | furnished to do so, subject to the following conditions: 341 | 342 | The above copyright notice and this permission notice shall be included in all 343 | copies or substantial portions of the Software. 344 | 345 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 346 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 347 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 348 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 349 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 350 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 351 | SOFTWARE. 352 | 353 | away (https://www.npmjs.com/package/away) 354 | 355 | screenfull.js (https://github.com/sindresorhus/screenfull.js): 356 | 357 | MIT License 358 | 359 | Copyright (c) Sindre Sorhus (sindresorhus.com) 360 | 361 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 362 | 363 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 364 | 365 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 366 | 367 | element-resize-detector (https://github.com/wnr/element-resize-detector): 368 | 369 | The MIT License (MIT) 370 | 371 | Copyright (c) 2016 Lucas Wiener 372 | 373 | Permission is hereby granted, free of charge, to any person obtaining a copy 374 | of this software and associated documentation files (the "Software"), to deal 375 | in the Software without restriction, including without limitation the rights 376 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 377 | copies of the Software, and to permit persons to whom the Software is 378 | furnished to do so, subject to the following conditions: 379 | 380 | The above copyright notice and this permission notice shall be included in all 381 | copies or substantial portions of the Software. 382 | 383 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 384 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 385 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 386 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 387 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 388 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 389 | SOFTWARE. 390 | 391 | script.js (https://github.com/ded/script.js) 392 | 393 | rmp-vast (https://github.com/radiantmediaplayer/rmp-vast#license): 394 | 395 | The MIT License (MIT) 396 | 397 | 398 | Shaka player (https://github.com/google/shaka-player): 399 | 400 | Apache License 401 | Version 2.0, January 2004 402 | http://www.apache.org/licenses/ 403 | 404 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 405 | 406 | 1. Definitions. 407 | 408 | "License" shall mean the terms and conditions for use, reproduction, 409 | and distribution as defined by Sections 1 through 9 of this document. 410 | 411 | "Licensor" shall mean the copyright owner or entity authorized by 412 | the copyright owner that is granting the License. 413 | 414 | "Legal Entity" shall mean the union of the acting entity and all 415 | other entities that control, are controlled by, or are under common 416 | control with that entity. For the purposes of this definition, 417 | "control" means (i) the power, direct or indirect, to cause the 418 | direction or management of such entity, whether by contract or 419 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 420 | outstanding shares, or (iii) beneficial ownership of such entity. 421 | 422 | "You" (or "Your") shall mean an individual or Legal Entity 423 | exercising permissions granted by this License. 424 | 425 | "Source" form shall mean the preferred form for making modifications, 426 | including but not limited to software source code, documentation 427 | source, and configuration files. 428 | 429 | "Object" form shall mean any form resulting from mechanical 430 | transformation or translation of a Source form, including but 431 | not limited to compiled object code, generated documentation, 432 | and conversions to other media types. 433 | 434 | "Work" shall mean the work of authorship, whether in Source or 435 | Object form, made available under the License, as indicated by a 436 | copyright notice that is included in or attached to the work 437 | (an example is provided in the Appendix below). 438 | 439 | "Derivative Works" shall mean any work, whether in Source or Object 440 | form, that is based on (or derived from) the Work and for which the 441 | editorial revisions, annotations, elaborations, or other modifications 442 | represent, as a whole, an original work of authorship. For the purposes 443 | of this License, Derivative Works shall not include works that remain 444 | separable from, or merely link (or bind by name) to the interfaces of, 445 | the Work and Derivative Works thereof. 446 | 447 | "Contribution" shall mean any work of authorship, including 448 | the original version of the Work and any modifications or additions 449 | to that Work or Derivative Works thereof, that is intentionally 450 | submitted to Licensor for inclusion in the Work by the copyright owner 451 | or by an individual or Legal Entity authorized to submit on behalf of 452 | the copyright owner. For the purposes of this definition, "submitted" 453 | means any form of electronic, verbal, or written communication sent 454 | to the Licensor or its representatives, including but not limited to 455 | communication on electronic mailing lists, source code control systems, 456 | and issue tracking systems that are managed by, or on behalf of, the 457 | Licensor for the purpose of discussing and improving the Work, but 458 | excluding communication that is conspicuously marked or otherwise 459 | designated in writing by the copyright owner as "Not a Contribution." 460 | 461 | "Contributor" shall mean Licensor and any individual or Legal Entity 462 | on behalf of whom a Contribution has been received by Licensor and 463 | subsequently incorporated within the Work. 464 | 465 | 2. Grant of Copyright License. Subject to the terms and conditions of 466 | this License, each Contributor hereby grants to You a perpetual, 467 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 468 | copyright license to reproduce, prepare Derivative Works of, 469 | publicly display, publicly perform, sublicense, and distribute the 470 | Work and such Derivative Works in Source or Object form. 471 | 472 | 3. Grant of Patent License. Subject to the terms and conditions of 473 | this License, each Contributor hereby grants to You a perpetual, 474 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 475 | (except as stated in this section) patent license to make, have made, 476 | use, offer to sell, sell, import, and otherwise transfer the Work, 477 | where such license applies only to those patent claims licensable 478 | by such Contributor that are necessarily infringed by their 479 | Contribution(s) alone or by combination of their Contribution(s) 480 | with the Work to which such Contribution(s) was submitted. If You 481 | institute patent litigation against any entity (including a 482 | cross-claim or counterclaim in a lawsuit) alleging that the Work 483 | or a Contribution incorporated within the Work constitutes direct 484 | or contributory patent infringement, then any patent licenses 485 | granted to You under this License for that Work shall terminate 486 | as of the date such litigation is filed. 487 | 488 | 4. Redistribution. You may reproduce and distribute copies of the 489 | Work or Derivative Works thereof in any medium, with or without 490 | modifications, and in Source or Object form, provided that You 491 | meet the following conditions: 492 | 493 | (a) You must give any other recipients of the Work or 494 | Derivative Works a copy of this License; and 495 | 496 | (b) You must cause any modified files to carry prominent notices 497 | stating that You changed the files; and 498 | 499 | (c) You must retain, in the Source form of any Derivative Works 500 | that You distribute, all copyright, patent, trademark, and 501 | attribution notices from the Source form of the Work, 502 | excluding those notices that do not pertain to any part of 503 | the Derivative Works; and 504 | 505 | (d) If the Work includes a "NOTICE" text file as part of its 506 | distribution, then any Derivative Works that You distribute must 507 | include a readable copy of the attribution notices contained 508 | within such NOTICE file, excluding those notices that do not 509 | pertain to any part of the Derivative Works, in at least one 510 | of the following places: within a NOTICE text file distributed 511 | as part of the Derivative Works; within the Source form or 512 | documentation, if provided along with the Derivative Works; or, 513 | within a display generated by the Derivative Works, if and 514 | wherever such third-party notices normally appear. The contents 515 | of the NOTICE file are for informational purposes only and 516 | do not modify the License. You may add Your own attribution 517 | notices within Derivative Works that You distribute, alongside 518 | or as an addendum to the NOTICE text from the Work, provided 519 | that such additional attribution notices cannot be construed 520 | as modifying the License. 521 | 522 | You may add Your own copyright statement to Your modifications and 523 | may provide additional or different license terms and conditions 524 | for use, reproduction, or distribution of Your modifications, or 525 | for any such Derivative Works as a whole, provided Your use, 526 | reproduction, and distribution of the Work otherwise complies with 527 | the conditions stated in this License. 528 | 529 | 5. Submission of Contributions. Unless You explicitly state otherwise, 530 | any Contribution intentionally submitted for inclusion in the Work 531 | by You to the Licensor shall be under the terms and conditions of 532 | this License, without any additional terms or conditions. 533 | Notwithstanding the above, nothing herein shall supersede or modify 534 | the terms of any separate license agreement you may have executed 535 | with Licensor regarding such Contributions. 536 | 537 | 6. Trademarks. This License does not grant permission to use the trade 538 | names, trademarks, service marks, or product names of the Licensor, 539 | except as required for reasonable and customary use in describing the 540 | origin of the Work and reproducing the content of the NOTICE file. 541 | 542 | 7. Disclaimer of Warranty. Unless required by applicable law or 543 | agreed to in writing, Licensor provides the Work (and each 544 | Contributor provides its Contributions) on an "AS IS" BASIS, 545 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 546 | implied, including, without limitation, any warranties or conditions 547 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 548 | PARTICULAR PURPOSE. You are solely responsible for determining the 549 | appropriateness of using or redistributing the Work and assume any 550 | risks associated with Your exercise of permissions under this License. 551 | 552 | 8. Limitation of Liability. In no event and under no legal theory, 553 | whether in tort (including negligence), contract, or otherwise, 554 | unless required by applicable law (such as deliberate and grossly 555 | negligent acts) or agreed to in writing, shall any Contributor be 556 | liable to You for damages, including any direct, indirect, special, 557 | incidental, or consequential damages of any character arising as a 558 | result of this License or out of the use or inability to use the 559 | Work (including but not limited to damages for loss of goodwill, 560 | work stoppage, computer failure or malfunction, or any and all 561 | other commercial damages or losses), even if such Contributor 562 | has been advised of the possibility of such damages. 563 | 564 | 9. Accepting Warranty or Additional Liability. While redistributing 565 | the Work or Derivative Works thereof, You may choose to offer, 566 | and charge a fee for, acceptance of support, warranty, indemnity, 567 | or other liability obligations and/or rights consistent with this 568 | License. However, in accepting such obligations, You may act only 569 | on Your own behalf and on Your sole responsibility, not on behalf 570 | of any other Contributor, and only if You agree to indemnify, 571 | defend, and hold each Contributor harmless for any liability 572 | incurred by, or claims asserted against, such Contributor by reason 573 | of your accepting any such warranty or additional liability. 574 | 575 | END OF TERMS AND CONDITIONS 576 | 577 | APPENDIX: How to apply the Apache License to your work. 578 | 579 | To apply the Apache License to your work, attach the following 580 | boilerplate notice, with the fields enclosed by brackets "[]" 581 | replaced with your own identifying information. (Don't include 582 | the brackets!) The text should be enclosed in the appropriate 583 | comment syntax for the file format. We also recommend that a 584 | file or class name and description of purpose be included on the 585 | same "printed page" as the copyright notice for easier 586 | identification within third-party archives. 587 | 588 | Copyright [yyyy] [name of copyright owner] 589 | 590 | Licensed under the Apache License, Version 2.0 (the "License"); 591 | you may not use this file except in compliance with the License. 592 | You may obtain a copy of the License at 593 | 594 | http://www.apache.org/licenses/LICENSE-2.0 595 | 596 | Unless required by applicable law or agreed to in writing, software 597 | distributed under the License is distributed on an "AS IS" BASIS, 598 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 599 | See the License for the specific language governing permissions and 600 | limitations under the License. 601 | 602 | ``` -------------------------------------------------------------------------------- /ps5/css_customizations.md: -------------------------------------------------------------------------------- 1 | # CSS Customization 2 | 3 | 4 | 5 | This document provides an explanation of the UI and all the related CSS classes that can be modified to customize the default UI of the player. 6 | 7 | ### CSS Classes 8 | 9 | | CSS Class | Description | 10 | | --- | --- | 11 | | .nexplayer_play_pause | Customize the play/pause button | 12 | | .nexplayer_volume | Customize the volume button | 13 | | .nexplayer_current_time | Customize the play/pause button | 14 | | .nexplayer_title | Customize the title text | 15 | | .nexplayer_language | Customize the full screen button | 16 | | .nexplayer_full_screen | Customize the play/pause button | 17 | | .nexplayer_total_time | Customize the total time text | 18 | | .nexplayer_option_ui | Customize the language options menu | 19 | | .nexplayer_logo_div | Customize the logo watermark | 20 | | .nexplayer_playback_position | Customize the already played part of the seekbar | 21 | | .nexplayer_bufferlevel_position | Customize the buffered part of the seekbar | 22 | | .nexplayer_base_seekbar | Customize the default part of the seekbar | 23 | | .nexplayer_circleBase | Customize the current postion marker of the seekbar | 24 | 25 | Please take into account that the seekbar and the volume control bar are the same component. So if you modify the .nexplayer_playback_position, .nexplayer_bufferlevel_position, .nexplayer_base_seekbar, or .nexplayer_circleBase css classes, then the volume control bar will change accordingly. 26 | 27 | ?> Please note that to overwrite the styles, the JavaScript file should be imported before the desired customizations. 28 | 29 | ### Responsive Configuration 30 | 31 | The size of the UI adapts according to the size of the player. There are three different css classes that control this behavior: 32 | 33 | | CSS Class | Description | 34 | | --- | --- | 35 | | .nexplayer_container | Main container | 36 | | .nexplayer_container_normal | Standard size of the player > 768px | 37 | | .nexplayer_container_mobile | Mobile size of the player > 461px | 38 | | .nexplayer_container_tiny | Tiny size of the player < 461px | 39 | 40 | Modifying the .nexplayer_container class will bring the changes to every platform. In order to customize individual or more platforms in a different way, the .nexplayer_container class should be followed by the desired platform class: 41 | 42 | ``` 43 | .nexplayer_container .nexplayer_container_normal 44 | 45 | .nexplayer_container .nexplayer_container_mobile 46 | 47 | .nexplayer_container .nexplayer_container_tiny 48 | 49 | ``` 50 | 51 | ### Font 52 | 53 | The font of the player can be customized using the following code: 54 | 55 | ```css 56 | .nexplayer_container { 57 | font-size: 20pt; 58 | color: blue; 59 | font-family: sans-serif; 60 | } 61 | 62 | ``` 63 | 64 | ### Overwriting Styles 65 | 66 | To overwrite the CSS styles of the default UI, the correct container name has to be added: 67 | 68 | ### Button 69 | 70 | ```css 71 | .nexplayer_container .nexplayer_container_normal .nexplayer_play_pause { 72 | background-color: yellow; 73 | } 74 | 75 | .nexplayer_container .nexplayer_container_mobile .nexplayer_play_pause { 76 | background-color: blue; 77 | } 78 | 79 | .nexplayer_container .nexplayer_container_tiny .nexplayer_play_pause { 80 | background-color: red; 81 | } 82 | 83 | ``` 84 | 85 | ### Seekbar 86 | 87 | ```css 88 | .nexplayer_container .nexplayer_circleBase { 89 | background-color: white; 90 | } 91 | 92 | .nexplayer_container .nexplayer_base_seekbar { 93 | background-color: blue; 94 | } 95 | 96 | .nexplayer_container .nexplayer_bufferlevel_position { 97 | background-color: yellow; 98 | } 99 | 100 | .nexplayer_container .nexplayer_playback_position { 101 | background-color: red; 102 | } 103 | ``` 104 | 105 | ### Modify the Selected Language Style 106 | 107 | To customize the selected language style on the .nexplayer_option_ui menu, the following code should be used: 108 | 109 | ```css 110 | .nexplayer_container .nexplayer_option_ui .nexplayer_selected_element { 111 | color: green; 112 | } 113 | ``` 114 | 115 | ### Control Bar Style 116 | 117 | To customize the bottom control bar: 118 | 119 | ```css 120 | .nexplayer_container .nexplayer_bar { 121 | background-color: green; 122 | } 123 | 124 | ``` 125 | 126 | ### Icon Changing 127 | 128 | In order to change the default icons of the player, the following code should be used: 129 | 130 | ```css 131 | .nexplayer_container .nexplayer_IconPause { 132 | background-image: url(replay.svg) !important; 133 | } 134 | ``` 135 | 136 | Please note that we recommend using SVG icons. The list of all the CSS classes that defines the icons is: 137 | 138 | | CSS Class | Description | 139 | | --- | --- | 140 | | .nexplayer_IconPlay | Play icon | 141 | | .nexplayer_IconPause | Pause icon | 142 | | .nexplayer_IconReset | Reset icon | 143 | | .nexplayer_IconVolume | Volume icon | 144 | | .nexplayer_IconMuted | Muted volume icon | 145 | | .nexplayer_IconFullscreen | Full screen icon | 146 | | .nexplayer_IconExitFullscreen | Exit full screen icon | 147 | | .nexplayer_IconLanguage | Language options icon | 148 | | .nexplayer_IconTriangle | The triangle below the .nexplayer_option_ui | 149 | 150 | ### Hover Effect Icons 151 | 152 | Any icon has a predefined effect when the user hovers the mouse over or touches an icon. 153 | 154 | This behavior can be customized with the hover selector on the .nexplayer_icon CSS class: 155 | 156 | ```css 157 | .nexplayer_container .nexplayer_icon:hover { 158 | filter: drop-shadow(8px 8px 8px red); 159 | } 160 | ``` 161 | -------------------------------------------------------------------------------- /ps5/getting_started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## Sample Integration 4 | 5 | Integrating NexPlayer into an HTML5 file: 6 | 7 | ```html 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | NexPlayer 17 | 46 | 47 | 48 | 49 |

    NexPlayer for WebApps

    50 |
    51 |

    Unsupported protocol

    52 |

    Loading HTML using the file protocol can't be supported.

    53 |
    54 |
    55 |
    56 |
    57 | 58 | 59 | 74 | 75 | 76 | ``` 77 | 78 | 79 | > Please note that replacing the license key is mandatory. License key should have been already sent to your inbox or you can request one from support.madrid@nexplayer.com. Also don't forget to load jquery and add the "defer" tag to the nexplayer.js loading script. 80 | 81 | ## Step-by-Step Integration Guide 82 | 83 | To integrate NexPlayer into your project you must complete the following steps: 84 | 85 | - The NexPlayer JavaScript library should be included in the HTML file: 86 | 87 | ```html 88 | 89 | ``` 90 | 91 | > Please note that the use of https to call our library is mandatory.
    Also it is necessary to use the "defer" tag. 92 | 93 | 94 | - A div that will contain the video and the UI has to be declared: 95 | 96 | ```html 97 | 98 | ... 99 |
    100 | ... 101 | 102 | ``` 103 | 104 | - The player should be initialized by entering the previous div to the Setup method: 105 | 106 | ```js 107 | nexplayer.Setup({ 108 | key: 'ENTER YOUR LICENSE KEY HERE', 109 | div: document.getElementById('player'), 110 | src: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' 111 | }); 112 | ``` 113 | 114 | ## Remote Controller 115 | 116 | You can create your own custom controls for a seemless integration of NexPlayer into your Tizen app: 117 | 118 | ```js 119 | document.addEventListener('keydown', function(e) { 120 | console.log('Key pressed ---> ' + e.keyCode); 121 | switch (e.keyCode) { 122 | case 13: // Enter 123 | player.buttonsClickFocus(); 124 | break; 125 | case 37: // LEFT arrow 126 | if (player.isPlayBackBarFocused() || !player.isControlBarOpen()) { 127 | if (!player.isControlBarOpen()) { 128 | player.toggleControlBar(); 129 | player.focusOnPlaybackBar(); 130 | } 131 | player.seek(videoElement.currentTime - 60); 132 | } else { 133 | player.buttonsPreviousFocus(); 134 | } 135 | break; 136 | case 39: // RIGHT arrow 137 | if (player.isPlayBackBarFocused() || !player.isControlBarOpen()) { 138 | if (!player.isControlBarOpen()) { 139 | player.toggleControlBar(); 140 | player.focusOnPlaybackBar(); 141 | } 142 | player.seek(videoElement.currentTime + 60); 143 | } else { 144 | player.buttonsNextFocus(); 145 | } 146 | break; 147 | case 38: // UP arrow 148 | if (player.isLanguageMenuOpen()) { 149 | player.upSubtitle(); 150 | } else { 151 | player.upFocus(); 152 | } 153 | break; 154 | case 40: // DOWN arrow 155 | if (player.isLanguageMenuOpen()) { 156 | player.downSubtitle(); 157 | break; 158 | } 159 | 160 | if (!player.isControlBarOpen()) { 161 | //player.toggleControlBar(); 162 | player.focusOnButtonsBar(); 163 | } else { 164 | player.downFocus(); 165 | } 166 | break; 167 | } 168 | }); 169 | ``` 170 | 171 | 172 | #### Details 173 | 174 | Navigating inside the NexPlayer UI can be done by shifting the focus from one element to another with the remote controller. A function can be assigned to one of the buttons of the remote controller using remote control key codes: 175 | 176 | ```js 177 | { 178 | case 13: // Enter button for Samsung Controler 179 | player.buttonsClickFocus(); 180 | break; 181 | } 182 | ``` 183 | 184 | > Please note the need for a 'break;' line to exit each controller action 185 | 186 | All cases must be placed inside a listener to be able to operate at runtime: 187 | 188 | ```js 189 | document.addEventListener('keydown', function(e) { 190 | console.log('Key pressed ---> ' + e.keyCode); 191 | switch (e.keyCode) { 192 | "YOUR CONTROLS HERE" 193 | } 194 | }), 195 | ``` 196 | 197 | ## NexPlayer Configuration 198 | 199 | There are a substantial number of customizable options for NexPlayer including: the name and subtitle format of the video, a logo for the company, the DRM information, a VAST link, and the thumbnail preview... 200 | 201 | ```js 202 | key: 'License key to validate the playback', 203 | div: document.getElementById('player'), 204 | src: 'URL video', 205 | adsMode: string, 206 | addRequestFilter: Function, 207 | adsParamsToEncode: [ e.g. "video_url_to_fetch"], 208 | autoplay: true, 209 | callbacksForLogger: callback, 210 | callbacksForReturn: callback, 211 | callbackForSubtitles: callback, 212 | callbacksForPlayer: callback, 213 | cast: boolean, 214 | debug: true, 215 | defaultLanguage: string, 216 | disableKeyEvents: false, 217 | drm: [{ 218 | NexDRMType:'DRM Type (eg. com.widevine.alpha)', NexDRMKey: 'URI for the DRM Key', 219 | NexHeaders:[{FieldName: 'Header Field Name', FieldValue: 'Header Field Value'}], 220 | NexCallback:OptionalDRMCallbackForFairPlay 221 | }], 222 | dynamicThumbnails: false, 223 | externalSubtitles: [{ 224 | src: "Subtitles file URL", 225 | language: "Subtitle language", 226 | callback: function(e), 227 | },…], 228 | hideControlBarOnStart: boolean, 229 | hideUITime: boolean, 230 | improveStartUp: boolean, 231 | logosrc: 'URL logo of the company', 232 | mutedAtStart: true, 233 | preferredAudioCodec: Array, 234 | preferredVideoCodec: Array, 235 | poster: 'URL poster', 236 | reinitializeAfterAds: boolean, // Deprecated 237 | resumePosition: number, 238 | retryParameters: { 239 | streaming: { 240 | timeout: 30000, // timeout in ms, after which we abort 241 | stallTimeout: 5000, // stall timeout in ms, after which we abort 242 | connectionTimeout: 10000, // connection timeout in ms, after which we abort 243 | maxTries: 2, // the maximum number of requests before we fail 244 | retryDelay: 1000, // the base delay in ms between retries 245 | }, 246 | drm: {…}, // Same properties as streaming 247 | manifest: {…} // Same properties as streaming 248 | }, 249 | showAdsUI: true, 250 | showingFullUI: true, 251 | staticThumbnails: { 252 | src: 'URL of the VTT file', 253 | img: 'URL of the Image to fetch thumbs from', 254 | callback: function(e), 255 | }, 256 | startFullscreen: true, 257 | startingBufferLength: 50, 258 | subtitle: 'Subtitle name of the video', 259 | title: 'Name of the video', 260 | trailer: boolean, 261 | useDefaultControls: true, 262 | useNewRelicTracker: boolean, 263 | vast: 'URL with a VAST/VPAID/VMAP advertisement', 264 | adsLoadTimeout: 2000, 265 | ssaiMediaTailor: { 266 | baseURL: string, 267 | playbackURL: string, 268 | adsParams: 269 | { 270 | "param1": string, 271 | } 272 | }, 273 | bitrateConfig: {startingBitrate: num , maxBitrate: num, minBitrate: num}, 274 | pageUrl: 'https://mydomain.com', 275 | daiConfig: { 276 | ASSET_KEY : string, 277 | CONTENT_SOURCE_ID : string, 278 | VIDEO_ID : string, 279 | }, 280 | 281 | 282 | ``` 283 | 284 | -------------------------------------------------------------------------------- /ps5/integrations.md: -------------------------------------------------------------------------------- 1 | # Integrations  2 | 3 | ## New Relic 4 | 5 | This document describes the integration of a New Relic tracker and NexPlayer. 6 | 7 | ### Quick start 8 | 9 | The two following scripts must be included before NexPlayer does: 10 | 11 | ```js 12 | 13 | 14 | 15 | 16 | 17 | ``` 18 | 19 | In order to make New Relic work the property 'useNewRelicTracker' must be set to true in the Setup: 20 | 21 | ```js 22 | var player = null; 23 | var video = null; 24 | 25 | // Pass this function to the Setup method as below 26 | var callBackWithPlayers = function (nexplayerInstance, videoElement) { 27 | 28 | // Retrieve the player and video instances 29 | player = nexplayerInstance; 30 | video = videoElement; 31 | }; 32 | 33 | // Create and initialize the player 34 | nexplayer.Setup({ 35 | key: 'YOUR LICENSE KEY', 36 | div: document.getElementById('player'), 37 | callbacksForPlayer: callBackWithPlayers, 38 | src: 'YOUR STREAM URL' 39 | useNewRelicTracker: true, 40 | // ... 41 | }); 42 | ``` 43 | 44 | Adding these two scripts and the property is all it takes for New Relic to work along NexPlayer. Note that the "agent" script is a customer's own file while "newrelic-video-nexplayer.min.js" is provided by our team and must be requested in order to make use of it. No extra steps are needed in order to set the communication between the player and the tracker as that is already managed via the latter script. 45 | 46 | ### Methods 47 | 48 | Custom data to be tracked can be added and removed using the following methods: 49 | - [addTrackerData()](ps5/api.md?id=addtrackerdata) 50 | - [removeTrackerData()](ps5/api.md?id=removetrackerdata) 51 | 52 | ## Tizen Studio 53 | 54 | ### How to integerate NexPlayer Tizen SDK 55 | 56 | This document describes the integration of the NexPlayer Tizen SDK and the detailed steps 57 | to create a sample application. 58 | 59 | ### Prerequisites 60 | 61 | #### Setting Environment 62 | 63 | 1. Download and Install the Tizen Studio IDE from this [link](http://developer.samsung.com/tv/develop/tools/tizen-studio/). Make sure to select the appropriate Operating System 64 | ![Tizen Studio Install](../assets/tizen_studio_install.png) 65 | 66 | 2. Install the Tizen TV SDK from [here]( http://developer.samsung.com/tv/develop/tools/tv-extension/download). 67 | ![Tizen TV SDK Install](../assets/tizen_tv_sdk_install.png) 68 | 69 | 3. Configure the Tizen TV Emulator. Go to Tools-->Emulator Manager. Click on Create button and follow the instructions in the screen. The default settings can be keept. 70 | ![Emulator configuration](../assets/emulator_config.png) 71 | 72 | 4. The Tizen certification is required to run a package on the Emulator or on a real-device. Click on Tools-->Package Manager to obtain it. 73 | Follow [this](https://docs.tizen.org/application/vstools/tools/certificate-manager/) guide to see all the steps. 74 | 75 | ### How to create a simple Tizen TV application using NexPlayer Tizen SDK 76 | 77 | #### Create a Basic Project using Tizen Studio 78 | 79 | 1. Create a new project Click on File -> New -> Tizen Project. 80 | ![Start Project Wizard](../assets/NewProject1.PNG) 81 | 82 | 2. Select the type of the project. 83 | ![Type of Project](../assets/NewProject2.PNG) 84 | 85 | 3. Now select web aplication. 86 | ![TV App Properties](../assets/NewProject3.PNG) 87 | 88 | 4. To finish select basic project. 89 | ![TV App Properties](../assets/NewProject4.PNG) 90 | 91 | 4. Open the next index. 92 | ![App Setup](../assets/NewProject5.PNG) 93 | 94 | 5. And you can use the following code. 95 | 96 | ```html 97 | 98 | 99 | 100 | 101 | 102 | 103 | NexPlayer 104 | 133 | 134 | 135 |

    NexPlayer for Tizen WebApps

    136 |
    137 |
    138 |
    139 | 140 | 141 | 150 | 151 | 152 | ``` 153 | 154 | #### Building and Running the Project 155 | 156 | To launch the project on Tizen TV Check [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html) 157 | guide. 158 | 159 | To launch the project on Smart TV Emulator Check [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-emulator.html) 160 | guide. 161 | 162 | 163 | While using Tizen Studio, if your app works in the simulator and it doesn't in a device nor the emulator, add the next line to your config.xml: 164 | 165 | ```xml 166 | 167 | ``` 168 | 169 | ## PlayStation 5 170 | 171 | PlayStation 5 is supported from NexPlayer's version [3.2.1](/ps5/releases.md?id=version-321) 172 | In order to be able to use NexPlayer's SDK for PS5, a JSON file is needed. This JSON file must be hosted in the root of the domain where the application is hosted. For example, if the app is hosted in https://example.com/app the JSON file must be accessible from the path https://example.com/userAppId.json. 173 | 174 | Please, contact NexPlayer's support (supportmadrid@nexplayer.com) to request this file. 175 | 176 | 177 | 178 | ## Verimatrix Watermarking 179 | 180 | Verimatrix Watermarking provides additional security into the contents by adding a imperceptible watermark on the video. 181 | 182 | ### Using with the player 183 | 184 | To start, you need to request a watermark.min.js file from Verimatrix here https://www.verimatrix.com/products/watermarking/. 185 | 186 | 187 | ```html 188 | 189 | 190 | 191 | 192 | 193 | 194 | NexPlayer 195 | 196 | 197 | 198 | 199 |
    200 |
    201 |
    202 | 203 | 230 | 231 | 232 | 233 | 234 | ``` 235 | 236 | ### wmInfo Object 237 | 238 | | Param | Type | Description | 239 | | --- | --- | --- | 240 | | strength | Integer | Watermark strength.
    Valid values:
    • 255: Visible watermark for debugging
    • 1 to 100: Production watermark strength
    (1 = weakest, 100 = strongest/possibly visible)
    A stronger watermark is faster to extract.
    Values of 50 or less require very long videos to extract.
    Default: 80 | 241 | | transactionId | Unsigned
    integer | Transaction or user identifier.
    Required for watermarking initialization.
    Size: 36 bits
    Valid values: 0 to 687194767365 | 242 | | operatorId | Unsigned
    integer | Operator identifier.
    You do not need to provide operatorId as it is hard-coded to an operator-specific value in the software. 243 | | logoImage | String | Optional.
    URL for a visible image to draw in addition to the imperceptible watermark.
    Default: None | 244 | | logoPos | Array \ | Optional.
    Set coordinates for the logo image.
    Format: [x, y, width, height]
    Valid values for x and y: 0 to 100
    Default: Upper left corner of the video.| 245 | | apiToken | String | Optional.
    Opaque string for activating subsequent API actions. | 246 | 247 | 248 | -------------------------------------------------------------------------------- /ps5/licenses.md: -------------------------------------------------------------------------------- 1 | # Third Party Licenses 2 | 3 | This is a summary of all third party licenses. NexPlayer licenses will be provided upon purchase. 4 | 5 | ``` 6 | Shaka player (https://github.com/google/shaka-player): 7 | 8 | Apache License 9 | Version 2.0, January 2004 10 | http://www.apache.org/licenses/ 11 | 12 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 13 | 14 | 1. Definitions. 15 | 16 | "License" shall mean the terms and conditions for use, reproduction, 17 | and distribution as defined by Sections 1 through 9 of this document. 18 | 19 | "Licensor" shall mean the copyright owner or entity authorized by 20 | the copyright owner that is granting the License. 21 | 22 | "Legal Entity" shall mean the union of the acting entity and all 23 | other entities that control, are controlled by, or are under common 24 | control with that entity. For the purposes of this definition, 25 | "control" means (i) the power, direct or indirect, to cause the 26 | direction or management of such entity, whether by contract or 27 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 28 | outstanding shares, or (iii) beneficial ownership of such entity. 29 | 30 | "You" (or "Your") shall mean an individual or Legal Entity 31 | exercising permissions granted by this License. 32 | 33 | "Source" form shall mean the preferred form for making modifications, 34 | including but not limited to software source code, documentation 35 | source, and configuration files. 36 | 37 | "Object" form shall mean any form resulting from mechanical 38 | transformation or translation of a Source form, including but 39 | not limited to compiled object code, generated documentation, 40 | and conversions to other media types. 41 | 42 | "Work" shall mean the work of authorship, whether in Source or 43 | Object form, made available under the License, as indicated by a 44 | copyright notice that is included in or attached to the work 45 | (an example is provided in the Appendix below). 46 | 47 | "Derivative Works" shall mean any work, whether in Source or Object 48 | form, that is based on (or derived from) the Work and for which the 49 | editorial revisions, annotations, elaborations, or other modifications 50 | represent, as a whole, an original work of authorship. For the purposes 51 | of this License, Derivative Works shall not include works that remain 52 | separable from, or merely link (or bind by name) to the interfaces of, 53 | the Work and Derivative Works thereof. 54 | 55 | "Contribution" shall mean any work of authorship, including 56 | the original version of the Work and any modifications or additions 57 | to that Work or Derivative Works thereof, that is intentionally 58 | submitted to Licensor for inclusion in the Work by the copyright owner 59 | or by an individual or Legal Entity authorized to submit on behalf of 60 | the copyright owner. For the purposes of this definition, "submitted" 61 | means any form of electronic, verbal, or written communication sent 62 | to the Licensor or its representatives, including but not limited to 63 | communication on electronic mailing lists, source code control systems, 64 | and issue tracking systems that are managed by, or on behalf of, the 65 | Licensor for the purpose of discussing and improving the Work, but 66 | excluding communication that is conspicuously marked or otherwise 67 | designated in writing by the copyright owner as "Not a Contribution." 68 | 69 | "Contributor" shall mean Licensor and any individual or Legal Entity 70 | on behalf of whom a Contribution has been received by Licensor and 71 | subsequently incorporated within the Work. 72 | 73 | 2. Grant of Copyright License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | copyright license to reproduce, prepare Derivative Works of, 77 | publicly display, publicly perform, sublicense, and distribute the 78 | Work and such Derivative Works in Source or Object form. 79 | 80 | 3. Grant of Patent License. Subject to the terms and conditions of 81 | this License, each Contributor hereby grants to You a perpetual, 82 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 83 | (except as stated in this section) patent license to make, have made, 84 | use, offer to sell, sell, import, and otherwise transfer the Work, 85 | where such license applies only to those patent claims licensable 86 | by such Contributor that are necessarily infringed by their 87 | Contribution(s) alone or by combination of their Contribution(s) 88 | with the Work to which such Contribution(s) was submitted. If You 89 | institute patent litigation against any entity (including a 90 | cross-claim or counterclaim in a lawsuit) alleging that the Work 91 | or a Contribution incorporated within the Work constitutes direct 92 | or contributory patent infringement, then any patent licenses 93 | granted to You under this License for that Work shall terminate 94 | as of the date such litigation is filed. 95 | 96 | 4. Redistribution. You may reproduce and distribute copies of the 97 | Work or Derivative Works thereof in any medium, with or without 98 | modifications, and in Source or Object form, provided that You 99 | meet the following conditions: 100 | 101 | (a) You must give any other recipients of the Work or 102 | Derivative Works a copy of this License; and 103 | 104 | (b) You must cause any modified files to carry prominent notices 105 | stating that You changed the files; and 106 | 107 | (c) You must retain, in the Source form of any Derivative Works 108 | that You distribute, all copyright, patent, trademark, and 109 | attribution notices from the Source form of the Work, 110 | excluding those notices that do not pertain to any part of 111 | the Derivative Works; and 112 | 113 | (d) If the Work includes a "NOTICE" text file as part of its 114 | distribution, then any Derivative Works that You distribute must 115 | include a readable copy of the attribution notices contained 116 | within such NOTICE file, excluding those notices that do not 117 | pertain to any part of the Derivative Works, in at least one 118 | of the following places: within a NOTICE text file distributed 119 | as part of the Derivative Works; within the Source form or 120 | documentation, if provided along with the Derivative Works; or, 121 | within a display generated by the Derivative Works, if and 122 | wherever such third-party notices normally appear. The contents 123 | of the NOTICE file are for informational purposes only and 124 | do not modify the License. You may add Your own attribution 125 | notices within Derivative Works that You distribute, alongside 126 | or as an addendum to the NOTICE text from the Work, provided 127 | that such additional attribution notices cannot be construed 128 | as modifying the License. 129 | 130 | You may add Your own copyright statement to Your modifications and 131 | may provide additional or different license terms and conditions 132 | for use, reproduction, or distribution of Your modifications, or 133 | for any such Derivative Works as a whole, provided Your use, 134 | reproduction, and distribution of the Work otherwise complies with 135 | the conditions stated in this License. 136 | 137 | 5. Submission of Contributions. Unless You explicitly state otherwise, 138 | any Contribution intentionally submitted for inclusion in the Work 139 | by You to the Licensor shall be under the terms and conditions of 140 | this License, without any additional terms or conditions. 141 | Notwithstanding the above, nothing herein shall supersede or modify 142 | the terms of any separate license agreement you may have executed 143 | with Licensor regarding such Contributions. 144 | 145 | 6. Trademarks. This License does not grant permission to use the trade 146 | names, trademarks, service marks, or product names of the Licensor, 147 | except as required for reasonable and customary use in describing the 148 | origin of the Work and reproducing the content of the NOTICE file. 149 | 150 | 7. Disclaimer of Warranty. Unless required by applicable law or 151 | agreed to in writing, Licensor provides the Work (and each 152 | Contributor provides its Contributions) on an "AS IS" BASIS, 153 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 154 | implied, including, without limitation, any warranties or conditions 155 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 156 | PARTICULAR PURPOSE. You are solely responsible for determining the 157 | appropriateness of using or redistributing the Work and assume any 158 | risks associated with Your exercise of permissions under this License. 159 | 160 | 8. Limitation of Liability. In no event and under no legal theory, 161 | whether in tort (including negligence), contract, or otherwise, 162 | unless required by applicable law (such as deliberate and grossly 163 | negligent acts) or agreed to in writing, shall any Contributor be 164 | liable to You for damages, including any direct, indirect, special, 165 | incidental, or consequential damages of any character arising as a 166 | result of this License or out of the use or inability to use the 167 | Work (including but not limited to damages for loss of goodwill, 168 | work stoppage, computer failure or malfunction, or any and all 169 | other commercial damages or losses), even if such Contributor 170 | has been advised of the possibility of such damages. 171 | 172 | 9. Accepting Warranty or Additional Liability. While redistributing 173 | the Work or Derivative Works thereof, You may choose to offer, 174 | and charge a fee for, acceptance of support, warranty, indemnity, 175 | or other liability obligations and/or rights consistent with this 176 | License. However, in accepting such obligations, You may act only 177 | on Your own behalf and on Your sole responsibility, not on behalf 178 | of any other Contributor, and only if You agree to indemnify, 179 | defend, and hold each Contributor harmless for any liability 180 | incurred by, or claims asserted against, such Contributor by reason 181 | of your accepting any such warranty or additional liability. 182 | 183 | END OF TERMS AND CONDITIONS 184 | 185 | APPENDIX: How to apply the Apache License to your work. 186 | 187 | To apply the Apache License to your work, attach the following 188 | boilerplate notice, with the fields enclosed by brackets "[]" 189 | replaced with your own identifying information. (Don't include 190 | the brackets!) The text should be enclosed in the appropriate 191 | comment syntax for the file format. We also recommend that a 192 | file or class name and description of purpose be included on the 193 | same "printed page" as the copyright notice for easier 194 | identification within third-party archives. 195 | 196 | Copyright [yyyy] [name of copyright owner] 197 | 198 | Licensed under the Apache License, Version 2.0 (the "License"); 199 | you may not use this file except in compliance with the License. 200 | You may obtain a copy of the License at 201 | 202 | http://www.apache.org/licenses/LICENSE-2.0 203 | 204 | Unless required by applicable law or agreed to in writing, software 205 | distributed under the License is distributed on an "AS IS" BASIS, 206 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 207 | See the License for the specific language governing permissions and 208 | limitations under the License. 209 | 210 | promise-polyfill (https://github.com/taylorhakes/promise-polyfill): 211 | 212 | Copyright (c) 2014 Taylor Hakes 213 | Copyright (c) 2014 Forbes Lindesay 214 | 215 | Permission is hereby granted, free of charge, to any person obtaining a copy 216 | of this software and associated documentation files (the "Software"), to deal 217 | in the Software without restriction, including without limitation the rights 218 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 219 | copies of the Software, and to permit persons to whom the Software is 220 | furnished to do so, subject to the following conditions: 221 | 222 | The above copyright notice and this permission notice shall be included in 223 | all copies or substantial portions of the Software. 224 | 225 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 226 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 227 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 228 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 229 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 230 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 231 | THE SOFTWARE. 232 | 233 | React (https://github.com/facebook/react): 234 | 235 | MIT License 236 | 237 | Copyright (c) 2013-present, Facebook, Inc. 238 | 239 | Permission is hereby granted, free of charge, to any person obtaining a copy 240 | of this software and associated documentation files (the "Software"), to deal 241 | in the Software without restriction, including without limitation the rights 242 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 243 | copies of the Software, and to permit persons to whom the Software is 244 | furnished to do so, subject to the following conditions: 245 | 246 | The above copyright notice and this permission notice shall be included in all 247 | copies or substantial portions of the Software. 248 | 249 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 250 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 251 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 252 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 253 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 254 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 255 | SOFTWARE. 256 | 257 | Redux (https://github.com/reactjs/redux): 258 | 259 | The MIT License (MIT) 260 | 261 | Copyright (c) 2015-present Dan Abramov 262 | 263 | Permission is hereby granted, free of charge, to any person obtaining a copy 264 | of this software and associated documentation files (the "Software"), to deal 265 | in the Software without restriction, including without limitation the rights 266 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 267 | copies of the Software, and to permit persons to whom the Software is 268 | furnished to do so, subject to the following conditions: 269 | 270 | The above copyright notice and this permission notice shall be included in all 271 | copies or substantial portions of the Software. 272 | 273 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 274 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 275 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 276 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 277 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 278 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 279 | SOFTWARE. 280 | 281 | away (https://www.npmjs.com/package/away) 282 | 283 | screenfull.js (https://github.com/sindresorhus/screenfull.js): 284 | 285 | MIT License 286 | 287 | Copyright (c) Sindre Sorhus (sindresorhus.com) 288 | 289 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 290 | 291 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 292 | 293 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 294 | 295 | element-resize-detector (https://github.com/wnr/element-resize-detector): 296 | 297 | The MIT License (MIT) 298 | 299 | Copyright (c) 2016 Lucas Wiener 300 | 301 | Permission is hereby granted, free of charge, to any person obtaining a copy 302 | of this software and associated documentation files (the "Software"), to deal 303 | in the Software without restriction, including without limitation the rights 304 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 305 | copies of the Software, and to permit persons to whom the Software is 306 | furnished to do so, subject to the following conditions: 307 | 308 | The above copyright notice and this permission notice shall be included in all 309 | copies or substantial portions of the Software. 310 | 311 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 312 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 313 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 314 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 315 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 316 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 317 | SOFTWARE. 318 | 319 | script.js (https://github.com/ded/script.js) 320 | 321 | rmp-vast (https://github.com/radiantmediaplayer/rmp-vast#license): 322 | 323 | The MIT License (MIT) 324 | 325 | ``` -------------------------------------------------------------------------------- /ps5/timed_metadata.md: -------------------------------------------------------------------------------- 1 | # Timed Metadata 2 | 3 | NexPlayer supports timed metadata for HLS and DASH content. The information is available in the TextTrack array of the video element. 4 | 5 | The following code is a sample to retrieve the metadata from the streams. It logs the active cues from the TexTrack corrsponding to the metadata. 6 | 7 | ```js 8 | var callBackWithPlayers = function (nexplayerInstance, videoElement) { 9 | videoElement.addEventListener('loadedmetadata', function(event) { 10 | if (videoElement.textTracks){ 11 | showTimedMetadata(videoElement); 12 | } 13 | }); 14 | }; 15 | 16 | nexplayer.Setup({ 17 | key: 'REPLACE THIS WITH YOUR CUSTOMER KEY', 18 | div: document.getElementById('player'), 19 | src: 'VIDEO URL', 20 | callbacksForPlayer: callBackWithPlayers 21 | }); 22 | 23 | var showTimedMetadata = function(videoElement) { 24 | videoElement.textTracks.addEventListener("addtrack", function (e) { 25 | console.log("Add track", e.track); 26 | for (let i = 0; i < e.currentTarget.length; i ++) { 27 | if (e.currentTarget[i].kind === "metadata") { 28 | // If the new TextTrack's kind is metadata change its mode to "hidden". 29 | // Otherwise, the mode is set to "disabled" and the "cuechange" events won't be received. 30 | e.currentTarget[i].mode = "hidden"; 31 | e.currentTarget[i].addEventListener("cuechange", function (cueChangeEvent) { 32 | let activeCues = cueChangeEvent.currentTarget.activeCues; 33 | }); 34 | } 35 | } 36 | }); 37 | }; 38 | ``` 39 | 40 | ### ID3 Tags 41 | 42 | NexPlayer supports timed metadata for HLS and DASH content. The information is available in the TextTrack array of the video element. 43 | 44 | #### ID3 45 | 46 | ID3 is transported through .ts segments, usually in HLS. 47 | 48 | ### EMSG 49 | 50 | This type of metadata is contained in fMP4 segments (DASH & HLS). You can consult more information here. 51 | -------------------------------------------------------------------------------- /ps5_xbox_tizen_webos.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # PlayStation 5, Xbox, Tizen and WebOS Documentation 4 | 5 | This section explains how to integrate NexPlayer™ into your project. Note that PS4 uses a different SDK which is fully explained in [here](/ps4.md). 6 | 7 | - [Getting Started](/ps5/getting_started.md) 8 | - [NexPlayer API](/ps5/api.md) 9 | - [CSS Customizations](/ps5/css_customizations.md) 10 | - [Timed Metadata](/ps5/timed_metadata.md) 11 | - [Integrations](/ps5/integrations.md) 12 | - [Releases Notes](/ps5/releases.md) -------------------------------------------------------------------------------- /sidebar.md: -------------------------------------------------------------------------------- 1 | - [NexPlayer SDK](/) 2 | - [PS5 Xbox Tizen WebOS Hisense Documentation](/ps5_xbox_tizen_webos.md) 3 | - [Getting Started](/ps5/getting_started.md) 4 | - [NexPlayer API](/ps5/api.md) 5 | - [CSS Customizarions](/ps5/css_customizations.md) 6 | - [Timed Metadata](/ps5/timed_metadata.md) 7 | - [Integrations](/ps5/integrations.md) 8 | - [Releases Notes](/ps5/releases.md) 9 | - [PS4 Documentation](/ps4.md) 10 | - [Getting Started](/ps4/getting_started.md) 11 | - [NexPlayer API](/ps4/api.md) 12 | - [Integrations](/ps4/integrations.md) 13 | - [Release Notes](/ps4/releases.md?id=releases-top) 14 | 15 | **Links** 16 | - [Request Demo](https://nexplayersdk.com/nexplayerfortizen-demo/) 17 | - [LinkedIn](https://www.linkedin.com/company/nexstreaming/) 18 | - [Other Platforms](https://nexplayer.github.io/) --------------------------------------------------------------------------------