From 3f9522bb53e7072decfedd63ef20a519751af868 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 16 Aug 2022 01:00:07 +0100 Subject: [PATCH] docs: migration --- 404.html | 29 +-- assets/css/0.styles.0d901613.css | 1 - assets/img/search.83621669.svg | 1 - assets/js/10.00067cb1.js | 1 - assets/js/11.2ce3b889.js | 1 - assets/js/12.61926250.js | 1 - assets/js/13.34f0b29b.js | 1 - assets/js/14.f7751f45.js | 1 - assets/js/15.b726ef97.js | 1 - assets/js/16.fe30d146.js | 1 - assets/js/17.cdc9b305.js | 1 - assets/js/18.993ec4f7.js | 1 - assets/js/2.84dd0af2.js | 1 - assets/js/3.39748dbc.js | 1 - assets/js/4.48498f46.js | 1 - assets/js/5.1d34f339.js | 1 - assets/js/6.719e56b4.js | 1 - assets/js/7.267a6475.js | 1 - assets/js/8.d6baaf9b.js | 1 - assets/js/9.1c664cd1.js | 1 - assets/js/app.d616f804.js | 8 - ecosystem.html | 47 ---- guide.html | 406 ------------------------------- index.html | 59 +---- logo.png | Bin 32587 -> 0 bytes service-worker.js | 161 ------------ support.html | 47 ---- zh/ecosystem.html | 47 ---- zh/guide.html | 395 ------------------------------ zh/index.html | 55 ----- zh/support.html | 47 ---- 31 files changed, 8 insertions(+), 1312 deletions(-) delete mode 100644 assets/css/0.styles.0d901613.css delete mode 100644 assets/img/search.83621669.svg delete mode 100644 assets/js/10.00067cb1.js delete mode 100644 assets/js/11.2ce3b889.js delete mode 100644 assets/js/12.61926250.js delete mode 100644 assets/js/13.34f0b29b.js delete mode 100644 assets/js/14.f7751f45.js delete mode 100644 assets/js/15.b726ef97.js delete mode 100644 assets/js/16.fe30d146.js delete mode 100644 assets/js/17.cdc9b305.js delete mode 100644 assets/js/18.993ec4f7.js delete mode 100644 assets/js/2.84dd0af2.js delete mode 100644 assets/js/3.39748dbc.js delete mode 100644 assets/js/4.48498f46.js delete mode 100644 assets/js/5.1d34f339.js delete mode 100644 assets/js/6.719e56b4.js delete mode 100644 assets/js/7.267a6475.js delete mode 100644 assets/js/8.d6baaf9b.js delete mode 100644 assets/js/9.1c664cd1.js delete mode 100644 assets/js/app.d616f804.js delete mode 100644 ecosystem.html delete mode 100644 guide.html delete mode 100644 logo.png delete mode 100644 service-worker.js delete mode 100644 support.html delete mode 100644 zh/ecosystem.html delete mode 100644 zh/guide.html delete mode 100644 zh/index.html delete mode 100644 zh/support.html diff --git a/404.html b/404.html index 388fb92..ba54cdc 100644 --- a/404.html +++ b/404.html @@ -1,25 +1,4 @@ - - - - - - DPlayer - - - - - - - - - - - - - -

404

