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

Player not working on Safari #89

Open
simon-tannai opened this issue Jan 4, 2019 · 3 comments
Open

Player not working on Safari #89

simon-tannai opened this issue Jan 4, 2019 · 3 comments

Comments

@simon-tannai
Copy link

Hello !

I'm trying to use this component on Safari, version 12.0.2 on MacOS 10.14.2.
The <google-youtube> is present into HTML DOM but nothing is displayed on the webapp. I have not any error into the JavaScript console.
On Google Chrome, it's working fine.

The full html:

<link rel="import" href="bower_components/google-youtube/google-youtube.html">
<google-youtube class="googleYouTube" video-id="l_BWeuz1k4c"></google-youtube>

CSS:

.googleYouTube {
  display: block;
  width: 480px;
  margin: 0 auto;
  height: 270px;
}

There is specs to apply to be able to work on Safari brower ?

@rslawik
Copy link
Contributor

rslawik commented Jan 4, 2019

Thank you for reporting this.
Note that the code in the master branch has been migrated off HTML imports now.

Can you confirm that you use what currently is in the 2.x branch?

@simon-tannai
Copy link
Author

Thank you for reporting this.
Note that the code in the master branch has been migrated off HTML imports now.

Can you confirm that you use what currently is in the 2.x branch?

Yes, I'm using the 2.x version, imported with Bower:

I tried to use the newest version but if I've understood, NPM import seems to not working well. A solution is to build package with Polymer but I'm not using this framework. I'm on "raw" HTML & JS project.

@rslawik
Copy link
Contributor

rslawik commented Jan 4, 2019

Correct, with the npm version, you need to have a build step that replaces npm style imports with ones understood by browsers. Ideally, you want to bundle modules for production too. Anyway...

I tested the code from the 2.x branch in Safari 12.0.1, it works for me. Although, it is a different version, I don't expect large differences between them, because 12.0.2 was a security update - https://support.apple.com/en-us/HT209344.

What do you mean by "raw"? For Safari (and soon for Chrome) you need to include the required polyfills. Did you include them?
Also, could verify if <google-youtube> was registered with the browser, by doing: customElements.get('google-youtube')?

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

2 participants