Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.

Video do not autoplay #59

Open
onigetoc opened this issue Dec 2, 2018 · 1 comment
Open

Video do not autoplay #59

onigetoc opened this issue Dec 2, 2018 · 1 comment

Comments

@onigetoc
Copy link

onigetoc commented Dec 2, 2018

Video do not autoplay
i did this in player-view.js
this.videoElement.setAttribute("autoplay", "true");
it did work but the sound play twice.
i looked in the Google inspector to find out that there's was two <video tags in the html with the same setting.

i did added a alert on the render function player-view.js and this function is fire twice when we load a video.

this.render = function ($container, data, index) {
alert("render")

the alert fire twice.

@onigetoc
Copy link
Author

onigetoc commented Dec 2, 2018

i did a temporary fix.

 // TEMPORARY AUTOPLAY FIX
if(!document.getElementsByTagName("video").length == 0 ){
    document.getElementsByTagName('video')[0].play();
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant