How to implement Video.js-ass in Vue

0

Hello, I'm trying to implement videojs-ass in Vue (#

Current code:

<template>
<q-page class="flex flex-center">
    teste
    <video id="player" class="video-js vjs-default-skin vjs-big-play-centered">
        <source src="https://www72.zippyshare.com/d/48100536/22755/Akagi_01_Keikaku-anbient.mkv"type="video/mp4">
    </video>
</q-page>
</template>

<script>
    import 'video.js/dist/video-js.min.css'
    import 'libjass/libjass.css'
    import 'video.js/dist/video.min'
    import 'libjass/libjass'

    import 'videojs-ass/src/videojs.ass.css'
    import 'videojs-ass/src/videojs.ass'

    export default {
        name: 'PageIndex',
        mounted(){
            videojs('player', {
                controls: true,
                nativeControlsForTouch: false,
                width: 640,
                height: 360,
                // fluid: true,
                // plugins: {
                //   ass: {
                //     'src': ["subs/os.ass"],
                //     videoWidth: 640,
                //     videoHeight: 360,
                //     // enableSvg: false
                //   }
                // },
                playbackRates: [0.5, 1, 1.5, 2]
            });
            var vjs = videojs('player');
            // initialize the plugin this way to access internal methods
            var vjs_ass = vjs.ass({
                'src': ["subs/os.ass"],
                label: "engsub",
                videoWidth: 640,
                videoHeight: 360,
                // enableSvg: false
            });
        }
    }
</script>

The error I get is Cannot read property 'plugin' of undefined .

    
asked by anonymous 04.08.2018 / 20:48

0 answers