That's a Four-Oh-Four.
- Take me home. -
- - - + diff --git a/assets/css/0.styles.0d901613.css b/assets/css/0.styles.0d901613.css deleted file mode 100644 index 2c1c81f..0000000 --- a/assets/css/0.styles.0d901613.css +++ /dev/null @@ -1 +0,0 @@ -code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#f5712c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;-ms-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;-ms-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#f5712c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:hover .header-anchor,h2:hover .header-anchor,h3:hover .header-anchor,h4:hover .header-anchor,h5:hover .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0}a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}.navbar .home-link .site-name{color:#f5712c}.page .custom-block.tip{border-color:#f5712c}.icon.outbound{display:none}a{word-break:break-all}#guide,#指南{display:none}#app .global-ui .sw-update-popup{border:1px solid #f5712c}.routes .sidebar-group-items>li>.sidebar-sub-headers>.sidebar-sub-header>a{color:#f5712c}#dplayer{margin-top:-1.5rem;margin-bottom:1rem}.hero .action,.hero .description{display:none}.hero.custom .action{display:block}#nprogress{pointer-events:none}#nprogress .bar{background:#f5712c;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #f5712c,0 0 5px #f5712c;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#f5712c transparent transparent #f5712c;border-style:solid;border-width:2px;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.go-to-top[data-v-5fd4ef0c]{cursor:pointer;position:fixed;bottom:2rem;right:2.5rem;width:2rem;color:#f5712c;z-index:1}.go-to-top[data-v-5fd4ef0c]:hover{color:#f89c6b}@media (max-width:959px){.go-to-top[data-v-5fd4ef0c]{display:none}}.fade-enter-active[data-v-5fd4ef0c],.fade-leave-active[data-v-5fd4ef0c]{transition:opacity .3s}.fade-enter[data-v-5fd4ef0c],.fade-leave-to[data-v-5fd4ef0c]{opacity:0}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#f5712c;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #f45e10}.home .hero .action-button:hover{background-color:#f67f41}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#f5712c}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#f5712c}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#f5712c}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#f5712c}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #f5712c;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper.open:blur{display:none}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#f5712c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #f67c3d}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#f5712c;border-left-color:#f5712c}.sidebar-heading.clickable:hover{color:#f5712c}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#f5712c}a.sidebar-link.active{font-weight:600;color:#f5712c;border-left-color:#f5712c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}}.carbon-ads{min-height:102px;padding:1.5rem 1.5rem 0;margin-bottom:-.5rem;font-size:.75rem}.carbon-ads a{color:#444;font-weight:400;display:inline}.carbon-ads .carbon-img{float:left;margin-right:1rem;border:1px solid #eaecef}.carbon-ads .carbon-img img{display:block}.carbon-ads .carbon-poweredby{color:#999;display:block;margin-top:.5em}@media (max-width:719px){.carbon-ads .carbon-img img{width:100px;height:77px}}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px}.theme-code-block[data-v-6d04095e]{display:none}.theme-code-block__active[data-v-6d04095e]{display:block}.theme-code-block>pre[data-v-6d04095e]{background-color:orange}.theme-code-group__nav[data-v-32c2d7ed]{margin-bottom:-35px;background-color:#282c34;padding-bottom:22px;border-top-left-radius:6px;border-top-right-radius:6px;padding-left:10px;padding-top:10px}.theme-code-group__ul[data-v-32c2d7ed]{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.theme-code-group__nav-tab[data-v-32c2d7ed]{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:hsla(0,0%,100%,.9);font-weight:600}.theme-code-group__nav-tab-active[data-v-32c2d7ed]{border-bottom:1px solid #42b983}.pre-blank[data-v-32c2d7ed]{color:#42b983}.sw-update-popup[data-v-fec8b358]{position:fixed;right:1em;bottom:1em;padding:1em;border:1px solid #3eaf7c;border-radius:3px;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.5);text-align:center;z-index:3}.sw-update-popup>button[data-v-fec8b358]{margin-top:.5em;padding:.25em 2em}.sw-update-popup-enter-active[data-v-fec8b358],.sw-update-popup-leave-active[data-v-fec8b358]{transition:opacity .3s,transform .3s}.sw-update-popup-enter[data-v-fec8b358],.sw-update-popup-leave-to[data-v-fec8b358]{opacity:0;transform:translateY(50%) scale(.5)} \ No newline at end of file diff --git a/assets/img/search.83621669.svg b/assets/img/search.83621669.svg deleted file mode 100644 index 03d8391..0000000 --- a/assets/img/search.83621669.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/js/10.00067cb1.js b/assets/js/10.00067cb1.js deleted file mode 100644 index e73198a..0000000 --- a/assets/js/10.00067cb1.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{373:function(t,s,e){"use strict";e.r(s);var i=e(27),a=Object(i.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("div",[s("DPlayer",{attrs:{immediate:!0}})],1),this._v(" "),s("div",{staticClass:"hero custom"},[s("p",{staticClass:"action"},[s("router-link",{staticClass:"nav-link action-button",attrs:{to:"/guide/"}},[this._v("Get Started →")])],1)])])}),[],!1,null,null,null);s.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/11.2ce3b889.js b/assets/js/11.2ce3b889.js deleted file mode 100644 index 2c0964c..0000000 --- a/assets/js/11.2ce3b889.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{374:function(e,r,t){"use strict";t.r(r);var a=t(27),n=Object(a.a)({},(function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"ecosystem"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#ecosystem","aria-hidden":"true"}},[e._v("#")]),e._v(" Ecosystem")]),e._v(" "),t("p",[e._v("Let's make DPlayer better, feel free to submit yours in "),t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer/issues/31",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("Let me know!")]),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"help"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#help","aria-hidden":"true"}},[e._v("#")]),e._v(" Help")]),e._v(" "),t("h3",{attrs:{id:"joining-the-discussion"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#joining-the-discussion","aria-hidden":"true"}},[e._v("#")]),e._v(" Joining the Discussion")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://t.me/adplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram Group"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"creating-issue"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#creating-issue","aria-hidden":"true"}},[e._v("#")]),e._v(" Creating issue")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("MoePlayer/DPlayer/issues"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"related-projects"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#related-projects","aria-hidden":"true"}},[e._v("#")]),e._v(" Related Projects")]),e._v(" "),t("h3",{attrs:{id:"tooling"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tooling","aria-hidden":"true"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-thumbnails",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-thumbnails"),t("OutboundLink")],1),e._v(": generate video thumbnails")])]),e._v(" "),t("h3",{attrs:{id:"danmaku-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#danmaku-api","aria-hidden":"true"}},[e._v("#")]),e._v(" Danmaku api")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-node",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-node"),t("OutboundLink")],1),e._v(": Node.js")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/laravel-danmaku",target:"_blank",rel:"noopener noreferrer"}},[e._v("laravel-danmaku"),t("OutboundLink")],1),e._v(": PHP")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/Izumi-kun/dplayer-live-backend",target:"_blank",rel:"noopener noreferrer"}},[e._v("dplayer-live-backend"),t("OutboundLink")],1),e._v(": Node.js, WebSocket live backend")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/RailsGun",target:"_blank",rel:"noopener noreferrer"}},[e._v("RailsGun"),t("OutboundLink")],1),e._v(": Ruby")])]),e._v(" "),t("h3",{attrs:{id:"plugins"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugins","aria-hidden":"true"}},[e._v("#")]),e._v(" Plugins")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/volio/DPlayer-for-typecho",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-for-typecho"),t("OutboundLink")],1),e._v(": Typecho")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/NextMoe/hexo-tag-dplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Hexo-tag-dplayer"),t("OutboundLink")],1),e._v(": Hexo")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/fghrsh/DPlayer_for_Z-BlogPHP",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer_for_Z-BlogPHP"),t("OutboundLink")],1),e._v(": Z-BlogPHP")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://coding.net/u/Click_04/p/video/git",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer for Discuz!"),t("OutboundLink")],1),e._v(": Discuz!")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/BlueCocoa/DPlayer-WordPress",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer for WordPress"),t("OutboundLink")],1),e._v(": WordPress")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/kn007/DPlayerHandle",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayerHandle"),t("OutboundLink")],1),e._v(": WordPress")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/GreatSatan79/Selection",target:"_blank",rel:"noopener noreferrer"}},[e._v("Selection"),t("OutboundLink")],1),e._v(": WordPress")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/sinchang/vue-dplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vue-DPlayer"),t("OutboundLink")],1),e._v(": Vue")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/hnsylitao/react-dplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("react-dplayer"),t("OutboundLink")],1),e._v(": React")])]),e._v(" "),t("h3",{attrs:{id:"other"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#other","aria-hidden":"true"}},[e._v("#")]),e._v(" Other")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/kn007/DPlayer-Lite",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-Lite"),t("OutboundLink")],1),e._v(": lite version")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/cdnbye/hlsjs-p2p-engine",target:"_blank",rel:"noopener noreferrer"}},[e._v("hlsjs-p2p-engine"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"who-use-dplayer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#who-use-dplayer","aria-hidden":"true"}},[e._v("#")]),e._v(" Who use DPlayer?")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://itunes.apple.com/cn/app/%E5%AD%A6%E4%B9%A0%E5%BC%BA%E5%9B%BD/id1426355645?mt=8",target:"_blank",rel:"noopener noreferrer"}},[e._v("学习强国"),t("OutboundLink")],1),e._v(": “学习强国”学习平台精心打造的手机客户端")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.xiaohongshu.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("小红书"),t("OutboundLink")],1),e._v(": 中国最大的生活社区分享平台,同时也是发现全球好物的电商平台")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://time.geekbang.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("极客时间"),t("OutboundLink")],1),e._v(": 极客邦科技出品的一款 IT 内容知识服务 App")]),e._v(" "),t("li",[t("a",{attrs:{href:"http://www.dilidili.wang/",target:"_blank",rel:"noopener noreferrer"}},[e._v("嘀哩嘀哩"),t("OutboundLink")],1),e._v(": 兴趣使然的无名小站(D 站)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.sbsub.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("银色子弹"),t("OutboundLink")],1),e._v(": 银色子弹,简称银弹,由多数柯南热爱者聚集在一起的组织")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://zh.wikipedia.org/wiki/CC98%E8%AE%BA%E5%9D%9B",target:"_blank",rel:"noopener noreferrer"}},[e._v("浙江大学 CC98 论坛"),t("OutboundLink")],1),e._v(": 浙江大学校网内规模最大的论坛,中国各大学中较活跃的 BBS 之一")]),e._v(" "),t("li",[t("a",{attrs:{href:"http://my.nuaa.edu.cn/video-video.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("纸飞机南航青年网络社区"),t("OutboundLink")],1),e._v(": 南京航空航天大学门户网站")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://otomads.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("otomads"),t("OutboundLink")],1),e._v(": 专注于音 MAD 的视频弹幕网站")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/HFO4/Cloudreve",target:"_blank",rel:"noopener noreferrer"}},[e._v("Cloudreve"),t("OutboundLink")],1),e._v(": 基于 ThinkPHP 构建的网盘系统")])]),e._v(" "),t("h2",{attrs:{id:"contributors"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contributors","aria-hidden":"true"}},[e._v("#")]),e._v(" Contributors")]),e._v(" "),t("p",[e._v("This project exists thanks to all the people who contribute.")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer/graphs/contributors"}},[t("img",{attrs:{src:"https://opencollective.com/DPlayer/contributors.svg?width=890"}})])])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/12.61926250.js b/assets/js/12.61926250.js deleted file mode 100644 index 0b9a706..0000000 --- a/assets/js/12.61926250.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{379:function(t,a,s){"use strict";s.r(a);var n=s(27),e=Object(n.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"guide"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#guide","aria-hidden":"true"}},[t._v("#")]),t._v(" Guide")]),t._v(" "),s("h1",{attrs:{id:"dplayer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#dplayer","aria-hidden":"true"}},[t._v("#")]),t._v(" DPlayer")]),t._v(" "),s("p",[t._v("🍭 Wow, such a lovely HTML5 danmaku video player")]),t._v(" "),s("DPlayer",{attrs:{immediate:!0}}),t._v(" "),s("p"),t._v(" "),s("h2",{attrs:{id:"special-thanks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#special-thanks","aria-hidden":"true"}},[t._v("#")]),t._v(" Special Thanks")]),t._v(" "),s("h3",{attrs:{id:"special-sponsors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#special-sponsors","aria-hidden":"true"}},[t._v("#")]),t._v(" Special Sponsors")]),t._v(" "),s("p"),t._v(" "),s("div",[s("a",{attrs:{href:"https://www.cdnbye.com",target:"_blank"}},[s("img",{attrs:{height:"60px",src:"https://cdnbye.oss-cn-beijing.aliyuncs.com/pic/cdnbye-dp.jpeg"}})])]),t._v(" "),s("div",[s("a",{attrs:{href:"https://www.dogecloud.com/?ref=dplayer",target:"_blank"}},[s("img",{attrs:{height:"60px",src:"https://i.imgur.com/C2NgugY.png"}})])]),t._v(" "),s("h3",{attrs:{id:"sponsors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#sponsors","aria-hidden":"true"}},[t._v("#")]),t._v(" Sponsors")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[s("a",{attrs:{href:"https://www.acg.app",target:"_blank",rel:"noopener noreferrer"}},[t._v("极酷社"),s("OutboundLink")],1)])])]),t._v(" "),s("tbody")]),t._v(" "),s("h2",{attrs:{id:"installation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#installation","aria-hidden":"true"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),s("p",[t._v("Using npm:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("npm install dplayer --save\n")])])]),s("p",[t._v("Using Yarn:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("yarn add dplayer\n")])])]),s("h2",{attrs:{id:"quick-start"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#quick-start","aria-hidden":"true"}},[t._v("#")]),t._v(" Quick Start")]),t._v(" "),s("p",[t._v("At first, let's initialize a simplest DPlayer")]),t._v(" "),s("p",[t._v("Load DPlayer files")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("Or work with module bundler:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" DPlayer "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("options"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("Initialization in js:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n screenshot"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pic"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n thumbnails"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'thumbnails.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n subtitle"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'webvtt.vtt'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n danmaku"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n api"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"options"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#options","aria-hidden":"true"}},[t._v("#")]),t._v(" Options")]),t._v(" "),s("p",[t._v("You can custom your player instance by those options")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Name")]),t._v(" "),s("th",[t._v("Default")]),t._v(" "),s("th",[t._v("Description")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("container")]),t._v(" "),s("td",[t._v("document.querySelector('.dplayer')")]),t._v(" "),s("td",[t._v("player container")])]),t._v(" "),s("tr",[s("td",[t._v("live")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("enable live mode, see "),s("a",{attrs:{href:"#live"}},[t._v("#live")])])]),t._v(" "),s("tr",[s("td",[t._v("autoplay")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("video autoplay")])]),t._v(" "),s("tr",[s("td",[t._v("theme")]),t._v(" "),s("td",[t._v("'#b7daff'")]),t._v(" "),s("td",[t._v("main color")])]),t._v(" "),s("tr",[s("td",[t._v("loop")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("video loop")])]),t._v(" "),s("tr",[s("td",[t._v("lang")]),t._v(" "),s("td",[t._v("navigator.language.toLowerCase()")]),t._v(" "),s("td",[t._v("values: 'en', 'zh-cn', 'zh-tw'")])]),t._v(" "),s("tr",[s("td",[t._v("screenshot")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("enable screenshot, if true, video and video poster must enable Cross-Origin")])]),t._v(" "),s("tr",[s("td",[t._v("airplay")]),t._v(" "),s("td",[t._v("true")]),t._v(" "),s("td",[t._v("enable airplay in Safari")])]),t._v(" "),s("tr",[s("td",[t._v("hotkey")]),t._v(" "),s("td",[t._v("true")]),t._v(" "),s("td",[t._v("enable hotkey, support FF, FR, volume control, play & pause")])]),t._v(" "),s("tr",[s("td",[t._v("preload")]),t._v(" "),s("td",[t._v("'auto'")]),t._v(" "),s("td",[t._v("values: 'none', 'metadata', 'auto'")])]),t._v(" "),s("tr",[s("td",[t._v("volume")]),t._v(" "),s("td",[t._v("0.7")]),t._v(" "),s("td",[t._v("default volume, notice that player will remember user setting, default volume will not work after user set volume themselves")])]),t._v(" "),s("tr",[s("td",[t._v("playbackSpeed")]),t._v(" "),s("td",[t._v("[0.5, 0.75, 1, 1.25, 1.5, 2]")]),t._v(" "),s("td",[t._v("optional playback speed, or or you can set a custom one")])]),t._v(" "),s("tr",[s("td",[t._v("logo")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("showing logo in the top left corner, you can adjust its size and position by CSS")])]),t._v(" "),s("tr",[s("td",[t._v("apiBackend")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("getting and sending danmaku in your way, see "),s("a",{attrs:{href:"#live"}},[t._v("#live")])])]),t._v(" "),s("tr",[s("td",[t._v("video")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("video info")])]),t._v(" "),s("tr",[s("td",[t._v("video.quality")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("see "),s("a",{attrs:{href:"#quality-switching"}},[t._v("#Quality switching")])])]),t._v(" "),s("tr",[s("td",[t._v("video.defaultQuality")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("see "),s("a",{attrs:{href:"#quality-switching"}},[t._v("#Quality switching")])])]),t._v(" "),s("tr",[s("td",[t._v("video.url")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("video url")])]),t._v(" "),s("tr",[s("td",[t._v("video.pic")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("video poster")])]),t._v(" "),s("tr",[s("td",[t._v("video.thumbnails")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("video thumbnails, generated by "),s("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-thumbnails",target:"_blank",rel:"noopener noreferrer"}},[t._v("DPlayer-thumbnails"),s("OutboundLink")],1)])]),t._v(" "),s("tr",[s("td",[t._v("video.type")]),t._v(" "),s("td",[t._v("'auto'")]),t._v(" "),s("td",[t._v("values: 'auto', 'hls', 'flv', 'dash', 'webtorrent', 'normal' or other custom type, see "),s("a",{attrs:{href:"#mse-support"}},[t._v("#MSE support")])])]),t._v(" "),s("tr",[s("td",[t._v("video.customType")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("custom video type, see "),s("a",{attrs:{href:"#mse-support"}},[t._v("#MSE support")])])]),t._v(" "),s("tr",[s("td",[t._v("subtitle")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("external subtitle")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.url")]),t._v(" "),s("td",[s("code",[t._v("required")])]),t._v(" "),s("td",[t._v("subtitle url")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.type")]),t._v(" "),s("td",[t._v("'webvtt'")]),t._v(" "),s("td",[t._v("subtitle type, values: 'webvtt', 'ass', but only webvtt is supported for now")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.fontSize")]),t._v(" "),s("td",[t._v("'20px'")]),t._v(" "),s("td",[t._v("subtitle font size")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.bottom")]),t._v(" "),s("td",[t._v("'40px'")]),t._v(" "),s("td",[t._v("the distance between the subtitle and player bottom, values like: '10px' '10%'")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.color")]),t._v(" "),s("td",[t._v("'#fff'")]),t._v(" "),s("td",[t._v("subtitle color")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("showing danmaku")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.id")]),t._v(" "),s("td",[s("code",[t._v("required")])]),t._v(" "),s("td",[t._v("danmaku pool id, it must be unique")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.api")]),t._v(" "),s("td",[s("code",[t._v("required")])]),t._v(" "),s("td",[t._v("see "),s("a",{attrs:{href:"#danmaku-api"}},[t._v("#Danmaku API")])])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.token")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("back end verification token")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.maximum")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("danmaku maximum quantity")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.addition")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("additional danmaku, see "),s("a",{attrs:{href:"#bilibili-danmaku"}},[t._v("#bilibili danmaku")])])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.user")]),t._v(" "),s("td",[t._v("'DIYgod'")]),t._v(" "),s("td",[t._v("danmaku user name")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.bottom")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("values like: '10px' '10%', the distance between the danmaku bottom and player bottom, in order to prevent warding off subtitle")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.unlimited")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("display all danmaku even though danmaku overlap, notice that player will remember user setting, default setting will not work after user set it themselves")])]),t._v(" "),s("tr",[s("td",[t._v("contextmenu")]),t._v(" "),s("td",[t._v("[]")]),t._v(" "),s("td",[t._v("custom contextmenu")])]),t._v(" "),s("tr",[s("td",[t._v("highlight")]),t._v(" "),s("td",[t._v("[]")]),t._v(" "),s("td",[t._v("custom time markers upon progress bar")])]),t._v(" "),s("tr",[s("td",[t._v("mutex")]),t._v(" "),s("td",[t._v("true")]),t._v(" "),s("td",[t._v("prevent to play multiple player at the same time, pause other players when this player start play")])])])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n autoplay"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n theme"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#FADFA3'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n loop"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n lang"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'zh-cn'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n screenshot"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n hotkey"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n preload"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'auto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n logo"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'logo.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n volume"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n mutex"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pic"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n thumbnails"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'thumbnails.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'auto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n subtitle"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer.vtt'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'webvtt'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n fontSize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'25px'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottom"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'10%'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#b7daff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n danmaku"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'9E2E3368B56CDBB4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n api"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n token"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'tokendemo'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n maximum"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1000")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n addition"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/v3/bilibili?aid=4157142'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n user"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DIYgod'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottom"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'15%'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n unlimited"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n contextmenu"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'custom1'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n link"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://github.com/DIYgod/DPlayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'custom2'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("click")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n highlight"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'marker for 20s'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n time"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'marker for 2mins'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n time"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("120")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#api","aria-hidden":"true"}},[t._v("#")]),t._v(" API")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("dp.play()")]),t._v(": play video")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.pause()")]),t._v(": pause video")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.seek(time: number)")]),t._v(": seek to specified time")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("seek")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.toggle()")]),t._v(": toggle between play and pause")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.on(event: string, handler: function)")]),t._v(": bind video and player events, "),s("a",{attrs:{href:"http://dplayer.js.org/#/home?id=event-binding",target:"_blank",rel:"noopener noreferrer"}},[t._v("see more details"),s("OutboundLink")],1)])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.switchVideo(video, danmaku)")]),t._v(": switch to a new video")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("switchVideo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'second.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pic"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'second.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n thumbnails"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'second.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'test'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n api"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n maximum"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3000")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n user"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DIYgod'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.notice(text: string, time: number, opacity: number)")]),t._v(": show message, the unit of time is millisecond, the default of time is 2000, the default of opacity is 0.8")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("notice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Amazing player'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2000")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.8")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.switchQuality(index: number)")]),t._v(": switch quality")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.destroy()")]),t._v(": destroy player")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.speed(rate: number)")]),t._v(": set video speed")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.volume(percentage: number, nostorage: boolean, nonotice: boolean)")]),t._v(": set video volume")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("volume")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video")]),t._v(": native video")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video.currentTime")]),t._v(": returns the current playback position")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video.duration")]),t._v(": returns video total time")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video.paused")]),t._v(": returns whether the video paused")])]),t._v(" "),s("li",[s("p",[t._v("most "),s("a",{attrs:{href:"http://www.w3schools.com/tags/ref_av_dom.asp",target:"_blank",rel:"noopener noreferrer"}},[t._v("native api"),s("OutboundLink")],1),t._v(" are supported")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku")])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.send(danmaku, callback: function)")]),t._v(": submit a new danmaku to back end")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer is amazing'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#b7daff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'right'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// should be `top` `bottom` or `right`")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'success'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.draw(danmaku)")]),t._v(": draw a new danmaku to player in real time")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("draw")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DIYgod is amazing'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#fff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'top'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.opacity(percentage: number)")]),t._v(": set danmaku opacity, opacity should between 0 and 1")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("opacity")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.clear()")]),t._v(": clear all danmakus")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.hide()")]),t._v(": hide danmaku")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.show()")]),t._v(": show danmaku")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.fullScreen")]),t._v(": two type: "),s("code",[t._v("web")]),t._v(" or "),s("code",[t._v("browser")]),t._v(", the default one is "),s("code",[t._v("browser")])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.fullScreen.request(type: string)")]),t._v(": request fullscreen")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fullScreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("request")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'web'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.fullScreen.cancel(type: string)")]),t._v(": cancel fullscreen")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fullScreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cancel")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'web'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])]),t._v(" "),s("h2",{attrs:{id:"event-binding"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#event-binding","aria-hidden":"true"}},[t._v("#")]),t._v(" Event binding")]),t._v(" "),s("p",[s("code",[t._v("dp.on(event, handler)")])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("on")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'ended'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'player ended'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("Video events")]),t._v(" "),s("ul",[s("li",[t._v("abort")]),t._v(" "),s("li",[t._v("canplay")]),t._v(" "),s("li",[t._v("canplaythrough")]),t._v(" "),s("li",[t._v("durationchange")]),t._v(" "),s("li",[t._v("emptied")]),t._v(" "),s("li",[t._v("ended")]),t._v(" "),s("li",[t._v("error")]),t._v(" "),s("li",[t._v("loadeddata")]),t._v(" "),s("li",[t._v("loadedmetadata")]),t._v(" "),s("li",[t._v("loadstart")]),t._v(" "),s("li",[t._v("mozaudioavailable")]),t._v(" "),s("li",[t._v("pause")]),t._v(" "),s("li",[t._v("play")]),t._v(" "),s("li",[t._v("playing")]),t._v(" "),s("li",[t._v("progress")]),t._v(" "),s("li",[t._v("ratechange")]),t._v(" "),s("li",[t._v("seeked")]),t._v(" "),s("li",[t._v("seeking")]),t._v(" "),s("li",[t._v("stalled")]),t._v(" "),s("li",[t._v("suspend")]),t._v(" "),s("li",[t._v("timeupdate")]),t._v(" "),s("li",[t._v("volumechange")]),t._v(" "),s("li",[t._v("waiting")])]),t._v(" "),s("p",[t._v("Player events")]),t._v(" "),s("ul",[s("li",[t._v("screenshot")]),t._v(" "),s("li",[t._v("thumbnails_show")]),t._v(" "),s("li",[t._v("thumbnails_hide")]),t._v(" "),s("li",[t._v("danmaku_show")]),t._v(" "),s("li",[t._v("danmaku_hide")]),t._v(" "),s("li",[t._v("danmaku_clear")]),t._v(" "),s("li",[t._v("danmaku_loaded")]),t._v(" "),s("li",[t._v("danmaku_send")]),t._v(" "),s("li",[t._v("danmaku_opacity")]),t._v(" "),s("li",[t._v("contextmenu_show")]),t._v(" "),s("li",[t._v("contextmenu_hide")]),t._v(" "),s("li",[t._v("notice_show")]),t._v(" "),s("li",[t._v("notice_hide")]),t._v(" "),s("li",[t._v("quality_start")]),t._v(" "),s("li",[t._v("quality_end")]),t._v(" "),s("li",[t._v("destroy")]),t._v(" "),s("li",[t._v("resize")]),t._v(" "),s("li",[t._v("fullscreen")]),t._v(" "),s("li",[t._v("fullscreen_cancel")]),t._v(" "),s("li",[t._v("webfullscreen")]),t._v(" "),s("li",[t._v("webfullscreen_cancel")]),t._v(" "),s("li",[t._v("subtitle_show")]),t._v(" "),s("li",[t._v("subtitle_hide")]),t._v(" "),s("li",[t._v("subtitle_change")])]),t._v(" "),s("h2",{attrs:{id:"quality-switching"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#quality-switching","aria-hidden":"true"}},[t._v("#")]),t._v(" Quality switching")]),t._v(" "),s("p",[t._v("Set video url and video type in "),s("code",[t._v("video.quality")]),t._v(", set default quality by "),s("code",[t._v("video.defaultQuality")]),t._v(".")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{quality:[{name:"HD",url:"https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8",type:"hls"},{name:"SD",url:"https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4",type:"normal"}],defaultQuality:0,pic:"https://i.loli.net/2019/06/06/5cf8c5d9c57b510947.png",thumbnails:"https://i.loli.net/2019/06/06/5cf8c5d9cec8510758.jpg"}}}}),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n quality"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'HD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'normal'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n defaultQuality"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pic"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n thumbnails"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'thumbnails.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"danmaku"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#danmaku","aria-hidden":"true"}},[t._v("#")]),t._v(" Danmaku")]),t._v(" "),s("h3",{attrs:{id:"danmaku-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#danmaku-api","aria-hidden":"true"}},[t._v("#")]),t._v(" Danmaku API")]),t._v(" "),s("p",[s("code",[t._v("danmaku.api")])]),t._v(" "),s("p",[s("strong",[t._v("Ready-made API")])]),t._v(" "),s("p",[t._v("url: https://api.prprpr.me/dplayer/")]),t._v(" "),s("p",[t._v("Daily backup data: "),s("a",{attrs:{href:"https://github.com/DIYgod/DPlayer-data",target:"_blank",rel:"noopener noreferrer"}},[t._v("DPlayer-data"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("Setting up yourself")])]),t._v(" "),s("p",[s("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-node",target:"_blank",rel:"noopener noreferrer"}},[t._v("DPlayer-node"),s("OutboundLink")],1)]),t._v(" "),s("h3",{attrs:{id:"bilibili-danmaku"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bilibili-danmaku","aria-hidden":"true"}},[t._v("#")]),t._v(" bilibili danmaku")]),t._v(" "),s("p",[s("code",[t._v("danmaku.addition")])]),t._v(" "),s("p",[t._v("API: "),s("a",{attrs:{href:"https://api.prprpr.me/dplayer/v3/bilibili?aid=%5Baid%5D",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid]"),s("OutboundLink")],1)]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" option "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n danmaku"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n addition"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid]'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"mse-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mse-support","aria-hidden":"true"}},[t._v("#")]),t._v(" MSE support")]),t._v(" "),s("h3",{attrs:{id:"hls"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#hls","aria-hidden":"true"}},[t._v("#")]),t._v(" HLS")]),t._v(" "),s("p",[t._v("It requires the library "),s("a",{attrs:{href:"https://github.com/video-dev/hls.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("hls.js"),s("OutboundLink")],1),t._v(" and it should be loaded before "),s("code",[t._v("DPlayer.min.js")]),t._v(".")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{url:"https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8",type:"hls"}}}}),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("hls.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// hls config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Hls instance")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// another way, use customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customHls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customHls")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hls "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Hls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("loadSource")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("attachMedia")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"mpeg-dash"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mpeg-dash","aria-hidden":"true"}},[t._v("#")]),t._v(" MPEG DASH")]),t._v(" "),s("p",[t._v("It requires the library "),s("a",{attrs:{href:"https://github.com/Dash-Industry-Forum/dash.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("dash.js"),s("OutboundLink")],1),t._v(" and it should be loaded before "),s("code",[t._v("DPlayer.min.js")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dash.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mpd'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dash'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n dash"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// dash config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dash"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Dash instance")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// another way, use customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mpd'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customDash'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customDash")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n dashjs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("MediaPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("initialize")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"mpeg-dash-shaka"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mpeg-dash-shaka","aria-hidden":"true"}},[t._v("#")]),t._v(" MPEG DASH (Shaka)")]),t._v(" "),s("p",[t._v("It requires the library "),s("a",{attrs:{href:"https://github.com/google/shaka-player",target:"_blank",rel:"noopener noreferrer"}},[t._v("shaka-player"),s("OutboundLink")],1),t._v(" and it should be loaded before "),s("code",[t._v("DPlayer.min.js")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("shaka-player.compiled.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n screenshot"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mpd'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'shakaDash'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("shakaDash")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" src "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" playerShaka "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("shaka"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 将会修改 video.src")]),t._v("\n playerShaka"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("load")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"flv"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#flv","aria-hidden":"true"}},[t._v("#")]),t._v(" FLV")]),t._v(" "),s("p",[t._v("It requires the library "),s("a",{attrs:{href:"https://github.com/Bilibili/flv.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flv.js"),s("OutboundLink")],1),t._v(" and it should be loaded before "),s("code",[t._v("DPlayer.min.js")]),t._v(".")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{url:"https://api.dogecloud.com/player/get.flv?vcode=5ac682e6f8231991&userId=17&ext=.flv",type:"flv"}}}}),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("flv.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n flv"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// refer to https://github.com/bilibili/flv.js/blob/master/docs/api.md#flvjscreateplayer")]),t._v("\n mediaDataSource"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// mediaDataSource config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n config"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("flv"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// flv instance")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// another way, use customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customFlv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customFlv")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" flvPlayer "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" flvjs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n flvPlayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("attachMediaElement")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n flvPlayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("load")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"webtorrent"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#webtorrent","aria-hidden":"true"}},[t._v("#")]),t._v(" WebTorrent")]),t._v(" "),s("p",[t._v("It requires the library "),s("a",{attrs:{href:"https://github.com/webtorrent/webtorrent",target:"_blank",rel:"noopener noreferrer"}},[t._v("webtorrent"),s("OutboundLink")],1),t._v(" and it should be loaded before "),s("code",[t._v("DPlayer.min.js")]),t._v(".")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{url:"magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent",type:"webtorrent"}}}}),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("webtorrent.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'magnet:demo'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'webtorrent'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n webtorrent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webtorrent config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("webtorrent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// WebTorrent instance")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// another way, use customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'magnet:demo'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customWebTorrent'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customWebTorrent")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("container"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("classList"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer-loading'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" client "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("WebTorrent")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" torrentId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("torrentId"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("torrent")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" file "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" torrent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("find")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" file"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("endsWith")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n file"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("renderTo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n autoplay"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("options"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("autoplay"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("container"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("classList"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("remove")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer-loading'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"work-with-other-mse-library"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#work-with-other-mse-library","aria-hidden":"true"}},[t._v("#")]),t._v(" Work with other MSE library")]),t._v(" "),s("p",[t._v("DPlayer can work with any MSE library via "),s("code",[t._v("customType")]),t._v(" option.")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("https://cdn.jsdelivr.net/npm/cdnbye@latest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" type "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'normal'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("isSupported")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" Hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("WEBRTC_SUPPORT")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n type "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customHls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" type"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customHls'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hls "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Hls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n debug"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other hlsjsConfig options provided by hls.js")]),t._v("\n p2pConfig"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n live"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other p2pConfig options provided by CDNBye http://www.cdnbye.com/en/")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("loadSource")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("attachMedia")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"live"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#live","aria-hidden":"true"}},[t._v("#")]),t._v(" Live")]),t._v(" "),s("p",[t._v("You can use DPlayer in live, but if you want live danmaku, you should prepare a WebSocket backend yourself.")]),t._v(" "),s("DPlayer",{attrs:{options:{live:!0,video:{url:"https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8",type:"hls"}}}}),t._v(" "),s("p",[t._v("Init player:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n live"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n danmaku"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n apiBackend"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("read")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("options")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Pretend to connect WebSocket'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("options")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Pretend to send danmaku via WebSocket'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("Draw danmaku after getting a danmaku via WebSocket:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" danmaku "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Get a danmaku via WebSocket'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#fff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'right'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("draw")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"faq"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#faq","aria-hidden":"true"}},[t._v("#")]),t._v(" FAQ")]),t._v(" "),s("h3",{attrs:{id:"why-can-t-player-be-full-screen"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#why-can-t-player-be-full-screen","aria-hidden":"true"}},[t._v("#")]),t._v(" Why can't player be full screen?")]),t._v(" "),s("p",[t._v("If player is contained in a iframe, try adding the "),s("code",[t._v("allowfullscreen")]),t._v(" attribute to the iframe.")]),t._v(" "),s("p",[t._v("For full browser support it should look like this:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("iframe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("example.com"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("allowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("allowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("mozallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("mozallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("msallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("msallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("oallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("oallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("webkitallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("webkitallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h3",{attrs:{id:"why-can-t-player-autoplay-in-some-mobile-browsers"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#why-can-t-player-autoplay-in-some-mobile-browsers","aria-hidden":"true"}},[t._v("#")]),t._v(" Why can't player autoplay in some mobile browsers?")]),t._v(" "),s("p",[t._v("Most mobile browsers forbid video autoplay, you wont be able to achieve it without hacks.")])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/13.34f0b29b.js b/assets/js/13.34f0b29b.js deleted file mode 100644 index e348bc1..0000000 --- a/assets/js/13.34f0b29b.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{375:function(e,t,r){"use strict";r.r(t);var a=r(27),n=Object(a.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"sponsor-dplayer-development"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sponsor-dplayer-development","aria-hidden":"true"}},[e._v("#")]),e._v(" Sponsor DPlayer Development")]),e._v(" "),r("p",[e._v("DPlayer is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.")]),e._v(" "),r("p",[e._v("If you run a business and are using DPlayer in a revenue-generating product, it makes business sense to sponsor DPlayer development: it ensures the project that your product relies on stays healthy and actively maintained.")]),e._v(" "),r("p",[e._v("If you are an individual user and have enjoyed the productivity of using DPlayer, consider donating as a sign of appreciation - like buying me coffee once in a while 😃")]),e._v(" "),r("p",[e._v("You can support DPlayer development via the following methods:")]),e._v(" "),r("h2",{attrs:{id:"one-time-donations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#one-time-donations","aria-hidden":"true"}},[e._v("#")]),e._v(" One-time Donations")]),e._v(" "),r("p",[e._v("We accept donations through these channels:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.paypal.me/DIYgod",target:"_blank",rel:"noopener noreferrer"}},[e._v("Paypal"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://i.imgur.com/aq6PtWa.png",target:"_blank",rel:"noopener noreferrer"}},[e._v("WeChat Pay"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://i.imgur.com/wv1Pj2k.png",target:"_blank",rel:"noopener noreferrer"}},[e._v("Alipay"),r("OutboundLink")],1)])]),e._v(" "),r("h2",{attrs:{id:"recurring-pledges"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#recurring-pledges","aria-hidden":"true"}},[e._v("#")]),e._v(" Recurring Pledges")]),e._v(" "),r("p",[e._v("Recurring pledges come with exclusive perks, e.g. having your name or your company logo listed in the DPlayer GitHub repository and this website.")]),e._v(" "),r("ul",[r("li",[e._v("Become a Backer or a Sponser on "),r("a",{attrs:{href:"https://www.patreon.com/DIYgod",target:"_blank",rel:"noopener noreferrer"}},[e._v("Patreon"),r("OutboundLink")],1)]),e._v(" "),r("li",[e._v("E-mail us: i#diygod.me")])]),e._v(" "),r("h2",{attrs:{id:"current-premium-sponsors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#current-premium-sponsors","aria-hidden":"true"}},[e._v("#")]),e._v(" Current Premium Sponsors")]),e._v(" "),r("h3",{attrs:{id:"special-sponsors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#special-sponsors","aria-hidden":"true"}},[e._v("#")]),e._v(" Special Sponsors")]),e._v(" "),r("div",[r("a",{attrs:{href:"https://www.cdnbye.com",target:"_blank"}},[r("img",{attrs:{height:"60px",src:"https://cdnbye.oss-cn-beijing.aliyuncs.com/pic/cdnbye-dp.jpeg"}})])]),e._v(" "),r("div",[r("a",{attrs:{href:"https://www.dogecloud.com/?ref=dplayer",target:"_blank"}},[r("img",{attrs:{height:"60px",src:"https://i.imgur.com/C2NgugY.png"}})])]),e._v(" "),r("h3",{attrs:{id:"sponsors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sponsors","aria-hidden":"true"}},[e._v("#")]),e._v(" Sponsors")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",{staticStyle:{"text-align":"center"}},[r("a",{attrs:{href:"https://www.acg.app",target:"_blank",rel:"noopener noreferrer"}},[e._v("极酷社"),r("OutboundLink")],1)])])]),e._v(" "),r("tbody")]),e._v(" "),r("h2",{attrs:{id:"dplayer-contributors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#dplayer-contributors","aria-hidden":"true"}},[e._v("#")]),e._v(" DPlayer contributors")]),e._v(" "),r("p",[e._v("This project exists thanks to all the people who contribute.")]),e._v(" "),r("p",[r("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer/graphs/contributors"}},[r("img",{attrs:{src:"https://opencollective.com/DPlayer/contributors.svg?width=890"}})])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/14.f7751f45.js b/assets/js/14.f7751f45.js deleted file mode 100644 index 8ffcfa5..0000000 --- a/assets/js/14.f7751f45.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{376:function(t,s,i){"use strict";i.r(s);var a=i(27),e=Object(a.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("div",[s("DPlayer",{attrs:{immediate:!0}})],1),this._v(" "),s("div",{staticClass:"hero custom"},[s("p",{staticClass:"action"},[s("router-link",{staticClass:"nav-link action-button",attrs:{to:"/guide/"}},[this._v("快速上手 →")])],1)])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/15.b726ef97.js b/assets/js/15.b726ef97.js deleted file mode 100644 index 5671260..0000000 --- a/assets/js/15.b726ef97.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{378:function(e,r,t){"use strict";t.r(r);var a=t(27),n=Object(a.a)({},(function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"生态"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#生态","aria-hidden":"true"}},[e._v("#")]),e._v(" 生态")]),e._v(" "),t("p",[e._v("让 DPlayer 变得更好,请随意在 "),t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer/issues/31",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("Let me know!")]),t("OutboundLink")],1),e._v(" 提交你的项目和产品")]),e._v(" "),t("h2",{attrs:{id:"帮助"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#帮助","aria-hidden":"true"}},[e._v("#")]),e._v(" 帮助")]),e._v(" "),t("h3",{attrs:{id:"参与讨论"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#参与讨论","aria-hidden":"true"}},[e._v("#")]),e._v(" 参与讨论")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://t.me/adplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram 群"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"提交-issue"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#提交-issue","aria-hidden":"true"}},[e._v("#")]),e._v(" 提交 issue")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("MoePlayer/DPlayer/issues"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"相关项目"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#相关项目","aria-hidden":"true"}},[e._v("#")]),e._v(" 相关项目")]),e._v(" "),t("h3",{attrs:{id:"工具"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#工具","aria-hidden":"true"}},[e._v("#")]),e._v(" 工具")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-thumbnails",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-thumbnails"),t("OutboundLink")],1),e._v(": generate video thumbnails")])]),e._v(" "),t("h3",{attrs:{id:"弹幕接口"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#弹幕接口","aria-hidden":"true"}},[e._v("#")]),e._v(" 弹幕接口")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-node",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-node"),t("OutboundLink")],1),e._v(": Node.js")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/laravel-danmaku",target:"_blank",rel:"noopener noreferrer"}},[e._v("laravel-danmaku"),t("OutboundLink")],1),e._v(": PHP")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/Izumi-kun/dplayer-live-backend",target:"_blank",rel:"noopener noreferrer"}},[e._v("dplayer-live-backend"),t("OutboundLink")],1),e._v(": Node.js, WebSocket live backend")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/MoePlayer/RailsGun",target:"_blank",rel:"noopener noreferrer"}},[e._v("RailsGun"),t("OutboundLink")],1),e._v(": Ruby")])]),e._v(" "),t("h3",{attrs:{id:"插件"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#插件","aria-hidden":"true"}},[e._v("#")]),e._v(" 插件")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/volio/DPlayer-for-typecho",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-for-typecho"),t("OutboundLink")],1),e._v(": Typecho")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/NextMoe/hexo-tag-dplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Hexo-tag-dplayer"),t("OutboundLink")],1),e._v(": Hexo")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/fghrsh/DPlayer_for_Z-BlogPHP",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer_for_Z-BlogPHP"),t("OutboundLink")],1),e._v(": Z-BlogPHP")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://coding.net/u/Click_04/p/video/git",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer for Discuz!"),t("OutboundLink")],1),e._v(": Discuz!")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/BlueCocoa/DPlayer-WordPress",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer for WordPress"),t("OutboundLink")],1),e._v(": WordPress")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/kn007/DPlayerHandle",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayerHandle"),t("OutboundLink")],1),e._v(": WordPress")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/GreatSatan79/Selection",target:"_blank",rel:"noopener noreferrer"}},[e._v("Selection"),t("OutboundLink")],1),e._v(": WordPress")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/sinchang/vue-dplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Vue-DPlayer"),t("OutboundLink")],1),e._v(": Vue")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/hnsylitao/react-dplayer",target:"_blank",rel:"noopener noreferrer"}},[e._v("react-dplayer"),t("OutboundLink")],1),e._v(": React")])]),e._v(" "),t("h3",{attrs:{id:"其他"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#其他","aria-hidden":"true"}},[e._v("#")]),e._v(" 其他")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/kn007/DPlayer-Lite",target:"_blank",rel:"noopener noreferrer"}},[e._v("DPlayer-Lite"),t("OutboundLink")],1),e._v(": lite version")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/cdnbye/hlsjs-p2p-engine",target:"_blank",rel:"noopener noreferrer"}},[e._v("hlsjs-p2p-engine"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"谁在用-dplayer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#谁在用-dplayer","aria-hidden":"true"}},[e._v("#")]),e._v(" 谁在用 DPlayer?")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://itunes.apple.com/cn/app/%E5%AD%A6%E4%B9%A0%E5%BC%BA%E5%9B%BD/id1426355645?mt=8",target:"_blank",rel:"noopener noreferrer"}},[e._v("学习强国"),t("OutboundLink")],1),e._v(": “学习强国”学习平台精心打造的手机客户端")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.xiaohongshu.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("小红书"),t("OutboundLink")],1),e._v(": 中国最大的生活社区分享平台,同时也是发现全球好物的电商平台")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://time.geekbang.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("极客时间"),t("OutboundLink")],1),e._v(": 极客邦科技出品的一款 IT 内容知识服务 App")]),e._v(" "),t("li",[t("a",{attrs:{href:"http://www.dilidili.wang/",target:"_blank",rel:"noopener noreferrer"}},[e._v("嘀哩嘀哩"),t("OutboundLink")],1),e._v(": 兴趣使然的无名小站(D 站)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.sbsub.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("银色子弹"),t("OutboundLink")],1),e._v(": 银色子弹,简称银弹,由多数柯南热爱者聚集在一起的组织")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://zh.wikipedia.org/wiki/CC98%E8%AE%BA%E5%9D%9B",target:"_blank",rel:"noopener noreferrer"}},[e._v("浙江大学 CC98 论坛"),t("OutboundLink")],1),e._v(": 浙江大学校网内规模最大的论坛,中国各大学中较活跃的 BBS 之一")]),e._v(" "),t("li",[t("a",{attrs:{href:"http://my.nuaa.edu.cn/video-video.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("纸飞机南航青年网络社区"),t("OutboundLink")],1),e._v(": 南京航空航天大学门户网站")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://otomads.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("otomads"),t("OutboundLink")],1),e._v(": 专注于音 MAD 的视频弹幕网站")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/HFO4/Cloudreve",target:"_blank",rel:"noopener noreferrer"}},[e._v("Cloudreve"),t("OutboundLink")],1),e._v(": 基于 ThinkPHP 构建的网盘系统")])])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/16.fe30d146.js b/assets/js/16.fe30d146.js deleted file mode 100644 index 20d4f0e..0000000 --- a/assets/js/16.fe30d146.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{380:function(t,a,s){"use strict";s.r(a);var n=s(27),e=Object(n.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"指南"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#指南","aria-hidden":"true"}},[t._v("#")]),t._v(" 指南")]),t._v(" "),s("h1",{attrs:{id:"dplayer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#dplayer","aria-hidden":"true"}},[t._v("#")]),t._v(" DPlayer")]),t._v(" "),s("p",[t._v("🍭 Wow, such a lovely HTML5 danmaku video player")]),t._v(" "),s("DPlayer",{attrs:{immediate:!0}}),t._v(" "),s("p"),t._v(" "),s("h2",{attrs:{id:"special-thanks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#special-thanks","aria-hidden":"true"}},[t._v("#")]),t._v(" Special Thanks")]),t._v(" "),s("h3",{attrs:{id:"special-sponsors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#special-sponsors","aria-hidden":"true"}},[t._v("#")]),t._v(" Special Sponsors")]),t._v(" "),s("div",[s("a",{attrs:{href:"https://www.cdnbye.com",target:"_blank"}},[s("img",{attrs:{height:"60px",src:"https://cdnbye.oss-cn-beijing.aliyuncs.com/pic/cdnbye-dp.jpeg"}})])]),t._v(" "),s("div",[s("a",{attrs:{href:"https://www.dogecloud.com/?ref=dplayer",target:"_blank"}},[s("img",{attrs:{height:"60px",src:"https://i.imgur.com/C2NgugY.png"}})])]),t._v(" "),s("h3",{attrs:{id:"sponsors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#sponsors","aria-hidden":"true"}},[t._v("#")]),t._v(" Sponsors")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[s("a",{attrs:{href:"https://www.acg.app",target:"_blank",rel:"noopener noreferrer"}},[t._v("极酷社"),s("OutboundLink")],1)])])]),t._v(" "),s("tbody")]),t._v(" "),s("h2",{attrs:{id:"安装"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#安装","aria-hidden":"true"}},[t._v("#")]),t._v(" 安装")]),t._v(" "),s("p",[t._v("使用 npm:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("npm install dplayer --save\n")])])]),s("p",[t._v("使用 Yarn:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("yarn add dplayer\n")])])]),s("h2",{attrs:{id:"快速开始"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#快速开始","aria-hidden":"true"}},[t._v("#")]),t._v(" 快速开始")]),t._v(" "),s("p",[t._v("我们先尝试初始化一个最简单的 DPlayer")]),t._v(" "),s("p",[t._v("加载播放器文件:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("或者使用模块管理器:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" DPlayer "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("options"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("在 js 里初始化:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("一个最简单的 DPlayer 就初始化好了,它只有最基本的视频播放功能")]),t._v(" "),s("h2",{attrs:{id:"参数"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#参数","aria-hidden":"true"}},[t._v("#")]),t._v(" 参数")]),t._v(" "),s("p",[t._v("DPlayer 有丰富的参数可以自定义你的播放器实例")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("名称")]),t._v(" "),s("th",[t._v("默认值")]),t._v(" "),s("th",[t._v("描述")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("container")]),t._v(" "),s("td",[t._v("document.querySelector('.dplayer')")]),t._v(" "),s("td",[t._v("播放器容器元素")])]),t._v(" "),s("tr",[s("td",[t._v("live")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("开启直播模式, 见"),s("a",{attrs:{href:"#%E7%9B%B4%E6%92%AD"}},[t._v("#直播")])])]),t._v(" "),s("tr",[s("td",[t._v("autoplay")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("视频自动播放")])]),t._v(" "),s("tr",[s("td",[t._v("theme")]),t._v(" "),s("td",[t._v("'#b7daff'")]),t._v(" "),s("td",[t._v("主题色")])]),t._v(" "),s("tr",[s("td",[t._v("loop")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("视频循环播放")])]),t._v(" "),s("tr",[s("td",[t._v("lang")]),t._v(" "),s("td",[t._v("navigator.language.toLowerCase()")]),t._v(" "),s("td",[t._v("可选值: 'en', 'zh-cn', 'zh-tw'")])]),t._v(" "),s("tr",[s("td",[t._v("screenshot")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("开启截图,如果开启,视频和视频封面需要允许跨域")])]),t._v(" "),s("tr",[s("td",[t._v("hotkey")]),t._v(" "),s("td",[t._v("true")]),t._v(" "),s("td",[t._v("开启热键,支持快进、快退、音量控制、播放暂停")])]),t._v(" "),s("tr",[s("td",[t._v("airplay")]),t._v(" "),s("td",[t._v("true")]),t._v(" "),s("td",[t._v("在 Safari 中开启 AirPlay")])]),t._v(" "),s("tr",[s("td",[t._v("preload")]),t._v(" "),s("td",[t._v("'auto'")]),t._v(" "),s("td",[t._v("视频预加载,可选值: 'none', 'metadata', 'auto'")])]),t._v(" "),s("tr",[s("td",[t._v("volume")]),t._v(" "),s("td",[t._v("0.7")]),t._v(" "),s("td",[t._v("默认音量,请注意播放器会记忆用户设置,用户手动设置音量后默认音量即失效")])]),t._v(" "),s("tr",[s("td",[t._v("playbackSpeed")]),t._v(" "),s("td",[t._v("[0.5, 0.75, 1, 1.25, 1.5, 2]")]),t._v(" "),s("td",[t._v("可选的播放速率,可以设置成自定义的数组")])]),t._v(" "),s("tr",[s("td",[t._v("logo")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("在左上角展示一个 logo,你可以通过 CSS 调整它的大小和位置")])]),t._v(" "),s("tr",[s("td",[t._v("apiBackend")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("自定义获取和发送弹幕行为,见"),s("a",{attrs:{href:"#%E7%9B%B4%E6%92%AD"}},[t._v("#直播")])])]),t._v(" "),s("tr",[s("td",[t._v("video")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("视频信息")])]),t._v(" "),s("tr",[s("td",[t._v("video.quality")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("见"),s("a",{attrs:{href:"#%E6%B8%85%E6%99%B0%E5%BA%A6%E5%88%87%E6%8D%A2"}},[t._v("#清晰度切换")])])]),t._v(" "),s("tr",[s("td",[t._v("video.defaultQuality")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("见"),s("a",{attrs:{href:"#%E6%B8%85%E6%99%B0%E5%BA%A6%E5%88%87%E6%8D%A2"}},[t._v("#清晰度切换")])])]),t._v(" "),s("tr",[s("td",[t._v("video.url")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("视频链接")])]),t._v(" "),s("tr",[s("td",[t._v("video.pic")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("视频封面")])]),t._v(" "),s("tr",[s("td",[t._v("video.thumbnails")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("视频缩略图,可以使用 "),s("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-thumbnails",target:"_blank",rel:"noopener noreferrer"}},[t._v("DPlayer-thumbnails"),s("OutboundLink")],1),t._v(" 生成")])]),t._v(" "),s("tr",[s("td",[t._v("video.type")]),t._v(" "),s("td",[t._v("'auto'")]),t._v(" "),s("td",[t._v("可选值: 'auto', 'hls', 'flv', 'dash', 'webtorrent', 'normal' 或其他自定义类型, 见"),s("a",{attrs:{href:"#mse-%E6%94%AF%E6%8C%81"}},[t._v("#MSE 支持")])])]),t._v(" "),s("tr",[s("td",[t._v("video.customType")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("自定义类型, 见"),s("a",{attrs:{href:"#mse-%E6%94%AF%E6%8C%81"}},[t._v("#MSE 支持")])])]),t._v(" "),s("tr",[s("td",[t._v("subtitle")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("外挂字幕")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.url")]),t._v(" "),s("td",[s("code",[t._v("required")])]),t._v(" "),s("td",[t._v("字幕链接")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.type")]),t._v(" "),s("td",[t._v("'webvtt'")]),t._v(" "),s("td",[t._v("字幕类型,可选值: 'webvtt', 'ass',目前只支持 webvtt")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.fontSize")]),t._v(" "),s("td",[t._v("'20px'")]),t._v(" "),s("td",[t._v("字幕字号")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.bottom")]),t._v(" "),s("td",[t._v("'40px'")]),t._v(" "),s("td",[t._v("字幕距离播放器底部的距离,取值形如: '10px' '10%'")])]),t._v(" "),s("tr",[s("td",[t._v("subtitle.color")]),t._v(" "),s("td",[t._v("'#fff'")]),t._v(" "),s("td",[t._v("字幕颜色")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("显示弹幕")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.id")]),t._v(" "),s("td",[s("code",[t._v("required")])]),t._v(" "),s("td",[t._v("弹幕池 id,必须唯一")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.api")]),t._v(" "),s("td",[s("code",[t._v("required")])]),t._v(" "),s("td",[t._v("见"),s("a",{attrs:{href:"#%E5%BC%B9%E5%B9%95%E6%8E%A5%E5%8F%A3"}},[t._v("#弹幕接口")])])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.token")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("弹幕后端验证 token")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.maximum")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("弹幕最大数量")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.addition")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("额外外挂弹幕,见"),s("a",{attrs:{href:"#bilibili-%E5%BC%B9%E5%B9%95"}},[t._v("#bilibili 弹幕")])])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.user")]),t._v(" "),s("td",[t._v("'DIYgod'")]),t._v(" "),s("td",[t._v("弹幕用户名")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.bottom")]),t._v(" "),s("td",[t._v("-")]),t._v(" "),s("td",[t._v("弹幕距离播放器底部的距离,防止遮挡字幕,取值形如: '10px' '10%'")])]),t._v(" "),s("tr",[s("td",[t._v("danmaku.unlimited")]),t._v(" "),s("td",[t._v("false")]),t._v(" "),s("td",[t._v("海量弹幕模式,即使重叠也展示全部弹幕,请注意播放器会记忆用户设置,用户手动设置后即失效")])]),t._v(" "),s("tr",[s("td",[t._v("contextmenu")]),t._v(" "),s("td",[t._v("[]")]),t._v(" "),s("td",[t._v("自定义右键菜单")])]),t._v(" "),s("tr",[s("td",[t._v("highlight")]),t._v(" "),s("td",[t._v("[]")]),t._v(" "),s("td",[t._v("自定义进度条提示点")])]),t._v(" "),s("tr",[s("td",[t._v("mutex")]),t._v(" "),s("td",[t._v("true")]),t._v(" "),s("td",[t._v("互斥,阻止多个播放器同时播放,当前播放器播放时暂停其他播放器")])])])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n autoplay"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n theme"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#FADFA3'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n loop"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n lang"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'zh-cn'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n screenshot"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n hotkey"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n preload"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'auto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n logo"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'logo.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n volume"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n mutex"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pic"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n thumbnails"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'thumbnails.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'auto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n subtitle"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer.vtt'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'webvtt'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n fontSize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'25px'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottom"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'10%'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#b7daff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n danmaku"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'9E2E3368B56CDBB4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n api"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n token"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'tokendemo'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n maximum"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1000")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n addition"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/v3/bilibili?aid=4157142'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n user"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DIYgod'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bottom"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'15%'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n unlimited"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n contextmenu"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'custom1'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n link"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://github.com/DIYgod/DPlayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'custom2'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("click")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n highlight"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n time"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'这是第 20 秒'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n time"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("120")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'这是 2 分钟'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#api","aria-hidden":"true"}},[t._v("#")]),t._v(" API")]),t._v(" "),s("ul",[s("li",[s("p",[s("code",[t._v("dp.play()")]),t._v(": 播放视频")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.pause()")]),t._v(": 暂停视频")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.seek(time: number)")]),t._v(": 跳转到特定时间")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("seek")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.toggle()")]),t._v(": 切换播放和暂停")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.on(event: string, handler: function)")]),t._v(": 绑定视频和播放器事件,见"),s("a",{attrs:{href:"#%E4%BA%8B%E4%BB%B6%E7%BB%91%E5%AE%9A"}},[t._v("#事件绑定")])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.switchVideo(video, danmaku)")]),t._v(": 切换到其他视频")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("switchVideo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'second.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pic"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'second.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n thumbnails"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'second.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'test'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n api"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n maximum"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3000")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n user"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DIYgod'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.notice(text: string, time: number)")]),t._v(": 显示通知,时间的单位为毫秒,默认时间 2000 毫秒,默认透明度 0.8")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.switchQuality(index: number)")]),t._v(": 切换清晰度")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.destroy()")]),t._v(": 销毁播放器")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.speed(rate: number)")]),t._v(": 设置视频速度")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.volume(percentage: number, nostorage: boolean, nonotice: boolean)")]),t._v(": 设置视频音量")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("volume")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video")]),t._v(": 原生 video")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video.currentTime")]),t._v(": 返回视频当前播放时间")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video.duration")]),t._v(": 返回视频总时间")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.video.paused")]),t._v(": 返回视频是否暂停")])]),t._v(" "),s("li",[s("p",[t._v("支持大多数"),s("a",{attrs:{href:"http://www.w3schools.com/tags/ref_av_dom.asp",target:"_blank",rel:"noopener noreferrer"}},[t._v("原生 video 接口"),s("OutboundLink")],1)])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku")])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.send(danmaku, callback: function)")]),t._v(": 提交一个新弹幕")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer is amazing'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#b7daff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'right'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// should be `top` `bottom` or `right`")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'success'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.draw(danmaku)")]),t._v(": 实时绘制一个新弹幕")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("draw")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'DIYgod is amazing'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#fff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'top'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.opacity(percentage: number)")]),t._v(": 设置弹幕透明度,透明度值在 0 到 1 之间")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("opacity")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.clear()")]),t._v(": 清除所有弹幕")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.hide()")]),t._v(": 隐藏弹幕")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.danmaku.show()")]),t._v(": 显示弹幕")])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.fullScreen")]),t._v(": 两个类型:"),s("code",[t._v("web")]),t._v(" 和 "),s("code",[t._v("browser")]),t._v(",默认类型是 "),s("code",[t._v("browser")])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.fullScreen.request(type: string)")]),t._v(": 进入全屏")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fullScreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("request")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'web'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]),t._v(" "),s("li",[s("p",[s("code",[t._v("dp.fullScreen.cancel(type: string)")]),t._v(": 退出全屏")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fullScreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cancel")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'web'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])])]),t._v(" "),s("h2",{attrs:{id:"事件绑定"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#事件绑定","aria-hidden":"true"}},[t._v("#")]),t._v(" 事件绑定")]),t._v(" "),s("p",[s("code",[t._v("dp.on(event, handler)")])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("on")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'ended'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'player ended'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("视频事件")]),t._v(" "),s("ul",[s("li",[t._v("abort")]),t._v(" "),s("li",[t._v("canplay")]),t._v(" "),s("li",[t._v("canplaythrough")]),t._v(" "),s("li",[t._v("durationchange")]),t._v(" "),s("li",[t._v("emptied")]),t._v(" "),s("li",[t._v("ended")]),t._v(" "),s("li",[t._v("error")]),t._v(" "),s("li",[t._v("loadeddata")]),t._v(" "),s("li",[t._v("loadedmetadata")]),t._v(" "),s("li",[t._v("loadstart")]),t._v(" "),s("li",[t._v("mozaudioavailable")]),t._v(" "),s("li",[t._v("pause")]),t._v(" "),s("li",[t._v("play")]),t._v(" "),s("li",[t._v("playing")]),t._v(" "),s("li",[t._v("progress")]),t._v(" "),s("li",[t._v("ratechange")]),t._v(" "),s("li",[t._v("seeked")]),t._v(" "),s("li",[t._v("seeking")]),t._v(" "),s("li",[t._v("stalled")]),t._v(" "),s("li",[t._v("suspend")]),t._v(" "),s("li",[t._v("timeupdate")]),t._v(" "),s("li",[t._v("volumechange")]),t._v(" "),s("li",[t._v("waiting")])]),t._v(" "),s("p",[t._v("播放器事件")]),t._v(" "),s("ul",[s("li",[t._v("screenshot")]),t._v(" "),s("li",[t._v("thumbnails_show")]),t._v(" "),s("li",[t._v("thumbnails_hide")]),t._v(" "),s("li",[t._v("danmaku_show")]),t._v(" "),s("li",[t._v("danmaku_hide")]),t._v(" "),s("li",[t._v("danmaku_clear")]),t._v(" "),s("li",[t._v("danmaku_loaded")]),t._v(" "),s("li",[t._v("danmaku_send")]),t._v(" "),s("li",[t._v("danmaku_opacity")]),t._v(" "),s("li",[t._v("contextmenu_show")]),t._v(" "),s("li",[t._v("contextmenu_hide")]),t._v(" "),s("li",[t._v("notice_show")]),t._v(" "),s("li",[t._v("notice_hide")]),t._v(" "),s("li",[t._v("quality_start")]),t._v(" "),s("li",[t._v("quality_end")]),t._v(" "),s("li",[t._v("destroy")]),t._v(" "),s("li",[t._v("resize")]),t._v(" "),s("li",[t._v("fullscreen")]),t._v(" "),s("li",[t._v("fullscreen_cancel")]),t._v(" "),s("li",[t._v("subtitle_show")]),t._v(" "),s("li",[t._v("subtitle_hide")]),t._v(" "),s("li",[t._v("subtitle_change")])]),t._v(" "),s("h2",{attrs:{id:"清晰度切换"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#清晰度切换","aria-hidden":"true"}},[t._v("#")]),t._v(" 清晰度切换")]),t._v(" "),s("p",[t._v("在 "),s("code",[t._v("video.quality")]),t._v(" 里设置不同清晰度的视频链接和类型,"),s("code",[t._v("video.defaultQuality")]),t._v(" 设置默认清晰度")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{quality:[{name:"HD",url:"https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8",type:"hls"},{name:"SD",url:"https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4",type:"normal"}],defaultQuality:0,pic:"https://i.loli.net/2019/06/06/5cf8c5d9c57b510947.png",thumbnails:"https://i.loli.net/2019/06/06/5cf8c5d9cec8510758.jpg"}}}}),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n quality"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'HD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'normal'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n defaultQuality"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pic"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.png'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n thumbnails"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'thumbnails.jpg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"弹幕"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#弹幕","aria-hidden":"true"}},[t._v("#")]),t._v(" 弹幕")]),t._v(" "),s("h3",{attrs:{id:"弹幕接口"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#弹幕接口","aria-hidden":"true"}},[t._v("#")]),t._v(" 弹幕接口")]),t._v(" "),s("p",[s("code",[t._v("danmaku.api")])]),t._v(" "),s("p",[s("strong",[t._v("现成的接口")])]),t._v(" "),s("p",[t._v("链接: https://api.prprpr.me/dplayer/")]),t._v(" "),s("p",[t._v("每日备份: "),s("a",{attrs:{href:"https://github.com/DIYgod/DPlayer-data",target:"_blank",rel:"noopener noreferrer"}},[t._v("DPlayer-data"),s("OutboundLink")],1)]),t._v(" "),s("p",[s("strong",[t._v("自己搭建")])]),t._v(" "),s("p",[s("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer-node",target:"_blank",rel:"noopener noreferrer"}},[t._v("DPlayer-node"),s("OutboundLink")],1)]),t._v(" "),s("h3",{attrs:{id:"bilibili-弹幕"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bilibili-弹幕","aria-hidden":"true"}},[t._v("#")]),t._v(" bilibili 弹幕")]),t._v(" "),s("p",[s("code",[t._v("danmaku.addition")])]),t._v(" "),s("p",[t._v("API: "),s("a",{attrs:{href:"https://api.prprpr.me/dplayer/v3/bilibili?aid=%5Baid%5D",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid]"),s("OutboundLink")],1)]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" option "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n danmaku"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n addition"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid]'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"mse-支持"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mse-支持","aria-hidden":"true"}},[t._v("#")]),t._v(" MSE 支持")]),t._v(" "),s("h3",{attrs:{id:"hls"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#hls","aria-hidden":"true"}},[t._v("#")]),t._v(" HLS")]),t._v(" "),s("p",[t._v("需要在 "),s("code",[t._v("DPlayer.min.js")]),t._v(" 前面加载 "),s("a",{attrs:{href:"https://github.com/video-dev/hls.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("hls.js"),s("OutboundLink")],1),t._v("。")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{url:"https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8",type:"hls"}}}}),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("hls.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// hls config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Hls 实例")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 另一种方式,使用 customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customHls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customHls")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hls "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Hls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("loadSource")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("attachMedia")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"mpeg-dash"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mpeg-dash","aria-hidden":"true"}},[t._v("#")]),t._v(" MPEG DASH")]),t._v(" "),s("p",[t._v("需要在 "),s("code",[t._v("DPlayer.min.js")]),t._v(" 前面加载 "),s("a",{attrs:{href:"https://github.com/Dash-Industry-Forum/dash.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("dash.js"),s("OutboundLink")],1),t._v("。")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dash.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mpd'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dash'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n dash"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// dash config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dash"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Dash 实例")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 另一种方式,使用 customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mpd'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customDash'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customDash")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n dashjs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("MediaPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("initialize")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"mpeg-dash-shaka"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mpeg-dash-shaka","aria-hidden":"true"}},[t._v("#")]),t._v(" MPEG DASH (Shaka)")]),t._v(" "),s("p",[t._v("需要在 "),s("code",[t._v("DPlayer.min.js")]),t._v(" 前面加载 "),s("a",{attrs:{href:"https://github.com/google/shaka-player",target:"_blank",rel:"noopener noreferrer"}},[t._v("shaka-player.compiled.js"),s("OutboundLink")],1),t._v("。")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("shaka-player.compiled.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n screenshot"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.mpd'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'shakaDash'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("shakaDash")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" src "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" playerShaka "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("shaka"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 将会修改 video.src")]),t._v("\n playerShaka"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("load")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"flv"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#flv","aria-hidden":"true"}},[t._v("#")]),t._v(" FLV")]),t._v(" "),s("p",[t._v("需要在 "),s("code",[t._v("DPlayer.min.js")]),t._v(" 前面加载 "),s("a",{attrs:{href:"https://github.com/Bilibili/flv.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flv.js"),s("OutboundLink")],1),t._v("。")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{url:"https://api.dogecloud.com/player/get.flv?vcode=5ac682e6f8231991&userId=17&ext=.flv",type:"flv"}}}}),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("flv.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n flv"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// refer to https://github.com/bilibili/flv.js/blob/master/docs/api.md#flvjscreateplayer")]),t._v("\n mediaDataSource"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// mediaDataSource config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n config"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("flv"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// flv 实例")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 另一种方式,使用 customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customFlv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customFlv")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" flvPlayer "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" flvjs"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'flv'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n flvPlayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("attachMediaElement")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n flvPlayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("load")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"webtorrent"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#webtorrent","aria-hidden":"true"}},[t._v("#")]),t._v(" WebTorrent")]),t._v(" "),s("p",[t._v("需要在 "),s("code",[t._v("DPlayer.min.js")]),t._v(" 前面加载 "),s("a",{attrs:{href:"https://github.com/webtorrent/webtorrent",target:"_blank",rel:"noopener noreferrer"}},[t._v("webtorrent"),s("OutboundLink")],1),t._v("。")]),t._v(" "),s("DPlayer",{attrs:{options:{video:{url:"magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent",type:"webtorrent"}}}}),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("webtorrent.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'magnet:demo'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'webtorrent'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n pluginOptions"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n webtorrent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// webtorrent config")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nconsole"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plugins"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("webtorrent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// WebTorrent 实例")]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 另一种方式,使用 customType")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'magnet:demo'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customWebTorrent'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("customWebTorrent")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("container"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("classList"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer-loading'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" client "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("WebTorrent")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" torrentId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("torrentId"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("torrent")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" file "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" torrent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("find")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" file"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("endsWith")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'.mp4'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n file"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("renderTo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n autoplay"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("options"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("autoplay"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n player"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("container"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("classList"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("remove")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer-loading'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"配合其他-mse-库使用"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#配合其他-mse-库使用","aria-hidden":"true"}},[t._v("#")]),t._v(" 配合其他 MSE 库使用")]),t._v(" "),s("p",[t._v("DPlayer 可以通过 "),s("code",[t._v("customType")]),t._v(" 参数与任何 MSE 库一起使用,例如支持P2P插件:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("dplayer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("https://cdn.jsdelivr.net/npm/cdnbye@latest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("DPlayer.min.js"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token script"}}),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" type "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'normal'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("isSupported")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" Hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("WEBRTC_SUPPORT")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n type "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customHls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" type"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n customType"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'customHls'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" player")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hls "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Hls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n debug"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other hlsjsConfig options provided by hls.js")]),t._v("\n p2pConfig"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n live"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 如果是直播设为true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other p2pConfig options provided by CDNBye http://www.cdnbye.com/cn/")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("loadSource")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n hls"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("attachMedia")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("video"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"直播"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#直播","aria-hidden":"true"}},[t._v("#")]),t._v(" 直播")]),t._v(" "),s("p",[t._v("你可以把 DPlayer 用在直播当中,但如果你想要直播弹幕,你需要自己准备一个 WebSocket 后端。")]),t._v(" "),s("DPlayer",{attrs:{options:{live:!0,video:{url:"https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8",type:"hls"}}}}),t._v(" "),s("p",[t._v("初始化播放器:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" dp "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DPlayer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n container"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" document"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getElementById")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'dplayer'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n live"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n danmaku"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n apiBackend"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("read")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("endpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" callback")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Pretend to connect WebSocket'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("endpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" danmakuData"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" callback")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Pretend to send danmaku via WebSocket'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" danmakuData"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("callback")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n video"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'demo.m3u8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hls'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("通过 WebSocket 获取到弹幕之后,通过 "),s("code",[t._v("dp.danmaku.draw")]),t._v(" 绘制弹幕:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" danmaku "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n text"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Get a danmaku via WebSocket'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#fff'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n type"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'right'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ndp"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("draw")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("danmaku"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h2",{attrs:{id:"常见问题"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#常见问题","aria-hidden":"true"}},[t._v("#")]),t._v(" 常见问题")]),t._v(" "),s("h3",{attrs:{id:"为什么播放器不能全屏"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#为什么播放器不能全屏","aria-hidden":"true"}},[t._v("#")]),t._v(" 为什么播放器不能全屏?")]),t._v(" "),s("p",[t._v("如果播放器被包含在 iframe 里,尝试在 iframe 上添加 "),s("code",[t._v("allowfullscreen")]),t._v(" 属性。")]),t._v(" "),s("p",[t._v("为了完善的浏览器兼容性,它应该是这样:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("iframe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("example.com"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("allowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("allowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("mozallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("mozallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("msallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("msallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("oallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("oallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("webkitallowfullscreen")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("webkitallowfullscreen"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h3",{attrs:{id:"为什么播放器不能在手机上自动播放"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#为什么播放器不能在手机上自动播放","aria-hidden":"true"}},[t._v("#")]),t._v(" 为什么播放器不能在手机上自动播放?")]),t._v(" "),s("p",[t._v("大多数移动端浏览器禁止了视频自动播放。")])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/17.cdc9b305.js b/assets/js/17.cdc9b305.js deleted file mode 100644 index 7104135..0000000 --- a/assets/js/17.cdc9b305.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{377:function(t,r,a){"use strict";a.r(r);var e=a(27),s=Object(e.a)({},(function(){var t=this,r=t.$createElement,a=t._self._c||r;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"赞助-dplayer-的研发"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#赞助-dplayer-的研发","aria-hidden":"true"}},[t._v("#")]),t._v(" 赞助 DPlayer 的研发")]),t._v(" "),a("p",[t._v("DPlayer 是采用 MIT 许可的开源项目,使用完全免费。 但是随着项目规模的增长,也需要有相应的资金支持才能持续项目的维护的开发。")]),t._v(" "),a("p",[t._v("如果你是企业经营者并且将 DPlayer 用在商业产品中,那么赞助 DPlayer 有商业上的益处:可以让你的产品所依赖的框架保持健康并得到积极的维护。")]),t._v(" "),a("p",[t._v("如果你是个人开发者并且享受 DPlayer 带来的高开发效率,可以用捐助来表示你的谢意 —— 比如偶尔给我买杯咖啡 😃")]),t._v(" "),a("p",[t._v("你可以通过下列的方法来赞助 DPlayer 的开发。")]),t._v(" "),a("h2",{attrs:{id:"一次性赞助"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#一次性赞助","aria-hidden":"true"}},[t._v("#")]),t._v(" 一次性赞助")]),t._v(" "),a("p",[t._v("我们通过以下方式接受赞助:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://i.imgur.com/aq6PtWa.png",target:"_blank",rel:"noopener noreferrer"}},[t._v("微信支付"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://i.imgur.com/wv1Pj2k.png",target:"_blank",rel:"noopener noreferrer"}},[t._v("支付宝"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://www.paypal.me/DIYgod",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paypal"),a("OutboundLink")],1)])]),t._v(" "),a("h2",{attrs:{id:"周期性赞助"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#周期性赞助","aria-hidden":"true"}},[t._v("#")]),t._v(" 周期性赞助")]),t._v(" "),a("p",[t._v("周期性赞助可以获得额外的回报,比如你的名字或你的公司 logo 会出现在 DPlayer 的 GitHub 仓库和现在我们的官网中。")]),t._v(" "),a("ul",[a("li",[t._v("通过 "),a("a",{attrs:{href:"https://www.patreon.com/DIYgod",target:"_blank",rel:"noopener noreferrer"}},[t._v("Patreon"),a("OutboundLink")],1),t._v(" 赞助")]),t._v(" "),a("li",[t._v("给我们发邮件联系赞助事宜: i#diygod.me")])]),t._v(" "),a("h2",{attrs:{id:"当前的顶级赞助商"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#当前的顶级赞助商","aria-hidden":"true"}},[t._v("#")]),t._v(" 当前的顶级赞助商")]),t._v(" "),a("h3",{attrs:{id:"special-sponsors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#special-sponsors","aria-hidden":"true"}},[t._v("#")]),t._v(" Special Sponsors")]),t._v(" "),a("div",[a("a",{attrs:{href:"https://www.cdnbye.com",target:"_blank"}},[a("img",{attrs:{height:"60px",src:"https://cdnbye.oss-cn-beijing.aliyuncs.com/pic/cdnbye-dp.jpeg"}})])]),t._v(" "),a("div",[a("a",{attrs:{href:"https://www.dogecloud.com/?ref=dplayer",target:"_blank"}},[a("img",{attrs:{height:"60px",src:"https://i.imgur.com/C2NgugY.png"}})])]),t._v(" "),a("h3",{attrs:{id:"sponsors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sponsors","aria-hidden":"true"}},[t._v("#")]),t._v(" Sponsors")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"center"}},[a("a",{attrs:{href:"https://www.acg.app",target:"_blank",rel:"noopener noreferrer"}},[t._v("极酷社"),a("OutboundLink")],1)])])]),t._v(" "),a("tbody")]),t._v(" "),a("h2",{attrs:{id:"dplayer-贡献者"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dplayer-贡献者","aria-hidden":"true"}},[t._v("#")]),t._v(" DPlayer 贡献者")]),t._v(" "),a("p",[t._v("感谢所有贡献者。")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://github.com/MoePlayer/DPlayer/graphs/contributors"}},[a("img",{attrs:{src:"https://opencollective.com/DPlayer/contributors.svg?width=890"}})])])])}),[],!1,null,null,null);r.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/18.993ec4f7.js b/assets/js/18.993ec4f7.js deleted file mode 100644 index 8d382d2..0000000 --- a/assets/js/18.993ec4f7.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{366:function(n,e,t){"use strict";t.r(e),t.d(e,"register",(function(){return i})),t.d(e,"unregister",(function(){return d}));var r,o=function(){return Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))};function i(n,e){void 0===e&&(e={});var t=e.registrationOptions;void 0===t&&(t={}),delete e.registrationOptions;var i=function(n){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];e&&e[n]&&e[n].apply(e,t)};"serviceWorker"in navigator&&r.then((function(){o()?(!function(n,e,t){fetch(n).then((function(r){404===r.status?(e("error",new Error("Service worker not found at "+n)),d()):-1===r.headers.get("content-type").indexOf("javascript")?(e("error",new Error("Expected "+n+" to have javascript content-type, but received "+r.headers.get("content-type"))),d()):c(n,e,t)})).catch((function(n){return a(e,n)}))}(n,i,t),navigator.serviceWorker.ready.then((function(n){i("ready",n)}))):(c(n,i,t),navigator.serviceWorker.ready.then((function(n){i("ready",n)})))}))}function a(n,e){navigator.onLine||n("offline"),n("error",e)}function c(n,e,t){navigator.serviceWorker.register(n,t).then((function(n){e("registered",n),n.waiting?e("updated",n):n.onupdatefound=function(){e("updatefound",n);var t=n.installing;t.onstatechange=function(){"installed"===t.state&&(navigator.serviceWorker.controller?e("updated",n):e("cached",n))}}})).catch((function(n){return a(e,n)}))}function d(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(n){n.unregister()}))}"undefined"!=typeof window&&(r="undefined"!=typeof Promise?new Promise((function(n){return window.addEventListener("load",n)})):{then:function(n){return window.addEventListener("load",n)}})}}]); \ No newline at end of file diff --git a/assets/js/2.84dd0af2.js b/assets/js/2.84dd0af2.js deleted file mode 100644 index a974b7a..0000000 --- a/assets/js/2.84dd0af2.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{312:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return v})),n.d(e,"j",(function(){return m}));n(28),n(102),n(170),n(105),n(175),n(72),n(48),n(313),n(73),n(332),n(104);var i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function u(t){return s.test(t)}function l(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(u(t))return t;var e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function p(t,e){var n=decodeURIComponent(t.hash),r=function(t){var e=t.match(i);if(e)return e[0]}(e);return(!r||n===r)&&o(t.path)===o(e)}function f(t,e,n){if(u(e))return{type:"external",path:e};n&&(e=function(t,e,n){var i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;var r=e.split("/");n&&r[r.length-1]||r.pop();for(var a=t.replace(/^\//,"").split("/"),s=0;s3&&void 0!==arguments[3]?arguments[3]:1;if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});var a=e.children||[];return 0===a.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map((function(e){return t(e,n,i,r+1)})),collapsable:!1!==e.collapsable}}(t,r,l)})):[]}return[]}function g(t){var e=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map((function(e){return{type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}}))}]}function v(t){var e;return(t=t.map((function(t){return Object.assign({},t)}))).forEach((function(t){2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)})),t.filter((function(t){return 2===t.level}))}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},313:function(t,e,n){"use strict";var i=n(172),r=n(9),a=n(15),s=n(22),o=n(173),u=n(174);i("match",1,(function(t,e,n){return[function(e){var n=s(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,n):new RegExp(e)[t](String(n))},function(t){var i=n(e,t,this);if(i.done)return i.value;var s=r(t),l=String(this);if(!s.global)return u(s,l);var c=s.unicode;s.lastIndex=0;for(var h,p=[],f=0;null!==(h=u(s,l));){var d=String(h[0]);p[f]=d,""===d&&(s.lastIndex=o(l,a(s.lastIndex),c)),f++}return 0===f?null:p}]}))},314:function(t,e,n){},315:function(t,e,n){},316:function(t,e,n){},317:function(t,e,n){},318:function(t,e,n){},319:function(t,e,n){},320:function(t,e,n){},321:function(t,e,n){},322:function(t,e,n){},323:function(t,e,n){},324:function(t,e,n){},325:function(t,e,n){},326:function(t,e,n){},332:function(t,e,n){"use strict";var i=n(172),r=n(171),a=n(9),s=n(22),o=n(107),u=n(173),l=n(15),c=n(174),h=n(76),p=n(2),f=[].push,d=Math.min,g=!p((function(){return!RegExp(4294967295,"y")}));i("split",2,(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(s(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[i];if(!r(t))return e.call(i,t,a);for(var o,u,l,c=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,g=new RegExp(t.source,p+"g");(o=h.call(g,i))&&!((u=g.lastIndex)>d&&(c.push(i.slice(d,o.index)),o.length>1&&o.index=a));)g.lastIndex===o.index&&g.lastIndex++;return d===i.length?!l&&g.test("")||c.push(""):c.push(i.slice(d)),c.length>a?c.slice(0,a):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var r=s(this),a=null==e?void 0:e[t];return void 0!==a?a.call(e,r,n):i.call(String(r),e,n)},function(t,r){var s=n(i,t,this,r,i!==e);if(s.done)return s.value;var h=a(t),p=String(this),f=o(h,RegExp),v=h.unicode,m=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(g?"y":"g"),b=new f(g?h:"^(?:"+h.source+")",m),k=void 0===r?4294967295:r>>>0;if(0===k)return[];if(0===p.length)return null===c(b,p)?[p]:[];for(var _=0,x=0,C=[];x-1)&&(e=e.replace(/y/g,""));var o=s(x?new m(t,e):m(t,e),i?this:b,$);return C&&n&&d(o,{sticky:n}),o},y=function(t){t in $||o($,t,{configurable:!0,get:function(){return m[t]},set:function(e){m[t]=e}})},L=u(m),w=0;L.length>w;)y(L[w++]);b.constructor=$,$.prototype=b,p(r,"RegExp",$)}g("RegExp")},335:function(t,e){t.exports=function(t){return null==t}},336:function(t,e,n){"use strict";n.r(e);n(169);var i=n(312),r={name:"SidebarGroup",components:{DropdownTransition:n(337).a},props:["item","open","collapsable","depth"],beforeCreate:function(){this.$options.components.SidebarLinks=n(336).default},methods:{isActive:i.e}},a=(n(356),n(27)),s=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?n("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):n("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),n("DropdownTransition",[t.open||!t.collapsable?n("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null).exports;n(357),n(72);function o(t,e,n,i,r){var a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}};return r>2&&(a.style={"padding-left":r+"rem"}),t("RouterLink",a,n)}function u(t,e,n,r,a){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;return!e||s>a?null:t("ul",{class:"sidebar-sub-headers"},e.map((function(e){var l=Object(i.e)(r,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[o(t,n+"#"+e.slug,e.title,l,e.level-1),u(t,e.children,n,r,a,s+1)])})))}var l={functional:!0,props:["item","sidebarDepth"],render:function(t,e){var n=e.parent,r=n.$page,a=(n.$site,n.$route),s=n.$themeConfig,l=n.$themeLocaleConfig,c=e.props,h=c.item,p=c.sidebarDepth,f=Object(i.e)(a,h.path),d="auto"===h.type?f||h.children.some((function(t){return Object(i.e)(a,h.basePath+"#"+t.slug)})):f,g="external"===h.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,h.path,h.title||h.path):o(t,h.path,h.title||h.path,d),v=[r.frontmatter.sidebarDepth,p,l.sidebarDepth,s.sidebarDepth,1].find((function(t){return void 0!==t})),m=l.displayAllHeaders||s.displayAllHeaders;return"auto"===h.type?[g,u(t,h.children,h.basePath,a,v)]:(d||m)&&h.headers&&!i.d.test(h.path)?[g,u(t,Object(i.c)(h.headers),h.path,a,v)]:g}};n(358);function c(t,e){return"group"===e.type&&e.children.some((function(e){return"group"===e.type?c(t,e):"page"===e.type&&Object(i.e)(t,e.path)}))}var h={name:"SidebarLinks",components:{SidebarGroup:s,SidebarLink:Object(a.a)(l,void 0,void 0,!1,null,null,null).exports},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data:function(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route:function(){this.refreshIndex()}},created:function(){this.refreshIndex()},methods:{refreshIndex:function(){var t=function(t,e){for(var n=0;n-1&&(this.openGroupIndex=t)},toggleGroup:function(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive:function(t){return Object(i.e)(this.$route,t.regularPath)}}},p=Object(a.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.items.length?n("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(e,i){return n("li",{key:i},["group"===e.type?n("SidebarGroup",{attrs:{item:e,open:i===t.openGroupIndex,collapsable:e.collapsable||e.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):n("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:e}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=p.exports},337:function(t,e,n){"use strict";var i={name:"DropdownTransition",methods:{setHeight:function(t){t.style.height=t.scrollHeight+"px"},unsetHeight:function(t){t.style.height=""}}},r=(n(348),n(27)),a=Object(r.a)(i,(function(){var t=this.$createElement;return(this._self._c||t)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.a=a.exports},338:function(t,e,n){"use strict";var i=n(1),r=n(339);i({target:"String",proto:!0,forced:n(340)("link")},{link:function(t){return r(this,"a","href",t)}})},339:function(t,e,n){var i=n(22),r=/"/g;t.exports=function(t,e,n,a){var s=String(i(t)),o="<"+e;return""!==n&&(o+=" "+n+'="'+String(a).replace(r,""")+'"'),o+">"+s+""}},340:function(t,e,n){var i=n(2);t.exports=function(t){return i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},341:function(t,e,n){"use strict";var i=n(314);n.n(i).a},342:function(t,e,n){var i=n(1),r=n(343);i({global:!0,forced:parseInt!=r},{parseInt:r})},343:function(t,e,n){var i=n(5),r=n(176).trim,a=n(177),s=i.parseInt,o=/^[+-]?0[Xx]/,u=8!==s(a+"08")||22!==s(a+"0x16");t.exports=u?function(t,e){var n=r(String(t));return s(n,e>>>0||(o.test(n)?16:10))}:s},344:function(t,e,n){var i=n(2),r=n(177);t.exports=function(t){return i((function(){return!!r[t]()||"​…᠎"!="​…᠎"[t]()||r[t].name!==t}))}},345:function(t,e,n){"use strict";var i,r=n(1),a=n(24).f,s=n(15),o=n(108),u=n(22),l=n(109),c=n(23),h="".endsWith,p=Math.min,f=l("endsWith");r({target:"String",proto:!0,forced:!!(c||f||(i=a(String.prototype,"endsWith"),!i||i.writable))&&!f},{endsWith:function(t){var e=String(u(this));o(t);var n=arguments.length>1?arguments[1]:void 0,i=s(e.length),r=void 0===n?i:p(s(n),i),a=String(t);return h?h.call(e,a,r):e.slice(r-a.length,r)===a}})},346:function(t,e,n){"use strict";var i=n(315);n.n(i).a},347:function(t,e,n){"use strict";var i=n(316);n.n(i).a},348:function(t,e,n){"use strict";var i=n(317);n.n(i).a},349:function(t,e,n){"use strict";var i=n(318);n.n(i).a},350:function(t,e,n){"use strict";var i=n(319);n.n(i).a},351:function(t,e,n){"use strict";var i=n(320);n.n(i).a},352:function(t,e,n){"use strict";var i=n(321);n.n(i).a},353:function(t,e,n){var i=n(35),r=n(16),a=n(29),s="[object String]";t.exports=function(t){return"string"==typeof t||!r(t)&&a(t)&&i(t)==s}},354:function(t,e,n){"use strict";var i=n(322);n.n(i).a},355:function(t,e,n){"use strict";var i=n(323);n.n(i).a},356:function(t,e,n){"use strict";var i=n(324);n.n(i).a},357:function(t,e,n){"use strict";var i=n(1),r=n(34).find,a=n(106),s=n(20),o=!0,u=s("find");"find"in[]&&Array(1).find((function(){o=!1})),i({target:"Array",proto:!0,forced:o||!u},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("find")},358:function(t,e,n){"use strict";var i=n(325);n.n(i).a},359:function(t,e,n){"use strict";var i=n(326);n.n(i).a},365:function(t,e,n){"use strict";n(169),n(103),n(338);var i=n(312),r={name:"NavLink",props:{item:{required:!0}},computed:{link:function(){return Object(i.b)(this.item.link)},exact:function(){var t=this;return this.$site.locales?Object.keys(this.$site.locales).some((function(e){return e===t.link})):"/"===this.link},isNonHttpURI:function(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget:function(){return"_blank"===this.target},isInternal:function(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target:function(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel:function(){return this.isNonHttpURI?null:!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction:function(){this.$emit("focusout")}}},a=n(27),s=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction(e)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)}),[],!1,null,null,null).exports,o={name:"Home",components:{NavLink:s},computed:{data:function(){return this.$page.frontmatter},actionLink:function(){return{link:this.data.actionLink,text:this.data.actionText}}}},u=(n(341),Object(a.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("main",{staticClass:"home",attrs:{"aria-labelledby":null!==t.data.heroText?"main-title":null}},[n("header",{staticClass:"hero"},[t.data.heroImage?n("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?n("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?n("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?n("p",{staticClass:"action"},[n("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?n("div",{staticClass:"features"},t._l(t.data.features,(function(e,i){return n("div",{key:i,staticClass:"feature"},[n("h2",[t._v(t._s(e.title))]),t._v(" "),n("p",[t._v(t._s(e.details))])])})),0):t._e(),t._v(" "),n("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?n("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):t._e()],1)}),[],!1,null,null,null).exports),l=(n(342),n(28),n(179),n(170),n(105),n(48),n(181),n(313),n(333),n(175),n(72),n(334),n(74),n(345),n(73),n(332),n(183)),c=n.n(l),h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=c()(e,"title","");return c()(e,"frontmatter.tags")&&(i+=" ".concat(e.frontmatter.tags.join(" "))),n&&(i+=" ".concat(n)),p(t,i)},p=function(t,e){var n=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},i=new RegExp("[^\0-]"),r=t.split(/\s+/g).map((function(t){return t.trim()})).filter((function(t){return!!t}));if(i.test(t))return r.some((function(t){return e.toLowerCase().indexOf(t)>-1}));var a=t.endsWith(" ");return new RegExp(r.map((function(t,e){return r.length!==e+1||a?"(?=.*\\b".concat(n(t),"\\b)"):"(?=.*\\b".concat(n(t),")")})).join("")+".+","gi").test(e)},f={name:"SearchBox",data:function(){return{query:"",focused:!1,focusIndex:0,placeholder:void 0}},computed:{showSuggestions:function(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions:function(){var t=this.query.trim().toLowerCase();if(t){for(var e=this.$site.pages,n=this.$site.themeConfig.searchMaxSuggestions||5,i=this.$localePath,r=[],a=0;a=n);a++){var s=e[a];if(this.getPageLocalePath(s)===i&&this.isSearchable(s))if(h(t,s))r.push(s);else if(s.headers)for(var o=0;o=n);o++){var u=s.headers[o];u.title&&h(t,s,u.title)&&r.push(Object.assign({},s,{path:s.path+"#"+u.slug,header:u}))}}return r}},alignRight:function(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted:function(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy:function(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath:function(t){for(var e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable:function(t){var e=null;return null===e||(e=Array.isArray(e)?e:new Array(e)).filter((function(e){return t.path.match(e)})).length>0},onHotkey:function(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp:function(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown:function(){this.showSuggestions&&(this.focusIndex "+t._s(e.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports),g=(n(347),Object(a.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sidebar-button",on:{click:function(e){return t.$emit("toggle-sidebar")}}},[n("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[n("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null).exports),v=(n(182),n(47)),m=n(337),b=n(184),k=n.n(b),_={name:"DropdownLink",components:{NavLink:s,DropdownTransition:m.a},props:{item:{required:!0}},data:function(){return{open:!1}},computed:{dropdownAriaLabel:function(){return this.item.ariaLabel||this.item.text}},watch:{$route:function(){this.open=!1}},methods:{setOpen:function(t){this.open=t},isLastItemOfArray:function(t,e){return k()(e)===t},handleDropdown:function(){0===event.detail&&this.setOpen(!this.open)}}},x=(n(349),{name:"NavLinks",components:{NavLink:s,DropdownLink:Object(a.a)(_,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[n("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[n("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),n("span",{staticClass:"arrow down"})]),t._v(" "),n("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[n("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),n("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),n("DropdownTransition",[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(e,i){return n("li",{key:e.link||i,staticClass:"dropdown-item"},["links"===e.type?n("h4",[t._v("\n "+t._s(e.text)+"\n ")]):t._e(),t._v(" "),"links"===e.type?n("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(e.items,(function(i){return n("li",{key:i.link,staticClass:"dropdown-subitem"},[n("NavLink",{attrs:{item:i},on:{focusout:function(n){t.isLastItemOfArray(i,e.items)&&t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)})),0):n("NavLink",{attrs:{item:e},on:{focusout:function(n){t.isLastItemOfArray(e,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null).exports},computed:{userNav:function(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav:function(){var t=this,e=this.$site.locales;if(e&&Object.keys(e).length>1){var n=this.$page.path,i=this.$router.options.routes,r=this.$site.themeConfig.locales||{},a={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(e).map((function(a){var s,o=e[a],u=r[a]&&r[a].label||o.lang;return o.lang===t.$lang?s=n:(s=n.replace(t.$localeConfig.path,a),i.some((function(t){return t.path===s}))||(s=a)),{text:u,link:s}}))};return[].concat(Object(v.a)(this.userNav),[a])}return this.userNav},userLinks:function(){return(this.nav||[]).map((function(t){return Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)})}))},repoLink:function(){var t=this.$site.themeConfig.repo;return t?/^https?:/.test(t)?t:"https://github.com/".concat(t):null},repoLabel:function(){if(this.repoLink){if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;for(var t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"],n=0;nMath.abs(n)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}}),G=Object(a.a)(W,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?n("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),n("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),n("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?n("Home"):n("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.a=G.exports}}]); \ No newline at end of file diff --git a/assets/js/3.39748dbc.js b/assets/js/3.39748dbc.js deleted file mode 100644 index 56d141e..0000000 --- a/assets/js/3.39748dbc.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{327:function(n,t,e){},360:function(n,t,e){"use strict";var o=e(327);e.n(o).a},367:function(n,t,e){"use strict";e.r(t);var o=e(365),a={name:"CarbonAds",watch:{$route:function(n,t){n.path!==t.path&&this.$el.querySelector("#carbonads")&&(this.$el.innerHTML="",this.load())}},mounted:function(){this.load()},methods:{load:function(){var n=document.createElement("script");n.id="_carbonads_js",n.src="//cdn.carbonads.com/carbon.js?serve=CEAI6277&placement=dplayerjsorg",this.$el.appendChild(n)}},render:function(n){return n("div",{class:"carbon-ads"})}},r=(e(360),e(27)),s=Object(r.a)(a,void 0,void 0,!1,null,null,null).exports,c={name:"Layout",components:{ParentLayout:o.a,CarbonAds:s}},u=Object(r.a)(c,(function(){var n=this.$createElement,t=this._self._c||n;return t("ParentLayout",{scopedSlots:this._u([{key:"sidebar-top",fn:function(){return[t("CarbonAds")]},proxy:!0}])})}),[],!1,null,null,null);t.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/4.48498f46.js b/assets/js/4.48498f46.js deleted file mode 100644 index 4d2fd5c..0000000 --- a/assets/js/4.48498f46.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{328:function(t,e,n){},361:function(t,e,n){"use strict";var i=n(328);n.n(i).a},381:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:function(t,e){var n=e.props,i=e.slots;return t("span",{class:["badge",n.type],style:{verticalAlign:n.vertical}},n.text||i().default)}},r=(n(361),n(27)),a=Object(r.a)(i,void 0,void 0,!1,null,"15b7b770",null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/5.1d34f339.js b/assets/js/5.1d34f339.js deleted file mode 100644 index 2213bca..0000000 --- a/assets/js/5.1d34f339.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{330:function(e,t,o){},363:function(e,t,o){"use strict";var a=o(330);o.n(a).a},372:function(e,t,o){"use strict";o.r(t);o(28),o(102),o(72),o(104);var a={name:"CodeGroup",data:function(){return{codeTabs:[],activeCodeTabIndex:-1}},watch:{activeCodeTabIndex:function(e){this.codeTabs.forEach((function(e){e.elm.classList.remove("theme-code-block__active")})),this.codeTabs[e].elm.classList.add("theme-code-block__active")}},mounted:function(){var e=this;this.codeTabs=(this.$slots.default||[]).filter((function(e){return Boolean(e.componentOptions)})).map((function(t,o){return""===t.componentOptions.propsData.active&&(e.activeCodeTabIndex=o),{title:t.componentOptions.propsData.title,elm:t.elm}})),-1===this.activeCodeTabIndex&&this.codeTabs.length>0&&(this.activeCodeTabIndex=0)},methods:{changeCodeTab:function(e){this.activeCodeTabIndex=e}}},n=(o(363),o(27)),c=Object(n.a)(a,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"theme-code-group"},[o("div",{staticClass:"theme-code-group__nav"},[o("ul",{staticClass:"theme-code-group__ul"},e._l(e.codeTabs,(function(t,a){return o("li",{key:t.title,staticClass:"theme-code-group__li"},[o("button",{staticClass:"theme-code-group__nav-tab",class:{"theme-code-group__nav-tab-active":a===e.activeCodeTabIndex},on:{click:function(t){return e.changeCodeTab(a)}}},[e._v("\n "+e._s(t.title)+"\n ")])])})),0)]),e._v(" "),e._t("default"),e._v(" "),e.codeTabs.length<1?o("pre",{staticClass:"pre-blank"},[e._v("// Make sure to add code blocks to your code group")]):e._e()],2)}),[],!1,null,"32c2d7ed",null);t.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/6.719e56b4.js b/assets/js/6.719e56b4.js deleted file mode 100644 index 0753d75..0000000 --- a/assets/js/6.719e56b4.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{331:function(t,e,n){},364:function(t,e,n){"use strict";var a=n(331);n.n(a).a},368:function(t,e,n){"use strict";n.r(e);var a=n(32),o=n(3),s={"/":{message:"New content is available.",buttonText:"Refresh"},"/zh/":{message:"发现新内容可用",buttonText:"刷新"},"/ru/":{message:"Доступен новый контент.",buttonText:"Обновить"},"/uk/":{message:"Доступний новий контент.",buttonText:"Оновити"},"/ja/":{message:"新しいコンテンツがあります。",buttonText:"更新する"},"/es/":{message:"Hay nuevo contenido disponible.",buttonText:"Actualizar"}},u={name:"SWUpdatePopup",data:function(){return{rawPopupConfig:{"/zh/":{message:"发现新内容可用",buttonText:"刷新"},"/":{message:"New content is available",buttonText:"Refresh"}},updateEvent:null}},computed:{popupConfig:function(){return Object(o.g)(this,this.rawPopupConfig)},enabled:function(){return Boolean(this.popupConfig&&this.updateEvent)},message:function(){var t=this.popupConfig;return t&&t.message||s["/"].message},buttonText:function(){var t=this.popupConfig;return t&&t.buttonText||s["/"].buttonText}},created:function(){a.a.$on("sw-updated",this.onSWUpdated),!0==={"/zh/":{message:"发现新内容可用",buttonText:"刷新"},"/":{message:"New content is available",buttonText:"Refresh"}}&&(this.rawPopupConfig=s)},methods:{onSWUpdated:function(t){this.updateEvent=t},reload:function(){this.updateEvent&&(this.updateEvent.skipWaiting().then((function(){location.reload(!0)})),this.updateEvent=null)}}},i=(n(364),n(27)),p=Object(i.a)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"sw-update-popup"}},[t._t("default",[t.enabled?n("div",{staticClass:"sw-update-popup"},[t._v("\n "+t._s(t.message)+"\n\n "),n("br"),t._v(" "),n("button",{on:{click:t.reload}},[t._v("\n "+t._s(t.buttonText)+"\n ")])]):t._e()],{reload:t.reload,enabled:t.enabled,message:t.message,buttonText:t.buttonText})],2)}),[],!1,null,"fec8b358",null);e.default=p.exports}}]); \ No newline at end of file diff --git a/assets/js/7.267a6475.js b/assets/js/7.267a6475.js deleted file mode 100644 index 1632593..0000000 --- a/assets/js/7.267a6475.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{329:function(e,t,c){},362:function(e,t,c){"use strict";var i=c(329);c.n(i).a},371:function(e,t,c){"use strict";c.r(t);var i={name:"CodeBlock",props:{title:{type:String,required:!0},active:{type:Boolean,default:!1}}},n=(c(362),c(27)),a=Object(n.a)(i,(function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"theme-code-block",class:{"theme-code-block__active":this.active}},[this._t("default")],2)}),[],!1,null,"6d04095e",null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/8.d6baaf9b.js b/assets/js/8.d6baaf9b.js deleted file mode 100644 index be60a25..0000000 --- a/assets/js/8.d6baaf9b.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{370:function(t,e,o){"use strict";o.r(e);var i={props:{immediate:{type:Boolean,default:!1},options:{type:Object,default:function(){return{autoplay:!1,theme:"#FADFA3",loop:!0,lang:"zh-cn",hotkey:!0,preload:"auto",logo:"https://i.loli.net/2019/06/06/5cf8c5d94521136430.png",volume:.7,mutex:!0,screenshot:!0,subtitle:{url:"https://s-sh-17-dplayercdn.oss.dogecdn.com/hikarunara.vtt",type:"webvtt",fontSize:"20px",bottom:"10%",color:"#FADFA3"},video:{url:"https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4",pic:"https://i.loli.net/2019/06/06/5cf8c5d9c57b510947.png",thumbnails:"https://i.loli.net/2019/06/06/5cf8c5d9cec8510758.jpg",type:"auto"},danmaku:{id:"9E2E3368B56CDBB4",api:"https://api.prprpr.me/dplayer/",token:"tokendemo",user:"DIYgod",addition:["https://s-sh-17-dplayercdn.oss.dogecdn.com/1678963.json"]},contextmenu:[{text:"custom1",link:"https://github.com/DIYgod/DPlayer"},{text:"custom2",click:function(t){console.log(t)}}],highlight:[{time:20,text:"这是第 20 秒"},{time:120,text:"这是 2 分钟"}]}}}},methods:{load:function(){this.options.container=this.$refs.dplayer,this.dplayer=new window.DPlayer(this.options)}},mounted:function(){this.immediate&&(this.dplayer=new window.DPlayer(this.options))},beforeDestroy:function(){this.dplayer&&this.dplayer.destroy()}},s=o(27),n=Object(s.a)(i,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"dplayer-wrap"},[e("div",{ref:"dplayer",staticClass:"dplayer"},[e("button",{staticClass:"load",on:{click:this.load}},[this._v("Load demo")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/9.1c664cd1.js b/assets/js/9.1c664cd1.js deleted file mode 100644 index b609b4d..0000000 --- a/assets/js/9.1c664cd1.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{369:function(t,e,s){"use strict";s.r(e);var n=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],o={methods:{getMsg:function(){return n[Math.floor(Math.random()*n.length)]}}},i=s(27),h=Object(i.a)(o,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"theme-container"},[e("div",{staticClass:"theme-default-content"},[e("h1",[this._v("404")]),this._v(" "),e("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),e("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])}),[],!1,null,null,null);e.default=h.exports}}]); \ No newline at end of file diff --git a/assets/js/app.d616f804.js b/assets/js/app.d616f804.js deleted file mode 100644 index 943a0e6..0000000 --- a/assets/js/app.d616f804.js +++ /dev/null @@ -1,8 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],c=e[1],u=e[2],l=0,p=[];l=0&&Math.floor(e)===e&&isFinite(t)}function h(t){return i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function _(t,e){return b.call(t,e)}function w(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var x=/-(\w)/g,O=w((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),S=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),j=/\B([A-Z])/g,E=w((function(t){return t.replace(j,"-$1").toLowerCase()}));var k=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function A(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function C(t,e){for(var n in e)t[n]=e[n];return t}function $(t){for(var e={},n=0;n0,Q=Y&&Y.indexOf("edge/")>0,Z=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===K),tt=(Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y),Y&&Y.match(/firefox\/(\d+)/)),et={}.watch,nt=!1;if(W)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,rt)}catch(t){}var ot=function(){return void 0===H&&(H=!W&&!G&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),H},it=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function at(t){return"function"==typeof t&&/native code/.test(t.toString())}var st,ct="undefined"!=typeof Symbol&&at(Symbol)&&"undefined"!=typeof Reflect&&at(Reflect.ownKeys);st="undefined"!=typeof Set&&at(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ut=T,ft=0,lt=function(){this.id=ft++,this.subs=[]};lt.prototype.addSub=function(t){this.subs.push(t)},lt.prototype.removeSub=function(t){m(this.subs,t)},lt.prototype.depend=function(){lt.target&<.target.addDep(this)},lt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!_(o,"default"))a=!1;else if(""===a||a===E(t)){var c=zt(String,o.type);(c<0||s0&&(fe((u=t(u,(n||"")+"_"+c))[0])&&fe(l)&&(r[f]=mt(l.text+u[0].text),u.shift()),r.push.apply(r,u)):s(u)?fe(l)?r[f]=mt(l.text+u):""!==u&&r.push(mt(u)):fe(u)&&fe(l)?r[f]=mt(l.text+u.text):(a(e._isVList)&&i(u.tag)&&o(u.key)&&i(n)&&(u.key="__vlist"+n+"_"+c+"__"),r.push(u)));return r}(t):void 0}function fe(t){return i(t)&&i(t.text)&&!1===t.isComment}function le(t,e){if(t){for(var n=Object.create(null),r=ct?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==r&&s===n.$key&&!i&&!n.$hasNormal)return n;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=ve(e,c,t[c]))}else o={};for(var u in e)u in o||(o[u]=ye(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),B(o,"$stable",a),B(o,"$key",s),B(o,"$hasNormal",i),o}function ve(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ue(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ye(t,e){return function(){return t[e]}}function ge(t,e){var n,r,o,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,o=t.length;rdocument.createEvent("Event").timeStamp&&(fn=function(){return ln.now()})}function pn(){var t,e;for(un=fn(),sn=!0,nn.sort((function(t,e){return t.id-e.id})),cn=0;cncn&&nn[n].id>t.id;)n--;nn.splice(n+1,0,t)}else nn.push(t);an||(an=!0,ee(pn))}}(this)},dn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Bt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},dn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},dn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},dn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var vn={enumerable:!0,configurable:!0,get:T,set:T};function yn(t,e,n){vn.get=function(){return this[e][n]},vn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,vn)}function gn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];t.$parent&&St(!1);var i=function(i){o.push(i);var a=Nt(i,e,n,t);kt(r,i,a),i in t||yn(t,"_props",i)};for(var a in e)i(a);St(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?T:k(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;f(e=t._data="function"==typeof e?function(t,e){ht();try{return t.call(e,e)}catch(t){return Bt(t,e,"data()"),{}}finally{dt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);for(;o--;){var i=n[o];0,r&&_(r,i)||(a=void 0,36!==(a=(i+"").charCodeAt(0))&&95!==a&&yn(t,"_data",i))}var a;Et(e,!0)}(t):Et(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=ot();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;0,r||(n[o]=new dn(t,a||T,T,mn)),o in t||bn(t,o,i)}}(t,e.computed),e.watch&&e.watch!==et&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Cn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=kn(a.componentOptions);s&&!e(s)&&$n(n,i,r,o)}}}function $n(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,m(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=On++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Mt(Sn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Xe(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=pe(e._renderChildren,o),t.$scopedSlots=r,t._c=function(e,n,r,o){return ze(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return ze(t,e,n,r,o,!0)};var i=n&&n.data;kt(t,"$attrs",i&&i.attrs||r,null,!0),kt(t,"$listeners",e._parentListeners||r,null,!0)}(e),en(e,"beforeCreate"),function(t){var e=le(t.$options.inject,t);e&&(St(!1),Object.keys(e).forEach((function(n){kt(t,n,e[n])})),St(!0))}(e),gn(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),en(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(jn),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=At,t.prototype.$delete=Ct,t.prototype.$watch=function(t,e,n){if(f(e))return xn(this,t,e,n);(n=n||{}).user=!0;var r=new dn(this,t,e,n);if(n.immediate)try{e.call(this,r.value)}catch(t){Bt(t,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(jn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o1?A(n):n;for(var r=A(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;iparseInt(this.max)&&$n(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return F}};Object.defineProperty(t,"config",e),t.util={warn:ut,extend:C,mergeOptions:Mt,defineReactive:kt},t.set=At,t.delete=Ct,t.nextTick=ee,t.observable=function(t){return Et(t),t},t.options=Object.create(null),N.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,C(t.options.components,Pn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=A(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Mt(this.options,t),this}}(t),En(t),function(t){N.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&f(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(jn),Object.defineProperty(jn.prototype,"$isServer",{get:ot}),Object.defineProperty(jn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(jn,"FunctionalRenderContext",{value:Pe}),jn.version="2.6.10";var Ln=y("style,class"),Rn=y("input,textarea,option,select,progress"),In=y("contenteditable,draggable,spellcheck"),Mn=y("events,caret,typing,plaintext-only"),Dn=function(t,e){return Bn(e)||"false"===e?"false":"contenteditable"===t&&Mn(e)?e:"true"},Nn=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Un="http://www.w3.org/1999/xlink",Fn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},zn=function(t){return Fn(t)?t.slice(6,t.length):""},Bn=function(t){return null==t||!1===t};function Vn(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Hn(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=Hn(e,n.data));return function(t,e){if(i(t)||i(e))return qn(t,Wn(e));return""}(e.staticClass,e.class)}function Hn(t,e){return{staticClass:qn(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function qn(t,e){return t?e?t+" "+e:t:e||""}function Wn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?vr(t,e,n):Nn(e)?Bn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):In(e)?t.setAttribute(e,Dn(e,n)):Fn(e)?Bn(n)?t.removeAttributeNS(Un,zn(e)):t.setAttributeNS(Un,e,n):vr(t,e,n)}function vr(t,e,n){if(Bn(n))t.removeAttribute(e);else{if(X&&!J&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var yr={create:hr,update:hr};function gr(t,e){var n=e.elm,r=e.data,a=t.data;if(!(o(r.staticClass)&&o(r.class)&&(o(a)||o(a.staticClass)&&o(a.class)))){var s=Vn(e),c=n._transitionClasses;i(c)&&(s=qn(s,Wn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var mr,br={create:gr,update:gr},_r="__r",wr="__c";function xr(t,e,n){var r=mr;return function o(){var i=e.apply(null,arguments);null!==i&&jr(t,o,n,r)}}var Or=Gt&&!(tt&&Number(tt[1])<=53);function Sr(t,e,n,r){if(Or){var o=un,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}mr.addEventListener(t,e,nt?{capture:n,passive:r}:n)}function jr(t,e,n,r){(r||mr).removeEventListener(t,e._wrapper||e,n)}function Er(t,e){if(!o(t.data.on)||!o(e.data.on)){var n=e.data.on||{},r=t.data.on||{};mr=e.elm,function(t){if(i(t[_r])){var e=X?"change":"input";t[e]=[].concat(t[_r],t[e]||[]),delete t[_r]}i(t[wr])&&(t.change=[].concat(t[wr],t.change||[]),delete t[wr])}(n),ae(n,r,Sr,jr,xr,e.context),mr=void 0}}var kr,Ar={create:Er,update:Er};function Cr(t,e){if(!o(t.data.domProps)||!o(e.data.domProps)){var n,r,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in i(c.__ob__)&&(c=e.data.domProps=C({},c)),s)n in c||(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var u=o(r)?"":String(r);$r(a,u)&&(a.value=u)}else if("innerHTML"===n&&Yn(a.tagName)&&o(a.innerHTML)){(kr=kr||document.createElement("div")).innerHTML=""+r+"";for(var f=kr.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;f.firstChild;)a.appendChild(f.firstChild)}else if(r!==s[n])try{a[n]=r}catch(t){}}}}function $r(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Tr={create:Cr,update:Cr},Pr=w((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Lr(t){var e=Rr(t.style);return t.staticStyle?C(t.staticStyle,e):e}function Rr(t){return Array.isArray(t)?$(t):"string"==typeof t?Pr(t):t}var Ir,Mr=/^--/,Dr=/\s*!important$/,Nr=function(t,e,n){if(Mr.test(e))t.style.setProperty(e,n);else if(Dr.test(n))t.style.setProperty(E(e),n.replace(Dr,""),"important");else{var r=Fr(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(Vr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function qr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Vr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Wr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&C(e,Gr(t.name||"v")),C(e,t),e}return"string"==typeof t?Gr(t):void 0}}var Gr=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Kr=W&&!J,Yr="transition",Xr="animation",Jr="transition",Qr="transitionend",Zr="animation",to="animationend";Kr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Jr="WebkitTransition",Qr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Zr="WebkitAnimation",to="webkitAnimationEnd"));var eo=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function no(t){eo((function(){eo(t)}))}function ro(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Hr(t,e))}function oo(t,e){t._transitionClasses&&m(t._transitionClasses,e),qr(t,e)}function io(t,e,n){var r=so(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Yr?Qr:to,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=Yr,f=a,l=i.length):e===Xr?u>0&&(n=Xr,f=u,l=c.length):l=(n=(f=Math.max(a,u))>0?a>u?Yr:Xr:null)?n===Yr?i.length:c.length:0,{type:n,timeout:f,propCount:l,hasTransform:n===Yr&&ao.test(r[Jr+"Property"])}}function co(t,e){for(;t.length1}function vo(t,e){!0!==e.data.show&&fo(e)}var yo=function(t){var e,n,r={},c=t.modules,u=t.nodeOps;for(e=0;ed?b(t,o(n[g+1])?null:n[g+1].elm,n,h,g,r):h>g&&w(0,e,p,d)}(p,y,g,n,f):i(g)?(i(t.text)&&u.setTextContent(p,""),b(p,null,g,0,g.length-1,n)):i(y)?w(0,y,0,y.length-1):i(t.text)&&u.setTextContent(p,""):t.text!==e.text&&u.setTextContent(p,e.text),i(d)&&i(h=d.hook)&&i(h=h.postpatch)&&h(t,e)}}}function j(t,e,n){if(a(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(R(wo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function _o(t,e){return e.every((function(e){return!R(e,t)}))}function wo(t){return"_value"in t?t._value:t.value}function xo(t){t.target.composing=!0}function Oo(t){t.target.composing&&(t.target.composing=!1,So(t.target,"input"))}function So(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function jo(t){return!t.componentInstance||t.data&&t.data.transition?t:jo(t.componentInstance._vnode)}var Eo={model:go,show:{bind:function(t,e,n){var r=e.value,o=(n=jo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,fo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=jo(n)).data&&n.data.transition?(n.data.show=!0,r?fo(n,(function(){t.style.display=t.__vOriginalDisplay})):lo(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},ko={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ao(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ao(We(e.children)):t}function Co(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[O(i)]=o[i];return e}function $o(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var To=function(t){return t.tag||qe(t)},Po=function(t){return"show"===t.name},Lo={name:"transition",props:ko,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(To)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=Ao(o);if(!i)return o;if(this._leaving)return $o(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=Co(this),u=this._vnode,f=Ao(u);if(i.data.directives&&i.data.directives.some(Po)&&(i.data.show=!0),f&&f.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,f)&&!qe(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=C({},c);if("out-in"===r)return this._leaving=!0,se(l,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),$o(t,o);if("in-out"===r){if(qe(i))return u;var p,h=function(){p()};se(c,"afterEnter",h),se(c,"enterCancelled",h),se(l,"delayLeave",(function(t){p=t}))}}return o}}},Ro=C({tag:String,moveClass:String},ko);function Io(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Mo(t){t.data.newPos=t.elm.getBoundingClientRect()}function Do(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}delete Ro.mode;var No={Transition:Lo,TransitionGroup:{props:Ro,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Qe(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Co(this),s=0;s-1?Jn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Jn[t]=/HTMLUnknownElement/.test(e.toString())},C(jn.options.directives,Eo),C(jn.options.components,No),jn.prototype.__patch__=W?yo:T,jn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=gt),en(t,"beforeMount"),r=function(){t._update(t._render(),n)},new dn(t,r,T,{before:function(){t._isMounted&&!t._isDestroyed&&en(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,en(t,"mounted")),t}(this,t=t&&W?function(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}(t):void 0,e)},W&&setTimeout((function(){F.devtools&&it&&it.emit("init",jn)}),0),e.a=jn},function(t,e,n){var r=n(5),o=n(24).f,i=n(13),a=n(12),s=n(78),c=n(119),u=n(75);t.exports=function(t,e){var n,f,l,p,h,d=t.target,v=t.global,y=t.stat;if(n=v?r:y?r[d]||s(d,{}):(r[d]||{}).prototype)for(f in e){if(p=e[f],l=t.noTargetGet?(h=o(n,f))&&h.value:n[f],!u(v?f:d+(y?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";n.d(e,"d",(function(){return w})),n.d(e,"c",(function(){return x})),n.d(e,"b",(function(){return O})),n.d(e,"e",(function(){return S})),n.d(e,"a",(function(){return j})),n.d(e,"f",(function(){return E})),n.d(e,"g",(function(){return k})),n.d(e,"h",(function(){return A}));n(28),n(179),n(72),n(90),n(141),n(11),n(48),n(181),n(43),n(73),n(44);var r=n(69),o=n(47),i=(n(91),n(31)),a=n(0),s={NotFound:function(){return n.e(9).then(n.bind(null,369))},Layout:function(){return Promise.all([n.e(0),n.e(2),n.e(3)]).then(n.bind(null,367))}},c={"v-c5357d1e":function(){return n.e(10).then(n.bind(null,373))},"v-62cbe2ca":function(){return n.e(11).then(n.bind(null,374))},"v-882857ac":function(){return n.e(13).then(n.bind(null,375))},"v-ce86423e":function(){return n.e(14).then(n.bind(null,376))},"v-8fe9db4c":function(){return n.e(17).then(n.bind(null,377))},"v-a367ad90":function(){return n.e(15).then(n.bind(null,378))},"v-ef0bf96c":function(){return n.e(12).then(n.bind(null,379))},"v-4801f5c0":function(){return n.e(16).then(n.bind(null,380))}};function u(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var f=/-(\w)/g,l=u((function(t){return t.replace(f,(function(t,e){return e?e.toUpperCase():""}))})),p=/\B([A-Z])/g,h=u((function(t){return t.replace(p,"-$1").toLowerCase()})),d=u((function(t){return t.charAt(0).toUpperCase()+t.slice(1)}));function v(t,e){if(e)return t(e)?t(e):e.includes("-")?t(d(l(e))):t(d(e))||t(h(e))}var y=Object.assign({},s,c),g=function(t){return y[t]},m=function(t){return c[t]},b=function(t){return s[t]},_=function(t){return a.a.component(t)};function w(t){return v(m,t)}function x(t){return v(b,t)}function O(t){return v(g,t)}function S(t){return v(_,t)}function j(){for(var t=arguments.length,e=new Array(t),n=0;n0?o(r(t),9007199254740991):0}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(37),o=n(22);t.exports=function(t){return r(o(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(145),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(7),o=n(2),i=n(8),a=Object.defineProperty,s={},c=function(t){throw t};t.exports=function(t,e){if(i(s,t))return s[t];e||(e={});var n=[][t],u=!!i(e,"ACCESSORS")&&e.ACCESSORS,f=i(e,0)?e[0]:c,l=i(e,1)?e[1]:void 0;return s[t]=!!n&&!o((function(){if(u&&!r)return!0;var t={length:-1};u?a(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,f,l)}))}},function(t,e,n){var r=n(117),o=n(5),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e,n){var r=n(7),o=n(84),i=n(39),a=n(17),s=n(38),c=n(8),u=n(112),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=s(e,!0),u)try{return f(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r=n(228),o=n(231);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var f=u.render;u.render=function(t,e){return c.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(1),o=n(34).filter,i=n(56),a=n(20),s=i("filter"),c=a("filter");r({target:"Array",proto:!0,forced:!s||!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r,o=n(9),i=n(187),a=n(82),s=n(40),c=n(116),u=n(79),f=n(53),l=f("IE_PROTO"),p=function(){},h=function(t){return" - - - - - - - - - - -

