Last active
February 15, 2020 06:07
-
-
Save elvishuges/ab7f9b9bcb1220c3de0b1bf9bad2cc25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
criarVideo(){ | |
console.log('videooooooooooooooooooooo'); | |
this.player = new YT.Player('player', { | |
width: 1350, | |
height: 580, | |
videoId: 'hshcfVKHL40', | |
playerVars: { | |
'autoplay': 1, | |
'controls': 1, | |
'autohide': 1, | |
'wmode': 'opaque', | |
'showinfo': 1, | |
'loop': 1, | |
'muted':0 | |
}, | |
events: { | |
'onReady': function (e) { | |
e.target.unMute(); | |
// e.target.setVolume(90); // YOU CAN SET VALUE TO 100 FOR MAX VOLUME. | |
}, | |
} | |
}); | |
//console.log('player',this.player.setVolume(50)); | |
}, | |
=============================== Novos Parametros ================== | |
window.onPlayerReady = function(event) { | |
event.target.playVideo(); | |
event.target.unMute(); | |
this.player.setVolume(20); | |
var $ = document.querySelector.bind(document); | |
var iframe = $('#player') | |
console.log('iframe',iframe); | |
var requestFullScreen = iframe.requestFullScreen || iframe.mozRequestFullScreen || iframe.webkitRequestFullScreen; | |
if (requestFullScreen) { | |
requestFullScreen.bind(iframe)(); | |
} | |
console.log('playerrrrr',this.player); | |
}.bind(this) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment