polimediaupv / paella-core

Paella Player core library
Educational Community License v2.0
20 stars 15 forks source link

Typo: setAttribute("playsinline","true") creates string value versus boolean #348

Closed karendolan closed 8 months ago

karendolan commented 9 months ago

Typo in es.upv.paella.mp4VideoFormat.js

This line: this.element.setAttribute("playsinline","true"); // String value of "t""r""u""e" should be: this.element.setAttribute("playsinline",""); // boolean

Same with this.element.setAttribute("autoplay","true");

https://github.com/polimediaupv/paella-core/blob/main/src/js/videoFormats/es.upv.paella.mp4VideoFormat.js#L23-L38

karendolan commented 9 months ago

While in that file, add to https://github.com/polimediaupv/paella-core/blob/main/src/js/videoFormats/es.upv.paella.mp4VideoFormat.js#L40-L43


    // The video is muted by default, to allow autoplay to work
    if (!isMainAudio) {
      this.element.muted = true;
      // Also add setAttribute here for muted is to be registered in iOS
      this.element.setAttribute('muted', '');
    }