Ecosystem

Let's make DPlayer better, feel free to submit yours in Let me know! (opens new window)

Help

Joining the Discussion

Creating issue

Tooling

Danmaku api

Plugins

Other

Who use DPlayer?

Contributors

This project exists thanks to all the people who contribute.

- - - diff --git a/guide.html b/guide.html deleted file mode 100644 index f0de299..0000000 --- a/guide.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - Guide | DPlayer - - - - - - - - - - - - - -

Guide

DPlayer

🍭 Wow, such a lovely HTML5 danmaku video player

Special Thanks

Special Sponsors

Sponsors

极酷社 (opens new window)

Installation

Using npm:

npm install dplayer --save
-

Using Yarn:

yarn add dplayer
-

Quick Start

At first, let's initialize a simplest DPlayer

Load DPlayer files

<div id="dplayer"></div>
-<script src="DPlayer.min.js"></script>
-

Or work with module bundler:

import DPlayer from 'dplayer';
-
-const dp = new DPlayer(options);
-

Initialization in js:

const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    screenshot: true,
-    video: {
-        url: 'demo.mp4',
-        pic: 'demo.jpg',
-        thumbnails: 'thumbnails.jpg',
-    },
-    subtitle: {
-        url: 'webvtt.vtt',
-    },
-    danmaku: {
-        id: 'demo',
-        api: 'https://api.prprpr.me/dplayer/',
-    },
-});
-

Options

You can custom your player instance by those options

Name Default Description
container document.querySelector('.dplayer') player container
live false enable live mode, see #live
autoplay false video autoplay
theme '#b7daff' main color
loop false video loop
lang navigator.language.toLowerCase() values: 'en', 'zh-cn', 'zh-tw'
screenshot false enable screenshot, if true, video and video poster must enable Cross-Origin
airplay true enable airplay in Safari
hotkey true enable hotkey, support FF, FR, volume control, play & pause
preload 'auto' values: 'none', 'metadata', 'auto'
volume 0.7 default volume, notice that player will remember user setting, default volume will not work after user set volume themselves
playbackSpeed [0.5, 0.75, 1, 1.25, 1.5, 2] optional playback speed, or or you can set a custom one
logo - showing logo in the top left corner, you can adjust its size and position by CSS
apiBackend - getting and sending danmaku in your way, see #live
video - video info
video.quality - see #Quality switching
video.defaultQuality - see #Quality switching
video.url - video url
video.pic - video poster
video.thumbnails - video thumbnails, generated by DPlayer-thumbnails (opens new window)
video.type 'auto' values: 'auto', 'hls', 'flv', 'dash', 'webtorrent', 'normal' or other custom type, see #MSE support
video.customType - custom video type, see #MSE support
subtitle - external subtitle
subtitle.url required subtitle url
subtitle.type 'webvtt' subtitle type, values: 'webvtt', 'ass', but only webvtt is supported for now
subtitle.fontSize '20px' subtitle font size
subtitle.bottom '40px' the distance between the subtitle and player bottom, values like: '10px' '10%'
subtitle.color '#fff' subtitle color
danmaku - showing danmaku
danmaku.id required danmaku pool id, it must be unique
danmaku.api required see #Danmaku API
danmaku.token - back end verification token
danmaku.maximum - danmaku maximum quantity
danmaku.addition - additional danmaku, see #bilibili danmaku
danmaku.user 'DIYgod' danmaku user name
danmaku.bottom - values like: '10px' '10%', the distance between the danmaku bottom and player bottom, in order to prevent warding off subtitle
danmaku.unlimited false display all danmaku even though danmaku overlap, notice that player will remember user setting, default setting will not work after user set it themselves
contextmenu [] custom contextmenu
highlight [] custom time markers upon progress bar
mutex true prevent to play multiple player at the same time, pause other players when this player start play
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    autoplay: false,
-    theme: '#FADFA3',
-    loop: true,
-    lang: 'zh-cn',
-    screenshot: true,
-    hotkey: true,
-    preload: 'auto',
-    logo: 'logo.png',
-    volume: 0.7,
-    mutex: true,
-    video: {
-        url: 'dplayer.mp4',
-        pic: 'dplayer.png',
-        thumbnails: 'thumbnails.jpg',
-        type: 'auto',
-    },
-    subtitle: {
-        url: 'dplayer.vtt',
-        type: 'webvtt',
-        fontSize: '25px',
-        bottom: '10%',
-        color: '#b7daff',
-    },
-    danmaku: {
-        id: '9E2E3368B56CDBB4',
-        api: 'https://api.prprpr.me/dplayer/',
-        token: 'tokendemo',
-        maximum: 1000,
-        addition: ['https://api.prprpr.me/dplayer/v3/bilibili?aid=4157142'],
-        user: 'DIYgod',
-        bottom: '15%',
-        unlimited: true,
-    },
-    contextmenu: [
-        {
-            text: 'custom1',
-            link: 'https://github.com/DIYgod/DPlayer',
-        },
-        {
-            text: 'custom2',
-            click: (player) => {
-                console.log(player);
-            },
-        },
-    ],
-    highlight: [
-        {
-            text: 'marker for 20s',
-            time: 20,
-        },
-        {
-            text: 'marker for 2mins',
-            time: 120,
-        },
-    ],
-});
-

