[go: nahoru, domu]

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

Add safari support? #64

Closed
owen800q opened this issue Apr 10, 2020 · 4 comments
Closed

Add safari support? #64

owen800q opened this issue Apr 10, 2020 · 4 comments

Comments

@owen800q
Copy link
owen800q commented Apr 10, 2020

Look like the artplayer not working on and IOS. Keep loading all the time.

@owen800q
Copy link
Author

@zhw2590582

@owen800q
Copy link
Author
owen800q commented Apr 10, 2020

Also not working for safari on Mac

Screenshot 2020-04-10 at 5 06 16 PM

@zhw2590582
Copy link
Owner
zhw2590582 commented Apr 10, 2020

Now it has been fixed, but it has not been released to npm. You can find the latest artplayer.js in the dist directory.

In fact, you can fix this problem by adding preload to auto directly in the configuration:

moreVideoAttr: {
    preload: 'auto',
},

This seems to be a compatibility difference between safari and chrome.

When the preload attribute of the video element is auto, posters can not be displayed in chrome.

When the preload attribute is metadata, posters can be displayed in chrome but video data cannot be loaded in safari.

@owen800q
Copy link
Author

Thanks bro, it saves a lot of efforts, solving by wrapping player initialisation inside a condition to check if browser is safari and configure preload as auto otherwise metadata.👍

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