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

Commit

Permalink
Fixes #1008. Also truly dont auto play videos
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed May 23, 2016
1 parent 3792a68 commit e9a6c4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
12 changes: 2 additions & 10 deletions app/elements/io-home-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
<div class="fullvideo__container" fit>
<google-youtube fit width="100%" height="100%"
autohide="1" controls="2" modestbranding="1" showinfo="0"
iv_load_policy="3" rel="0" autoplay="0"
on-google-youtube-ready="_onVideoReady"></google-youtube>
iv_load_policy="3" rel="0" autoplay="0"></google-youtube>
</div>
</template>
</paper-dialog>
Expand Down Expand Up @@ -110,7 +109,7 @@ <h5>Watch the keynote</h5>
flex
aria-label="Watch video"
data-video-id$="[[_toVideoIdFilter(item.youtubeUrl)]]"
style="height:100%; background-image:url([[_computeBgImage(item)]])">
style$="height:100%; background-image:url([[_computeBgImage(item)]])">
<h3>Featured Session</h3>
<p>[[item.title]]</p>
<p class="byline">[[speakerIdsToNameString(item.speakers)]]</p>
Expand Down Expand Up @@ -356,13 +355,6 @@ <h3>Featured Session</h3>
}

return IMAGE_PATH + track + IMAGE_SUFFIX;
},

_onVideoReady: function(e) {
var video = Polymer.dom(e).rootTarget;
if (video.playsupported) {
video.play();
}
}

});
Expand Down
8 changes: 4 additions & 4 deletions app/elements/io-session-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ <h5 class="session__time">May [[selectedSession.day]], [[selectedSession.start]]
onScheduleVideoReady: function(e, detail) {
this.$.sessionDetails.querySelector('iron-image').classList.add('fadeout');
this.$.sessionDetails.querySelector('.play__button__container').classList.add('fadeout');
var video = Polymer.dom(e).rootTarget;
if (video.playsupported) {
video.play();
}
// var video = Polymer.dom(e).rootTarget;
// if (video.playsupported) {
// video.play();
// }
},

onVideoPlay: function(e, detail) {
Expand Down

0 comments on commit e9a6c4c

Please sign in to comment.