Can I set "playsinline" video attribute only for IOS without removing the other video attributes?

For my website www.marketingstad.nl I use the following code with the "playsinline" attribute.

<video autoplay muted playsinline controls="true" id="myvideo">
</video>

The mp4 file loads in depending on the browser width.

var video = $('#myvideo');

var WindowWidth = $(window).width();

if (WindowWidth < 500) {
    //It is a small screen
    video.append("<source src='./Mobiel.mp4' type='video/mp4' >");
} else {
    //It is a big screen or desktop
    video.append("<source src='./MarketingStad.mp4' type='video/mp4' >");
}

I have to use the "playsinline" attribute to get it to autoplay on IOS devices but I don't like it.

Can I set the "playsinline" video attribute for IOS devices only true Javascript or Jquery?