API

  • dp.play(): play video

  • dp.pause(): pause video

  • dp.seek(time: number): seek to specified time

    dp.seek(100);
    -
  • dp.toggle(): toggle between play and pause

  • dp.on(event: string, handler: function): bind video and player events, see more details (opens new window)

  • dp.switchVideo(video, danmaku): switch to a new video

    dp.switchVideo(
    -    {
    -        url: 'second.mp4',
    -        pic: 'second.png',
    -        thumbnails: 'second.jpg',
    -    },
    -    {
    -        id: 'test',
    -        api: 'https://api.prprpr.me/dplayer/',
    -        maximum: 3000,
    -        user: 'DIYgod',
    -    }
    -);
    -
  • dp.notice(text: string, time: number, opacity: number): show message, the unit of time is millisecond, the default of time is 2000, the default of opacity is 0.8

    dp.notice('Amazing player', 2000, 0.8);
    -
  • dp.switchQuality(index: number): switch quality

  • dp.destroy(): destroy player

  • dp.speed(rate: number): set video speed

  • dp.volume(percentage: number, nostorage: boolean, nonotice: boolean): set video volume

    dp.volume(0.1, true, false);
    -
  • dp.video: native video

  • dp.video.currentTime: returns the current playback position

  • dp.video.duration: returns video total time

  • dp.video.paused: returns whether the video paused

  • most native api (opens new window) are supported

  • dp.danmaku

  • dp.danmaku.send(danmaku, callback: function): submit a new danmaku to back end

    dp.danmaku.send(
    -    {
    -        text: 'dplayer is amazing',
    -        color: '#b7daff',
    -        type: 'right', // should be `top` `bottom` or `right`
    -    },
    -    function () {
    -        console.log('success');
    -    }
    -);
    -
  • dp.danmaku.draw(danmaku): draw a new danmaku to player in real time

    dp.danmaku.draw({
    -    text: 'DIYgod is amazing',
    -    color: '#fff',
    -    type: 'top',
    -});
    -
  • dp.danmaku.opacity(percentage: number): set danmaku opacity, opacity should between 0 and 1

    dp.danmaku.opacity(0.5);
    -
  • dp.danmaku.clear(): clear all danmakus

  • dp.danmaku.hide(): hide danmaku

  • dp.danmaku.show(): show danmaku

  • dp.fullScreen: two type: web or browser, the default one is browser

  • dp.fullScreen.request(type: string): request fullscreen

    dp.fullScreen.request('web');
    -
  • dp.fullScreen.cancel(type: string): cancel fullscreen

    dp.fullScreen.cancel('web');
    -

