diff --git a/index.html b/index.html index 4d7cf42..4ae017b 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,8 @@
- + + diff --git a/script.js b/script.js index ba076d2..c15237f 100644 --- a/script.js +++ b/script.js @@ -5,25 +5,19 @@ document.addEventListener("DOMContentLoaded", () => { let bodies = document.getElementsByTagName("body"); if(bodies.length === 1) { let body = bodies[0]; - let cast = document.createElement("button"); - cast.innerHtml = "Google Cast"; - let cjs = new Castjs(); - cast.addEventListener("click", () => { - if(cjs.available) { - cjs.cast(upstream); - } - }); let xhr = new XMLHttpRequest(); xhr.addEventListener("load", () => { let video = document.createElement("video"); video.className = "video-js"; body.appendChild(video); - body.appendChild(cast); let ctype = xhr.getResponseHeader("Content-Type"); console.log(ctype); let options = {}; options.controls = true; options.liveui = true; + options.techOrder = ["chromecast", "html5"]; + options.plugins = {}; + options.plugins.chromecast = {}; let player = videojs(video, options); let source = {}; source.type = ctype;