Closed ivansteff closed 4 years ago
How to initialize Chromecast in VueJs? if you do as in the code below, an error appears:
index.html
<!DOCTYPE html> <html> <head> <title>Cast Videos: Google Cast Chrome Sender SDK Demo App</title> <link rel="stylesheet" type="text/css" href="css/CastVideos.css"> <link href='//fonts.googleapis.com/css?family=Roboto&subset=latin,cyrillic-ext,greek-ext,latin-ext' rel='stylesheet' type='text/css'> </head> <body> <div id="app"> ..... <button @click="startCast()"> Cast </button> ..... </div> <script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script> </body> </html>
palyer.vue
<template> ... </template> <script> import CastVideo from '../CastVideo.js' export default { name: 'palyer', data() {}, methods(){ startCast(){ var a = new CastVideo(); a.initializeCastPlayer(); } } </script>
Please tell me what I'm doing wrong.
How to initialize Chromecast in VueJs? if you do as in the code below, an error appears:
index.html
palyer.vue
Please tell me what I'm doing wrong.