Event binding

dp.on(event, handler)

dp.on('ended', function () {
-    console.log('player ended');
-});
-

Video events

  • abort
  • canplay
  • canplaythrough
  • durationchange
  • emptied
  • ended
  • error
  • loadeddata
  • loadedmetadata
  • loadstart
  • mozaudioavailable
  • pause
  • play
  • playing
  • progress
  • ratechange
  • seeked
  • seeking
  • stalled
  • suspend
  • timeupdate
  • volumechange
  • waiting

Player events

  • screenshot
  • thumbnails_show
  • thumbnails_hide
  • danmaku_show
  • danmaku_hide
  • danmaku_clear
  • danmaku_loaded
  • danmaku_send
  • danmaku_opacity
  • contextmenu_show
  • contextmenu_hide
  • notice_show
  • notice_hide
  • quality_start
  • quality_end
  • destroy
  • resize
  • fullscreen
  • fullscreen_cancel
  • webfullscreen
  • webfullscreen_cancel
  • subtitle_show
  • subtitle_hide
  • subtitle_change

Quality switching

Set video url and video type in video.quality, set default quality by video.defaultQuality.

const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        quality: [
-            {
-                name: 'HD',
-                url: 'demo.m3u8',
-                type: 'hls',
-            },
-            {
-                name: 'SD',
-                url: 'demo.mp4',
-                type: 'normal',
-            },
-        ],
-        defaultQuality: 0,
-        pic: 'demo.png',
-        thumbnails: 'thumbnails.jpg',
-    },
-});
-

