Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to use panorama plugin ! #104

Open
Bramichou opened this issue Jun 8, 2017 · 2 comments
Open

Error when trying to use panorama plugin ! #104

Bramichou opened this issue Jun 8, 2017 · 2 comments

Comments

@Bramichou
Copy link

Hey, i got this error :

player.panorama is not a function

What am doing wrong ?!

i imported that :

import videojs from 'video.js'
import panorama from 'videojs-panorama';

and here is my code

` let canvasElement = this.getRenderer().view;
let videoElement = videoLoader.getVideo('video360')
videoElement.setAttribute("id", "video360");
videoElement.setAttribute("class", "video-animated-360");
videoElement.style.display = "block"

    canvasElement.style.display = "none"
    canvasElement.style.opacity = 0.

    console.log('video elem', videoElement)
    console.log('video src', videoElement.node)

    videojs.options.autoplay = true

    let the_video = document.querySelector('.video-animated-360')

    this.player = videojs(the_video,{
        preload: 'metadata',
        autoplay : true,
    })

    this.player.on('ready', () => {
        console.log(this.player.muted())
        this.player.muted(true)
        console.log(this.player.muted())
        if(!this.player.isFullscreen()){
            this.player.requestFullscreen()
        }
    })

    this.player.on('ended', () => {
        console.log('finished')
    })

    panorama(this.player, {
        autoMobileOrientation: true,
        initFov: 100,
        clickAndDrag: true
    });

`

Please help me ...

@Bramichou Bramichou changed the title Error when trying to using panorama plugin ! Error when trying to use panorama plugin ! Jun 8, 2017
@bhartendukumar12
Copy link

https://s3.ap-south-1.amazonaws.com/viyatrademo/Viyatra.html
go to these link and check the source code

@riverajohan
Copy link

Did you solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants