zzarcon / video-snapshot

Get snapshots from a video file in the browser :movie_camera: :sunrise:
https://zzarcon.github.io/video-snapshot
MIT License
91 stars 16 forks source link

Fix mobile Safari usage #24

Open gmatheus opened 3 years ago

gmatheus commented 3 years ago

It seems that video-snapshot isn't working on mobile Safari (you can test current demo page in iOS Safari or XCode iOS Simulator), so I added playsinline attribute to video element. Check solution link below.

Error: Screen Shot 2020-12-01 at 17 15 59

Solution: http://support.temasys.com.sg/support/solutions/articles/12000038436-video-element-is-not-playing-on-ios-11-safari-mobile-browser

Docs: https://webkit.org/blog/6784/new-video-policies-for-ios/ https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute https://css-tricks.com/what-does-playsinline-mean-in-web-video/

zzarcon commented 3 years ago

Hey @gmatheus thanks for the PR!

gmatheus commented 3 years ago

Hey @zzarcon, glad to help here 🙂 Do you plan merging this/releasing a new version of video-snapshot soon? Let me know if you need any help testing this solution!

gmatheus commented 3 years ago

Hey @zzarcon! Any updates here?

dimafeldman commented 2 years ago

@zzarcon can you merge this fix please?

andrepxa commented 1 year ago

@zzarcon can you merge this, please?