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

aframe-vimeo-component errors are different for each browser #20

Open
junekuhn opened this issue Dec 9, 2019 · 3 comments
Open

aframe-vimeo-component errors are different for each browser #20

junekuhn opened this issue Dec 9, 2019 · 3 comments

Comments

@junekuhn
Copy link

junekuhn commented Dec 9, 2019

Errors on Firefox

SyntaxError: invalid regular expression flag s

Errors on Chrome

Uncaught (in promise) Error: TypeError: Cannot read property 'dash' of undefined
at aframe-vimeo-component.min.js:10

I am using Python Flask

Front-End

<script type="application/javascript" src="{{url_for('static', filename='aframe-vimeo-component.min.js')}}"></script>

<a-entity vimeo="id: 362333441" id="vimeo-player">
          <a-sky color="#000" id="box"></a-sky>
      </a-entity>

Back-End

@app.route('/vimeo/api')
def vimeo():
    try:
        # `scope` is an array of permissions your token needs to access.
        # You can read more at https://developer.vimeo.com/api/authentication#supported-scopes
        token = v.load_client_credentials('public')

        # usable access token
        print('token=%s' % token)
    except vimeo.auth.GrantFailed:
        # Handle the failure to get a token from the provided code and redirect.
        print('token failed')
    
    me = v.get(path, data={'Accept':'application/vnd.vimeo.*+json;version=3.4'})
    me = me.json()
    mejson = jsonify(uri=me['uri'], description=me['description'], width=me['width'], height=me['height'])
    return mejson

I have followed the documentation as closely as possible but always end up with these errors.

Thank you.

@junekuhn
Copy link
Author

junekuhn commented Dec 9, 2019

This seems to be the code in Chrome it is referencing

{
    if (this.data) return this.data.play.dash.link;
    console.warn("[Vimeo] There was a problem loading your video, did you provide a valid Vimeo video ID?")

@Wirelesstaco
Copy link

No solve on my end but I am also seeing these errors.

@adboio
Copy link

adboio commented Oct 26, 2020

Was this ever solved? I'm facing the same problem, even after upgrading to Vimeo Pro which I thought was the issue...

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