footniko / mediasoup-sample

MediaSoup simple example
MIT License
65 stars 35 forks source link

Doesn't work in safari #1

Closed klausdk closed 6 years ago

klausdk commented 6 years ago

This sample helped me alot! Thanks!

However, it didn't work out of the box on safari on iphone.

I fixed it by adding

video.setAttribute('playsinline', '');

in the "handleConsumer" function in the app.js file.

I also used the "H264" config in config.js instead of VP8

/Klaus

footniko commented 6 years ago

Yes, you're right. iOS has its own restrictions on auto-playing media. Thanks!