Danmaku

Danmaku API

danmaku.api

Ready-made API

url: https://api.prprpr.me/dplayer/

Daily backup data: DPlayer-data (opens new window)

Setting up yourself

DPlayer-node (opens new window)

bilibili danmaku

danmaku.addition

API: https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid] (opens new window)

const option = {
-    danmaku: {
-        // ...
-        addition: ['https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid]'],
-    },
-};
-

MSE support

HLS

It requires the library hls.js (opens new window) and it should be loaded before DPlayer.min.js.

<div id="dplayer"></div>
-<script src="hls.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.m3u8',
-        type: 'hls',
-    },
-    pluginOptions: {
-        hls: {
-            // hls config
-        },
-    },
-});
-console.log(dp.plugins.hls); // Hls instance
-
// another way, use customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.m3u8',
-        type: 'customHls',
-        customType: {
-            customHls: function (video, player) {
-                const hls = new Hls();
-                hls.loadSource(video.src);
-                hls.attachMedia(video);
-            },
-        },
-    },
-});
-

MPEG DASH

It requires the library dash.js (opens new window) and it should be loaded before DPlayer.min.js.

<div id="dplayer"></div>
-<script src="dash.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.mpd',
-        type: 'dash',
-    },
-    pluginOptions: {
-        dash: {
-            // dash config
-        },
-    },
-});
-console.log(dp.plugins.dash); // Dash instance
-
// another way, use customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.mpd',
-        type: 'customDash',
-        customType: {
-            customDash: function (video, player) {
-                dashjs.MediaPlayer().create().initialize(video, video.src, false);
-            },
-        },
-    },
-});
-

MPEG DASH (Shaka)

It requires the library shaka-player (opens new window) and it should be loaded before DPlayer.min.js.

<div id="dplayer"></div>
-<script src="shaka-player.compiled.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    screenshot: true,
-    video: {
-        url: 'demo.mpd',
-        type: 'shakaDash',
-        customType: {
-            shakaDash: function (video, player) {
-                var src = video.src;
-                var playerShaka = new shaka.Player(video); // 将会修改 video.src
-                playerShaka.load(src);
-            },
-        },
-    },
-});
-

FLV

It requires the library flv.js (opens new window) and it should be loaded before DPlayer.min.js.

<div id="dplayer"></div>
-<script src="flv.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.flv',
-        type: 'flv',
-    },
-    pluginOptions: {
-        flv: {
-            // refer to https://github.com/bilibili/flv.js/blob/master/docs/api.md#flvjscreateplayer
-            mediaDataSource: {
-                // mediaDataSource config
-            },
-            config: {
-                // config
-            },
-        },
-    },
-});
-console.log(dp.plugins.flv); // flv instance
-
// another way, use customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.flv',
-        type: 'customFlv',
-        customType: {
-            customFlv: function (video, player) {
-                const flvPlayer = flvjs.createPlayer({
-                    type: 'flv',
-                    url: video.src,
-                });
-                flvPlayer.attachMediaElement(video);
-                flvPlayer.load();
-            },
-        },
-    },
-});
-

WebTorrent

It requires the library webtorrent (opens new window) and it should be loaded before DPlayer.min.js.

<div id="dplayer"></div>
-<script src="webtorrent.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'magnet:demo',
-        type: 'webtorrent',
-    },
-    pluginOptions: {
-        webtorrent: {
-            // webtorrent config
-        },
-    },
-});
-console.log(dp.plugins.webtorrent); // WebTorrent instance
-
// another way, use customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'magnet:demo',
-        type: 'customWebTorrent',
-        customType: {
-            customWebTorrent: function (video, player) {
-                player.container.classList.add('dplayer-loading');
-                const client = new WebTorrent();
-                const torrentId = video.src;
-                client.add(torrentId, (torrent) => {
-                    const file = torrent.files.find((file) => file.name.endsWith('.mp4'));
-                    file.renderTo(
-                        video,
-                        {
-                            autoplay: player.options.autoplay,
-                        },
-                        () => {
-                            player.container.classList.remove('dplayer-loading');
-                        }
-                    );
-                });
-            },
-        },
-    },
-});
-

Work with other MSE library

DPlayer can work with any MSE library via customType option.

<div id="dplayer"></div>
-<script src="https://cdn.jsdelivr.net/npm/cdnbye@latest"></script>
-<script src="DPlayer.min.js"></script>
-
var type = 'normal';
-if(Hls.isSupported() && Hls.WEBRTC_SUPPORT) {
-    type = 'customHls';
-}
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.m3u8',
-        type: type,
-        customType: {
-            'customHls': function (video, player) {
-                const hls = new Hls({
-                    debug: false,
-                    // Other hlsjsConfig options provided by hls.js
-                    p2pConfig: {
-                        live: false,        
-                        // Other p2pConfig options provided by CDNBye http://www.cdnbye.com/en/
-                    }
-                });
-                hls.loadSource(video.src);
-                hls.attachMedia(video);
-            }
-        }
-    },
-});
-

Live

You can use DPlayer in live, but if you want live danmaku, you should prepare a WebSocket backend yourself.

Init player:

const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    live: true,
-    danmaku: true,
-    apiBackend: {
-        read: function (options) {
-            console.log('Pretend to connect WebSocket');
-            callback();
-        },
-        send: function (options) {
-            console.log('Pretend to send danmaku via WebSocket', options.data);
-            callback();
-        },
-    },
-    video: {
-        url: 'demo.m3u8',
-        type: 'hls',
-    },
-});
-

Draw danmaku after getting a danmaku via WebSocket:

const danmaku = {
-    text: 'Get a danmaku via WebSocket',
-    color: '#fff',
-    type: 'right',
-};
-dp.danmaku.draw(danmaku);
-

FAQ

Why can't player be full screen?

If player is contained in a iframe, try adding the allowfullscreen attribute to the iframe.

For full browser support it should look like this:

<iframe src="example.com" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe>
-

Why can't player autoplay in some mobile browsers?

Most mobile browsers forbid video autoplay, you wont be able to achieve it without hacks.

- - - diff --git a/index.html b/index.html index 60616a0..f0fb8d2 100644 --- a/index.html +++ b/index.html @@ -1,55 +1,4 @@ - - - - - - DPlayer - - - - - - - - - - - - - - - - - + diff --git a/logo.png b/logo.png deleted file mode 100644 index 1e72c8ebdec1aeb958cb4a855a80034ceee71412..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32587 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 { - if (event.data && event.data.type === 'SKIP_WAITING') { - self.skipWaiting(); - } -}); - -/** - * The workboxSW.precacheAndRoute() method efficiently caches and responds to - * requests for URLs in the manifest. - * See https://goo.gl/S9QRab - */ -self.__precacheManifest = [ - { - "url": "404.html", - "revision": "192ee92b45d992dbb88ddd9925f42d4e" - }, - { - "url": "assets/css/0.styles.0d901613.css", - "revision": "7306e270077c14d7828514b1c8b241ca" - }, - { - "url": "assets/img/search.83621669.svg", - "revision": "83621669651b9a3d4bf64d1a670ad856" - }, - { - "url": "assets/js/10.00067cb1.js", - "revision": "2aaae67d5d787341d2cbb745292e3e3f" - }, - { - "url": "assets/js/11.2ce3b889.js", - "revision": "092c3b668fd30e550ee9c3fc20384a73" - }, - { - "url": "assets/js/12.61926250.js", - "revision": "d9597230cc2dafcfade8a3a2953d81eb" - }, - { - "url": "assets/js/13.34f0b29b.js", - "revision": "ed44efc0081d233e3ce06cef50ea7987" - }, - { - "url": "assets/js/14.f7751f45.js", - "revision": "a3dca97ceded66b55c022df8d76e473a" - }, - { - "url": "assets/js/15.b726ef97.js", - "revision": "60014eaf60ad016d25c43777a2898d5c" - }, - { - "url": "assets/js/16.fe30d146.js", - "revision": "b4c6f8ccde4e6362bce8acf83fddaeab" - }, - { - "url": "assets/js/17.cdc9b305.js", - "revision": "9c2b8be32272eefda257f79f7d834250" - }, - { - "url": "assets/js/18.993ec4f7.js", - "revision": "160707af5e80fa023ade13f508534498" - }, - { - "url": "assets/js/2.84dd0af2.js", - "revision": "75650e6bb9d139e10228cf27dc5f41aa" - }, - { - "url": "assets/js/3.39748dbc.js", - "revision": "44c8b54b20adc61bcb59932d9aeb18e4" - }, - { - "url": "assets/js/4.48498f46.js", - "revision": "e80d71ca33b49d0fcd8a831d82e0210e" - }, - { - "url": "assets/js/5.1d34f339.js", - "revision": "9dfc954d6f3bf4cc974bdd9a6da92a1e" - }, - { - "url": "assets/js/6.719e56b4.js", - "revision": "faee7331f2292719ece914fbc10ff34f" - }, - { - "url": "assets/js/7.267a6475.js", - "revision": "ef958c22a26ae7592f9b7b33bf470a77" - }, - { - "url": "assets/js/8.d6baaf9b.js", - "revision": "12b3f6feecc494fe8226292d86459be1" - }, - { - "url": "assets/js/9.1c664cd1.js", - "revision": "d335ce7e69f417f2146162359803c6a4" - }, - { - "url": "assets/js/app.d616f804.js", - "revision": "44949bcf58fdc23b834271004d56375f" - }, - { - "url": "ecosystem.html", - "revision": "30f807c548d63d4d5fd82761f4624d10" - }, - { - "url": "guide.html", - "revision": "c36febbd93f867275492f0043372d97c" - }, - { - "url": "index.html", - "revision": "aa5ba90dbf67e7841c998e0165562d67" - }, - { - "url": "logo.png", - "revision": "d1ccb7c104d21890f850228d34ba97f4" - }, - { - "url": "support.html", - "revision": "394df5dba39b627a35a196b50778df2d" - }, - { - "url": "zh/ecosystem.html", - "revision": "ab105cceae57a3dde39e39a61cc0fb4a" - }, - { - "url": "zh/guide.html", - "revision": "2eace7721530c48e0cf25bf34c3134e7" - }, - { - "url": "zh/index.html", - "revision": "b1c1982429cdb9080bccc5e785fb1c15" - }, - { - "url": "zh/support.html", - "revision": "49d368715d4667de7a10afded4adf737" - } -].concat(self.__precacheManifest || []); -workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); -addEventListener('message', event => { - const replyPort = event.ports[0] - const message = event.data - if (replyPort && message && message.type === 'skip-waiting') { - event.waitUntil( - self.skipWaiting().then( - () => replyPort.postMessage({ error: null }), - error => replyPort.postMessage({ error }) - ) - ) - } -}) diff --git a/support.html b/support.html deleted file mode 100644 index 5b27685..0000000 --- a/support.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - Sponsor DPlayer Development | DPlayer - - - - - - - - - - - - - -

Sponsor DPlayer Development

DPlayer is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

If you run a business and are using DPlayer in a revenue-generating product, it makes business sense to sponsor DPlayer development: it ensures the project that your product relies on stays healthy and actively maintained.

If you are an individual user and have enjoyed the productivity of using DPlayer, consider donating as a sign of appreciation - like buying me coffee once in a while 😃

You can support DPlayer development via the following methods:

One-time Donations

We accept donations through these channels:

Recurring Pledges

Recurring pledges come with exclusive perks, e.g. having your name or your company logo listed in the DPlayer GitHub repository and this website.

Current Premium Sponsors

Special Sponsors

Sponsors

极酷社 (opens new window)

DPlayer contributors

This project exists thanks to all the people who contribute.

- - - diff --git a/zh/ecosystem.html b/zh/ecosystem.html deleted file mode 100644 index bf532d5..0000000 --- a/zh/ecosystem.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - 生态 | DPlayer - - - - - - - - - - - - - -

生态

让 DPlayer 变得更好,请随意在 Let me know! (opens new window) 提交你的项目和产品

帮助

参与讨论

提交 issue

相关项目

工具

弹幕接口

插件

其他

谁在用 DPlayer?

- - - diff --git a/zh/guide.html b/zh/guide.html deleted file mode 100644 index 8b93006..0000000 --- a/zh/guide.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - 指南 | DPlayer - - - - - - - - - - - - - -

指南

DPlayer

🍭 Wow, such a lovely HTML5 danmaku video player

Special Thanks

Special Sponsors

Sponsors

极酷社 (opens new window)

安装

使用 npm:

npm install dplayer --save
-

使用 Yarn:

yarn add dplayer
-

快速开始

我们先尝试初始化一个最简单的 DPlayer

加载播放器文件:

<div id="dplayer"></div>
-<script src="DPlayer.min.js"></script>
-

或者使用模块管理器:

import DPlayer from 'dplayer';
-
-const dp = new DPlayer(options);
-

在 js 里初始化:

const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.mp4',
-    },
-});
-

一个最简单的 DPlayer 就初始化好了,它只有最基本的视频播放功能

参数

DPlayer 有丰富的参数可以自定义你的播放器实例

名称 默认值 描述
container document.querySelector('.dplayer') 播放器容器元素
live false 开启直播模式, 见#直播
autoplay false 视频自动播放
theme '#b7daff' 主题色
loop false 视频循环播放
lang navigator.language.toLowerCase() 可选值: 'en', 'zh-cn', 'zh-tw'
screenshot false 开启截图,如果开启,视频和视频封面需要允许跨域
hotkey true 开启热键,支持快进、快退、音量控制、播放暂停
airplay true 在 Safari 中开启 AirPlay
preload 'auto' 视频预加载,可选值: 'none', 'metadata', 'auto'
volume 0.7 默认音量,请注意播放器会记忆用户设置,用户手动设置音量后默认音量即失效
playbackSpeed [0.5, 0.75, 1, 1.25, 1.5, 2] 可选的播放速率,可以设置成自定义的数组
logo - 在左上角展示一个 logo,你可以通过 CSS 调整它的大小和位置
apiBackend - 自定义获取和发送弹幕行为,见#直播
video - 视频信息
video.quality - #清晰度切换
video.defaultQuality - #清晰度切换
video.url - 视频链接
video.pic - 视频封面
video.thumbnails - 视频缩略图,可以使用 DPlayer-thumbnails (opens new window) 生成
video.type 'auto' 可选值: 'auto', 'hls', 'flv', 'dash', 'webtorrent', 'normal' 或其他自定义类型, 见#MSE 支持
video.customType - 自定义类型, 见#MSE 支持
subtitle - 外挂字幕
subtitle.url required 字幕链接
subtitle.type 'webvtt' 字幕类型,可选值: 'webvtt', 'ass',目前只支持 webvtt
subtitle.fontSize '20px' 字幕字号
subtitle.bottom '40px' 字幕距离播放器底部的距离,取值形如: '10px' '10%'
subtitle.color '#fff' 字幕颜色
danmaku - 显示弹幕
danmaku.id required 弹幕池 id,必须唯一
danmaku.api required #弹幕接口
danmaku.token - 弹幕后端验证 token
danmaku.maximum - 弹幕最大数量
danmaku.addition - 额外外挂弹幕,见#bilibili 弹幕
danmaku.user 'DIYgod' 弹幕用户名
danmaku.bottom - 弹幕距离播放器底部的距离,防止遮挡字幕,取值形如: '10px' '10%'
danmaku.unlimited false 海量弹幕模式,即使重叠也展示全部弹幕,请注意播放器会记忆用户设置,用户手动设置后即失效
contextmenu [] 自定义右键菜单
highlight [] 自定义进度条提示点
mutex true 互斥,阻止多个播放器同时播放,当前播放器播放时暂停其他播放器
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    autoplay: false,
-    theme: '#FADFA3',
-    loop: true,
-    lang: 'zh-cn',
-    screenshot: true,
-    hotkey: true,
-    preload: 'auto',
-    logo: 'logo.png',
-    volume: 0.7,
-    mutex: true,
-    video: {
-        url: 'dplayer.mp4',
-        pic: 'dplayer.png',
-        thumbnails: 'thumbnails.jpg',
-        type: 'auto',
-    },
-    subtitle: {
-        url: 'dplayer.vtt',
-        type: 'webvtt',
-        fontSize: '25px',
-        bottom: '10%',
-        color: '#b7daff',
-    },
-    danmaku: {
-        id: '9E2E3368B56CDBB4',
-        api: 'https://api.prprpr.me/dplayer/',
-        token: 'tokendemo',
-        maximum: 1000,
-        addition: ['https://api.prprpr.me/dplayer/v3/bilibili?aid=4157142'],
-        user: 'DIYgod',
-        bottom: '15%',
-        unlimited: true,
-    },
-    contextmenu: [
-        {
-            text: 'custom1',
-            link: 'https://github.com/DIYgod/DPlayer',
-        },
-        {
-            text: 'custom2',
-            click: (player) => {
-                console.log(player);
-            },
-        },
-    ],
-    highlight: [
-        {
-            time: 20,
-            text: '这是第 20 秒',
-        },
-        {
-            time: 120,
-            text: '这是 2 分钟',
-        },
-    ],
-});
-

API

  • dp.play(): 播放视频

  • dp.pause(): 暂停视频

  • dp.seek(time: number): 跳转到特定时间

    dp.seek(100);
    -
  • dp.toggle(): 切换播放和暂停

  • dp.on(event: string, handler: function): 绑定视频和播放器事件,见#事件绑定

  • dp.switchVideo(video, danmaku): 切换到其他视频

    dp.switchVideo(
    -    {
    -        url: 'second.mp4',
    -        pic: 'second.png',
    -        thumbnails: 'second.jpg',
    -    },
    -    {
    -        id: 'test',
    -        api: 'https://api.prprpr.me/dplayer/',
    -        maximum: 3000,
    -        user: 'DIYgod',
    -    }
    -);
    -
  • dp.notice(text: string, time: number): 显示通知,时间的单位为毫秒,默认时间 2000 毫秒,默认透明度 0.8

  • dp.switchQuality(index: number): 切换清晰度

  • dp.destroy(): 销毁播放器

  • dp.speed(rate: number): 设置视频速度

  • dp.volume(percentage: number, nostorage: boolean, nonotice: boolean): 设置视频音量

    dp.volume(0.1, true, false);
    -
  • dp.video: 原生 video

  • dp.video.currentTime: 返回视频当前播放时间

  • dp.video.duration: 返回视频总时间

  • dp.video.paused: 返回视频是否暂停

  • 支持大多数原生 video 接口 (opens new window)

  • dp.danmaku

  • dp.danmaku.send(danmaku, callback: function): 提交一个新弹幕

    dp.danmaku.send(
    -    {
    -        text: 'dplayer is amazing',
    -        color: '#b7daff',
    -        type: 'right', // should be `top` `bottom` or `right`
    -    },
    -    function () {
    -        console.log('success');
    -    }
    -);
    -
  • dp.danmaku.draw(danmaku): 实时绘制一个新弹幕

    dp.danmaku.draw({
    -    text: 'DIYgod is amazing',
    -    color: '#fff',
    -    type: 'top',
    -});
    -
  • dp.danmaku.opacity(percentage: number): 设置弹幕透明度,透明度值在 0 到 1 之间

    dp.danmaku.opacity(0.5);
    -
  • dp.danmaku.clear(): 清除所有弹幕

  • dp.danmaku.hide(): 隐藏弹幕

  • dp.danmaku.show(): 显示弹幕

  • dp.fullScreen: 两个类型:webbrowser,默认类型是 browser

  • dp.fullScreen.request(type: string): 进入全屏

    dp.fullScreen.request('web');
    -
  • dp.fullScreen.cancel(type: string): 退出全屏

    dp.fullScreen.cancel('web');
    -

事件绑定

dp.on(event, handler)

dp.on('ended', function () {
-    console.log('player ended');
-});
-

视频事件

  • abort
  • canplay
  • canplaythrough
  • durationchange
  • emptied
  • ended
  • error
  • loadeddata
  • loadedmetadata
  • loadstart
  • mozaudioavailable
  • pause
  • play
  • playing
  • progress
  • ratechange
  • seeked
  • seeking
  • stalled
  • suspend
  • timeupdate
  • volumechange
  • waiting

播放器事件

  • screenshot
  • thumbnails_show
  • thumbnails_hide
  • danmaku_show
  • danmaku_hide
  • danmaku_clear
  • danmaku_loaded
  • danmaku_send
  • danmaku_opacity
  • contextmenu_show
  • contextmenu_hide
  • notice_show
  • notice_hide
  • quality_start
  • quality_end
  • destroy
  • resize
  • fullscreen
  • fullscreen_cancel
  • subtitle_show
  • subtitle_hide
  • subtitle_change

清晰度切换

video.quality 里设置不同清晰度的视频链接和类型,video.defaultQuality 设置默认清晰度

const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        quality: [
-            {
-                name: 'HD',
-                url: 'demo.m3u8',
-                type: 'hls',
-            },
-            {
-                name: 'SD',
-                url: 'demo.mp4',
-                type: 'normal',
-            },
-        ],
-        defaultQuality: 0,
-        pic: 'demo.png',
-        thumbnails: 'thumbnails.jpg',
-    },
-});
-

弹幕

弹幕接口

danmaku.api

现成的接口

链接: https://api.prprpr.me/dplayer/

每日备份: DPlayer-data (opens new window)

自己搭建

DPlayer-node (opens new window)

bilibili 弹幕

danmaku.addition

API: https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid] (opens new window)

const option = {
-    danmaku: {
-        // ...
-        addition: ['https://api.prprpr.me/dplayer/v3/bilibili?aid=[aid]'],
-    },
-};
-

MSE 支持

HLS

需要在 DPlayer.min.js 前面加载 hls.js (opens new window)

<div id="dplayer"></div>
-<script src="hls.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.m3u8',
-        type: 'hls',
-    },
-    pluginOptions: {
-        hls: {
-            // hls config
-        },
-    },
-});
-console.log(dp.plugins.hls); // Hls 实例
-
// 另一种方式,使用 customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.m3u8',
-        type: 'customHls',
-        customType: {
-            customHls: function (video, player) {
-                const hls = new Hls();
-                hls.loadSource(video.src);
-                hls.attachMedia(video);
-            },
-        },
-    },
-});
-

MPEG DASH

需要在 DPlayer.min.js 前面加载 dash.js (opens new window)

<div id="dplayer"></div>
-<script src="dash.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.mpd',
-        type: 'dash',
-    },
-    pluginOptions: {
-        dash: {
-            // dash config
-        },
-    },
-});
-console.log(dp.plugins.dash); // Dash 实例
-
// 另一种方式,使用 customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.mpd',
-        type: 'customDash',
-        customType: {
-            customDash: function (video, player) {
-                dashjs.MediaPlayer().create().initialize(video, video.src, false);
-            },
-        },
-    },
-});
-

MPEG DASH (Shaka)

需要在 DPlayer.min.js 前面加载 shaka-player.compiled.js (opens new window)

<div id="dplayer"></div>
-<script src="shaka-player.compiled.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    screenshot: true,
-    video: {
-        url: 'demo.mpd',
-        type: 'shakaDash',
-        customType: {
-            shakaDash: function (video, player) {
-                var src = video.src;
-                var playerShaka = new shaka.Player(video); // 将会修改 video.src
-                playerShaka.load(src);
-            },
-        },
-    },
-});
-

FLV

需要在 DPlayer.min.js 前面加载 flv.js (opens new window)

<div id="dplayer"></div>
-<script src="flv.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.flv',
-        type: 'flv',
-    },
-    pluginOptions: {
-        flv: {
-            // refer to https://github.com/bilibili/flv.js/blob/master/docs/api.md#flvjscreateplayer
-            mediaDataSource: {
-                // mediaDataSource config
-            },
-            config: {
-                // config
-            },
-        },
-    },
-});
-console.log(dp.plugins.flv); // flv 实例
-
// 另一种方式,使用 customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.flv',
-        type: 'customFlv',
-        customType: {
-            customFlv: function (video, player) {
-                const flvPlayer = flvjs.createPlayer({
-                    type: 'flv',
-                    url: video.src,
-                });
-                flvPlayer.attachMediaElement(video);
-                flvPlayer.load();
-            },
-        },
-    },
-});
-

WebTorrent

需要在 DPlayer.min.js 前面加载 webtorrent (opens new window)

<div id="dplayer"></div>
-<script src="webtorrent.min.js"></script>
-<script src="DPlayer.min.js"></script>
-
const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'magnet:demo',
-        type: 'webtorrent',
-    },
-    pluginOptions: {
-        webtorrent: {
-            // webtorrent config
-        },
-    },
-});
-console.log(dp.plugins.webtorrent); // WebTorrent 实例
-
// 另一种方式,使用 customType
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'magnet:demo',
-        type: 'customWebTorrent',
-        customType: {
-            customWebTorrent: function (video, player) {
-                player.container.classList.add('dplayer-loading');
-                const client = new WebTorrent();
-                const torrentId = video.src;
-                client.add(torrentId, (torrent) => {
-                    const file = torrent.files.find((file) => file.name.endsWith('.mp4'));
-                    file.renderTo(
-                        video,
-                        {
-                            autoplay: player.options.autoplay,
-                        },
-                        () => {
-                            player.container.classList.remove('dplayer-loading');
-                        }
-                    );
-                });
-            },
-        },
-    },
-});
-

配合其他 MSE 库使用

DPlayer 可以通过 customType 参数与任何 MSE 库一起使用,例如支持P2P插件:

<div id="dplayer"></div>
-<script src="https://cdn.jsdelivr.net/npm/cdnbye@latest"></script>
-<script src="DPlayer.min.js"></script>
-
var type = 'normal';
-if(Hls.isSupported() && Hls.WEBRTC_SUPPORT) {
-    type = 'customHls';
-}
-const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    video: {
-        url: 'demo.m3u8',
-        type: type,
-        customType: {
-            'customHls': function (video, player) {
-                const hls = new Hls({
-                    debug: false,
-                    // Other hlsjsConfig options provided by hls.js
-                    p2pConfig: {
-                        live: false,        // 如果是直播设为true
-                        // Other p2pConfig options provided by CDNBye http://www.cdnbye.com/cn/
-                    }
-                });
-                hls.loadSource(video.src);
-                hls.attachMedia(video);
-            }
-        }
-    },
-});
-

直播

你可以把 DPlayer 用在直播当中,但如果你想要直播弹幕,你需要自己准备一个 WebSocket 后端。

初始化播放器:

const dp = new DPlayer({
-    container: document.getElementById('dplayer'),
-    live: true,
-    danmaku: true,
-    apiBackend: {
-        read: function (endpoint, callback) {
-            console.log('Pretend to connect WebSocket');
-            callback();
-        },
-        send: function (endpoint, danmakuData, callback) {
-            console.log('Pretend to send danmaku via WebSocket', danmakuData);
-            callback();
-        },
-    },
-    video: {
-        url: 'demo.m3u8',
-        type: 'hls',
-    },
-});
-

通过 WebSocket 获取到弹幕之后,通过 dp.danmaku.draw 绘制弹幕:

const danmaku = {
-    text: 'Get a danmaku via WebSocket',
-    color: '#fff',
-    type: 'right',
-};
-dp.danmaku.draw(danmaku);
-

常见问题

为什么播放器不能全屏?

如果播放器被包含在 iframe 里,尝试在 iframe 上添加 allowfullscreen 属性。

为了完善的浏览器兼容性,它应该是这样:

<iframe src="example.com" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe>
-

为什么播放器不能在手机上自动播放?

大多数移动端浏览器禁止了视频自动播放。

- - - diff --git a/zh/index.html b/zh/index.html deleted file mode 100644 index b21ad77..0000000 --- a/zh/index.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - DPlayer - - - - - - - - - - - - - -

- DPlayer -

- 🍭 Wow, such a lovely HTML5 danmaku video player -

- Get Started → -

- - - diff --git a/zh/support.html b/zh/support.html deleted file mode 100644 index 2dcbd0f..0000000 --- a/zh/support.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - 赞助 DPlayer 的研发 | DPlayer - - - - - - - - - - - - - -

赞助 DPlayer 的研发

DPlayer 是采用 MIT 许可的开源项目,使用完全免费。 但是随着项目规模的增长,也需要有相应的资金支持才能持续项目的维护的开发。

如果你是企业经营者并且将 DPlayer 用在商业产品中,那么赞助 DPlayer 有商业上的益处:可以让你的产品所依赖的框架保持健康并得到积极的维护。

如果你是个人开发者并且享受 DPlayer 带来的高开发效率,可以用捐助来表示你的谢意 —— 比如偶尔给我买杯咖啡 😃

你可以通过下列的方法来赞助 DPlayer 的开发。

一次性赞助

我们通过以下方式接受赞助:

周期性赞助

周期性赞助可以获得额外的回报,比如你的名字或你的公司 logo 会出现在 DPlayer 的 GitHub 仓库和现在我们的官网中。

当前的顶级赞助商

Special Sponsors

Sponsors

极酷社 (opens new window)

DPlayer 贡献者

感谢所有贡献者。

- - -